smbd panic using root postexec

Bug #524450 reported by Chris Weiss
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
samba (Ubuntu)
Triaged
Medium
Unassigned

Bug Description

Binary package hint: samba

Using ubuntu 9.04, samba 3.3.2, package version 2:3.3.2-1ubuntu3.3
I have some shares for which I use a "root preexec" and "root postexec" to loop mount and unmount an ISO for so I can share some CDrom instead of carrying them all over the place or extracting them (I also mount them from VMWare so i want to keep them as ISO's) and this setup has been working great on 8.04 with samba 3.0.28a.

on 9.04, the preexec works, but on disconnecting from the share the postexec doesn't seem to fire (or at least the loop mounted ISO doesn't get unmounted) and smbd panics. Running my postexec script manually does work. I've attached the log that shows the panic.

in the log you can me trying 2 shares, both are defined the same way, but the 2nd has a "force user=root" in an attempt to see if it's an odd permissions issue.

Revision history for this message
Chris Weiss (cweiss) wrote :
Revision history for this message
Chuck Short (zulcss) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. Unfortunately we can't fix it without more information.

Please include the information requested at https://wiki.ubuntu.com/DebuggingSamba#samba-client.

Changed in samba (Ubuntu):
importance: Undecided → Medium
status: New → Incomplete
Revision history for this message
Chris Weiss (cweiss) wrote :
Revision history for this message
Chris Weiss (cweiss) wrote :

libwbclient0 2:3.3.2-1ubuntu3.3 samba install ok installed
samba 2:3.3.2-1ubuntu3.3 install ok installed
samba-common 2:3.3.2-1ubuntu3.3 samba install ok installed
smbclient 2:3.3.2-1ubuntu3.3 samba install ok installed
winbind 2:3.3.2-1ubuntu3.3 samba install ok installed

windows client, no errors on client. I get an email from the panic action script and the ISO is not unmounted

same exact same conf file works on 8.04 with:

samba 3.0.28a-1ubuntu4.10 install ok installed
samba-common 3.0.28a-1ubuntu4.10 samba install ok installed
samba-doc 3.0.28a-1ubuntu4.10 samba install ok installed
smbclient 3.0.28a-1ubuntu4.10 samba install ok installed
smbfs 3.0.28a-1ubuntu4.10 samba install ok installed
swat 3.0.28a-1ubuntu4.10 samba install ok installed
webmin-samba 1.180-3 webmin-optional deinstall ok config-files
winbind 3.0.28a-1ubuntu4.10 samba install ok installed

the only log file with any messages at all is already posted.

Revision history for this message
Chuck Short (zulcss) wrote :

Can you give complete details on how I can reproduce this on lucid if possible.

Thanks
chuck

Changed in samba (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Chris Weiss (cweiss) wrote :

You'll need some cd iso's in a directory, then see my "samba.conf" for how i create the shares. the share names should match the iso file name but add a "iso-" prefix. the mount and unmount scripts will handle creating the share directories and loop mounting and unmounting the iso files to it

I've not tried it on a different 9.04 or 9.10 yet though and I suspect i may have a different problem. I decided to go production with this server anyway, and I have an old application that runs on NT4 IIS that uses an IIS virtual directory to a UNC path that is just a normal samba share, no pre/post-exec's, on this server and it too is panicing smbd in exactly the same way. No other shares or clients are causing panics.

the behavior is a little different, the share still works initially but seems to call the panic action quite often, possibly when IIS decides the share is idle and disconnects it, and it will usually reconnect on the next access, but so far once a day it will not reconnect requiring a restart of the IIS admin service. This setup has been working perfectly (as far as I know) for many years, starting with samba 2.4.x on Debian Sarge and with various Ubuntu and samba versions since.

The common factor it seem is when windows disconnects from a share without a full system logoff or shutdown. Is there a way to increase logging for just a single share to get more data? I have 50 clients PC's on this now so a system wide log level increase will make a hell of a lot of noise.

Revision history for this message
Chuck Short (zulcss) wrote :

Can you install the smb-dbg package and try to get a better stack trace?

Thanks
chuck

Changed in samba (Ubuntu):
status: Confirmed → Triaged
Revision history for this message
Chris Weiss (cweiss) wrote :

now I've just getting this

The Samba 'panic action' script, /usr/share/samba/panic-action,
was called for PID 25021 ().

This means there was a problem with the program, such as a segfault.
However, the executable could not be found for process 25021.
It may have died unexpectedly, or you may not have permission to debug
the process.

panic action should run as root right?

log has this

[2010/05/04 08:56:44, 0] lib/fault.c:fault_report(40)
  ===============================================================
[2010/05/04 08:56:44, 0] lib/fault.c:fault_report(41)
  INTERNAL ERROR: Signal 11 in pid 25021 (3.3.2)
  Please read the Trouble-Shooting section of the Samba3-HOWTO
[2010/05/04 08:56:44, 0] lib/fault.c:fault_report(43)

  From: http://www.samba.org/samba/docs/Samba3-HOWTO.pdf
[2010/05/04 08:56:44, 0] lib/fault.c:fault_report(44)
  ===============================================================
[2010/05/04 08:56:44, 0] lib/util.c:smb_panic(1673)
  PANIC (pid 25021): internal error
[2010/05/04 08:56:44, 0] lib/util.c:log_stack_trace(1777)
  BACKTRACE: 11 stack frames:
   #0 /usr/sbin/smbd(log_stack_trace+0x2d) [0xb7cb939c]
   #1 /usr/sbin/smbd(smb_panic+0x80) [0xb7cb94f9]
   #2 /usr/sbin/smbd [0xb7ca4e9e]
   #3 [0xb7aec400]
   #4 /usr/sbin/smbd(copy_serverinfo+0x6a) [0xb7cfd984]
   #5 /usr/sbin/smbd(change_to_user+0x3e5) [0xb7b98b95]
   #6 /usr/sbin/smbd [0xb7bb4b78]
   #7 /usr/sbin/smbd(smbd_process+0xf58) [0xb7bb6dcc]
   #8 /usr/sbin/smbd(main+0x1126) [0xb7b7e32f]
   #9 /lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe5) [0xb7691775]
   #10 /usr/sbin/smbd [0xb7b7b0a1]
[2010/05/04 08:56:44, 0] lib/util.c:smb_panic(1678)
  smb_panic(): calling panic action [/usr/share/samba/panic-action 25021]
[2010/05/04 08:56:45, 0] lib/util.c:smb_panic(1686)
  smb_panic(): action returned status 0
[2010/05/04 08:56:45, 0] lib/fault.c:dump_core(231)
  dumping core in /var/log/samba/cores/smbd

I'm hesitant to attach a core publicly since this is a production system and it looks like it contains some private data like usernames and groups and my full smb.conf. can I extract anything useful from it?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.