Dieter Modig
2012-Aug-14 13:21 UTC
[Samba] Problem with heaps of sleeping smb processes due to panic action
Hi! We're running Samba4 (Version 4.0.0beta4) and are experiencing problems with smb_panic actions which result in loads of sleep processes in the end taking down the entire machine. This problem did not exist in prior builds for us (upgraded from alpha17 to beta3 and then beta4). Are there any specific log extracts I can supply that can help someone pinpoint the problem? log.smbd seems to indicate the following: [2012/07/06 13:52:36.425367, 0] ../source3/lib/util.c:974(log_stack_trace) BACKTRACE: 27 stack frames: #0 /usr/local/samba/lib/libsmbconf.so.0(log_stack_trace+0x1f) [0x7f37c35011df] #1 /usr/local/samba/lib/libsmbconf.so.0(smb_panic_s3+0x6d) [0x7f37c350105d] #2 /usr/local/samba/lib/libsamba-util.so.0(smb_panic+0x28) [0x7f37c5323aee] #3 /usr/local/samba/lib/private/libsmbd_base.so(+0x129b89) [0x7f37c4ac6b89] #4 /usr/local/samba/lib/private/libsmbd_base.so(+0x129ea9) [0x7f37c4ac6ea9] #5 /usr/local/samba/lib/private/libsmbd_base.so(+0x12c769) [0x7f37c4ac9769] #6 /usr/local/samba/lib/private/libsmbd_base.so(+0x130045) [0x7f37c4acd045] #7 /usr/local/samba/lib/private/libsmbd_base.so(create_file_default+0x2f8) [0x7f37c4acdb7f] #8 /usr/local/samba/lib/private/libsmbd_base.so(+0x23f813) [0x7f37c4bdc813] #9 /usr/local/samba/lib/private/libsmbd_base.so(smb_vfs_call_create_file+0xcb) [0x7f37c4ad8fc8] #10 /usr/local/samba/lib/private/libsmbd_base.so(+0x1771b2) [0x7f37c4b141b2] #11 /usr/local/samba/lib/private/libsmbd_base.so(smbd_smb2_request_process_create+0x7ac) [0x7f37c4b1224c] #12 /usr/local/samba/lib/private/libsmbd_base.so(smbd_smb2_request_dispatch+0x6fe) [0x7f37c4b0a42d] #13 /usr/local/samba/lib/private/libsmbd_base.so(+0x1781ce) [0x7f37c4b151ce] #14 /usr/local/samba/lib/private/libtevent.so.0(tevent_common_loop_immediate+0x1f9) [0x7f37c376a090] #15 /usr/local/samba/lib/libsmbconf.so.0(run_events_poll+0x57) [0x7f37c351d23f] #16 /usr/local/samba/lib/libsmbconf.so.0(+0x44ac2) [0x7f37c351dac2] #17 /usr/local/samba/lib/private/libtevent.so.0(_tevent_loop_once+0xe8) [0x7f37c376918f] #18 /usr/local/samba/lib/private/libsmbd_base.so(smbd_process+0x10ed) [0x7f37c4af4569] #19 /usr/local/samba/sbin/smbd() [0x409c48] #20 /usr/local/samba/lib/libsmbconf.so.0(run_events_poll+0x71a) [0x7f37c351d902] #21 /usr/local/samba/lib/libsmbconf.so.0(+0x44ba2) [0x7f37c351dba2] #22 /usr/local/samba/lib/private/libtevent.so.0(_tevent_loop_once+0xe8) [0x7f37c376918f] #23 /usr/local/samba/sbin/smbd() [0x40a838] #24 /usr/local/samba/sbin/smbd(main+0x14b9) [0x40be42] #25 /lib/libc.so.6(__libc_start_main+0xfd) [0x7f37c1e02c8d] #26 /usr/local/samba/sbin/smbd() [0x405969] [2012/07/06 13:52:36.430994, 0] ../source3/lib/util.c:875(smb_panic_s3) but I'm honestly not good enough to dissect the problem. Regards , /Dieter H?lsningar Dieter Modig
Andrew Bartlett
2012-Aug-18 06:38 UTC
[Samba] Problem with heaps of sleeping smb processes due to panic action
On Tue, 2012-08-14 at 15:21 +0200, Dieter Modig wrote:> Hi! > > We're running Samba4 (Version 4.0.0beta4) and are experiencing problems with smb_panic actions which result in loads of sleep processes in the end taking down the entire machine. This problem did not exist in prior builds for us (upgraded from alpha17 to beta3 and then beta4). Are there any specific log extracts I can supply that can help someone pinpoint the problem? log.smbd seems to indicate the following: > > [2012/07/06 13:52:36.425367, 0] ../source3/lib/util.c:974(log_stack_trace) > BACKTRACE: 27 stack frames: > #0 /usr/local/samba/lib/libsmbconf.so.0(log_stack_trace+0x1f) [0x7f37c35011df] > #1 /usr/local/samba/lib/libsmbconf.so.0(smb_panic_s3+0x6d) [0x7f37c350105d] > #2 /usr/local/samba/lib/libsamba-util.so.0(smb_panic+0x28) [0x7f37c5323aee] > #3 /usr/local/samba/lib/private/libsmbd_base.so(+0x129b89) [0x7f37c4ac6b89] > #4 /usr/local/samba/lib/private/libsmbd_base.so(+0x129ea9) [0x7f37c4ac6ea9] > #5 /usr/local/samba/lib/private/libsmbd_base.so(+0x12c769) [0x7f37c4ac9769] > #6 /usr/local/samba/lib/private/libsmbd_base.so(+0x130045) [0x7f37c4acd045] > #7 /usr/local/samba/lib/private/libsmbd_base.so(create_file_default+0x2f8) [0x7f37c4acdb7f] > #8 /usr/local/samba/lib/private/libsmbd_base.so(+0x23f813) [0x7f37c4bdc813] > #9 /usr/local/samba/lib/private/libsmbd_base.so(smb_vfs_call_create_file+0xcb) [0x7f37c4ad8fc8] > #10 /usr/local/samba/lib/private/libsmbd_base.so(+0x1771b2) [0x7f37c4b141b2] > #11 /usr/local/samba/lib/private/libsmbd_base.so(smbd_smb2_request_process_create+0x7ac) [0x7f37c4b1224c] > #12 /usr/local/samba/lib/private/libsmbd_base.so(smbd_smb2_request_dispatch+0x6fe) [0x7f37c4b0a42d] > #13 /usr/local/samba/lib/private/libsmbd_base.so(+0x1781ce) [0x7f37c4b151ce] > #14 /usr/local/samba/lib/private/libtevent.so.0(tevent_common_loop_immediate+0x1f9) [0x7f37c376a090] > #15 /usr/local/samba/lib/libsmbconf.so.0(run_events_poll+0x57) [0x7f37c351d23f] > #16 /usr/local/samba/lib/libsmbconf.so.0(+0x44ac2) [0x7f37c351dac2] > #17 /usr/local/samba/lib/private/libtevent.so.0(_tevent_loop_once+0xe8) [0x7f37c376918f] > #18 /usr/local/samba/lib/private/libsmbd_base.so(smbd_process+0x10ed) [0x7f37c4af4569] > #19 /usr/local/samba/sbin/smbd() [0x409c48] > #20 /usr/local/samba/lib/libsmbconf.so.0(run_events_poll+0x71a) [0x7f37c351d902] > #21 /usr/local/samba/lib/libsmbconf.so.0(+0x44ba2) [0x7f37c351dba2] > #22 /usr/local/samba/lib/private/libtevent.so.0(_tevent_loop_once+0xe8) [0x7f37c376918f] > #23 /usr/local/samba/sbin/smbd() [0x40a838] > #24 /usr/local/samba/sbin/smbd(main+0x14b9) [0x40be42] > #25 /lib/libc.so.6(__libc_start_main+0xfd) [0x7f37c1e02c8d] > #26 /usr/local/samba/sbin/smbd() [0x405969] > [2012/07/06 13:52:36.430994, 0] ../source3/lib/util.c:875(smb_panic_s3) > > but I'm honestly not good enough to dissect the problem.In developer mode, the default panic action is to run 'sleep' so you can attach with a debugger (see testparm -v output). To instead produce a stack trace that we can use, get 'gdb_backtrace' from selftest/gdb_backtrace and set in your smb.conf: panic action = /path/to/gdb_backtrace %d I've CC'ed metze, one of the key developers working on the smbd file server to see if he wants to persue this with you further on beta4. Otherwise, please update to current master as this is a fast-moving area that may have already been fixed. Andrew Bartlett -- Andrew Bartlett http://samba.org/~abartlet/ Authentication Developer, Samba Team http://samba.org