Project

General

Profile

Bug #3502

panic in smb_server_shutdown (sl_count assertion)

Added by Gordon Ross almost 8 years ago. Updated almost 8 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
-
Start date:
2013-01-27
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage
Gerrit CR:

Description

This can happen if you disable and then quickly re-enable the smb service.

Here's what the stack looks like:

mdb> *panic_thread::findstack -v
stack pointer for thread ffffff0d71eb3400: ffffff005c5509f0
  ffffff005c550ae0 panic+0x94()
  ffffff005c550b20 assfail+0x7e(fffffffff83ee210, fffffffff83ee1e8, 2c5)
  ffffff005c550b40 smb_slist_destructor+0x51(ffffff1186d83de8)
  ffffff005c550b70 smb_session_delete+0x7d(ffffff1186d83918)
  ffffff005c550ba0 smb_server_shutdown+0x76(ffffff0d7212f800)
  ffffff005c550bc0 smb_server_stop+0x4b()
  ffffff005c550c30 smb_drv_ioctl+0x15f(d200000000, d346000a, 8047dd0, 100001, ffffff13134cc3a0,
  ffffff005c550d54)
  ffffff005c550c70 cdev_ioctl+0x45(d200000000, d346000a, 8047dd0, 100001, ffffff13134cc3a0, ffffff005c550d54)
  ffffff005c550cb0 spec_ioctl+0x5a(ffffff0f71158c80, d346000a, 8047dd0, 100001, ffffff13134cc3a0,
  ffffff005c550d54, 0)
  ffffff005c550d30 fop_ioctl+0x7b(ffffff0f71158c80, d346000a, 8047dd0, 100001, ffffff13134cc3a0,
  ffffff005c550d54, 0)
  ffffff005c550e30 ioctl+0x18e(d, d346000a, 8047dd0)

#1

Updated by Gordon Ross almost 8 years ago

The panic is at smb_session.c:727

    smb_slist_destructor(&session->s_req_list)

The request list is non-empty because the kshare thread has an element on that list:

ffffff005dc21660 fop_lookup+0xed(ffffff131b003d00, ffffff005dc219f0, ffffff005dc21888, 0, 0, 0, ffffff0d28f1be88, ffffffffc0017fc0, ffffff005dc21884, ffffff005dc217b0)                   
ffffff005dc21830 smb_vop_lookup+0x165(ffffff131b003d00, ffffff005dc219f0, ffffff005dc21888, ffffff241b877980, 1, ffffff005dc21884, ffffff0d2909f540, ffffff005dc218a0, ffffff0d28f1be88)
ffffff005dc219b0 smb_fsop_lookup+0x1a8(ffffff181a263020, ffffff0d28f1be88, 1, ffffff0e1b35e910, ffffff0d906688f0, ffffff005dc219f0, ffffff005dc219d8)
ffffff005dc21b20 smb_server_sharevp+0x10d(ffffff11d9b500a8, ffffff005dc21b38)
ffffff005dc21b70 smb_kshare_export+0xb3(ffffff0d907fb888)
ffffff005dc21bc0 smb_kshare_export_list+0xa3(ffffff0d55c262c0)
ffffff005dc21c30 smb_drv_ioctl+0x13e(d200000000, d3460004, 825cd08, 100001, ffffff13134cc3a0, ffffff005dc21d54)
ffffff005dc21c70 cdev_ioctl+0x45(d200000000, d3460004, 825cd08, 100001, ffffff13134cc3a0, ffffff005dc21d54)

We need to either make that thread terminate or wait for it to finish
before we destroy the server object on which it holds a reference.

[from Nexenta 9812]

#2

Updated by Gordon Ross almost 8 years ago

  • Status changed from New to Resolved
commit 4846df9b53c813b173160a71c267f6678e9bf59b
Author: Kevin Crowe <kevin.crowe@nexenta.com>
Date:   Tue Jul 17 12:40:19 2012 -0400

    3502 panic in smb_server_shutdown (sl_count assertion)
    Reviewed by: Gordon Ross <gwr@nexenta.com>
    Reviewed by: Dan McDonald <danmcd@nexenta.com>
    Approved by: Richard Lowe <richlowe@richlowe.net>

Also available in: Atom PDF