PANIC: internal error (usershare related)

Bug #407297 reported by iroli
28
This bug affects 4 people
Affects Status Importance Assigned to Milestone
samba
Invalid
Medium
samba (Ubuntu)
Invalid
Medium
Unassigned

Bug Description

Binary package hint: samba

I've set up a samba usershare in ubuntu 9.04 using samba 2:3.3.2-1ubuntu3.1

[snip]
cat /var/lib/samba/usershares/us
#VERSION 2
path=/home/lezuo/Desktop/us
comment=
usershare_acl=S-1-1-0:F
guest_ok=n
[snap]

which _IS_ working as I can write/read files on it. I have a visual studio source project hosted there. Every few minutes a "data loss on write" message appears in windows. It is always affecting the projects .ncb file. Each time this message appears the following lines appear in /var/log/samba/log.workstation:

[2009/07/31 11:37:14, 0] param/loadparm.c:process_usershare_file(8322)
  process_usershare_file: stat of /var/lib/samba/usershares/us failed. Permission denied
[2009/07/31 11:37:21, 0] param/loadparm.c:process_usershare_file(8322)
  process_usershare_file: stat of /var/lib/samba/usershares/us failed. Permission denied
[2009/07/31 11:37:21, 0] lib/substitute.c:alloc_sub_basic(561)
  alloc_sub_basic: NULL source string! This should not happen
[2009/07/31 11:37:21, 0] lib/substitute.c:alloc_sub_basic(561)
  alloc_sub_basic: NULL source string! This should not happen
[2009/07/31 11:37:21, 0] lib/fault.c:fault_report(40)
  ===============================================================
[2009/07/31 11:37:21, 0] lib/fault.c:fault_report(41)
  INTERNAL ERROR: Signal 11 in pid 7287 (3.3.2)
  Please read the Trouble-Shooting section of the Samba3-HOWTO
[2009/07/31 11:37:21, 0] lib/fault.c:fault_report(43)

  From: http://www.samba.org/samba/docs/Samba3-HOWTO.pdf
[2009/07/31 11:37:21, 0] lib/fault.c:fault_report(44)
  ===============================================================
[2009/07/31 11:37:21, 0] lib/util.c:smb_panic(1673)
  PANIC (pid 7287): internal error
[2009/07/31 11:37:21, 0] lib/util.c:log_stack_trace(1777)
  BACKTRACE: 12 stack frames:
   #0 /usr/sbin/smbd(log_stack_trace+0x2d) [0xb7c6917c]
   #1 /usr/sbin/smbd(smb_panic+0x80) [0xb7c692d9]
   #2 /usr/sbin/smbd [0xb7c54c7e]
   #3 [0xb7a9c400]
   #4 /usr/sbin/smbd [0xb7ec009a]
   #5 /usr/sbin/smbd [0xb7ecb91d]
   #6 /usr/sbin/smbd(reply_trans2+0x69f) [0xb7ecdba4]
   #7 /usr/sbin/smbd [0xb7b64bf0]
   #8 /usr/sbin/smbd(smbd_process+0xf44) [0xb7b66c2c]
   #9 /usr/sbin/smbd(main+0x1126) [0xb7b2e2ff]
   #10 /lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe5) [0xb7633775]
   #11 /usr/sbin/smbd [0xb7b2b071]
[2009/07/31 11:37:21, 0] lib/util.c:smb_panic(1678)
  smb_panic(): calling panic action [/usr/share/samba/panic-action 7287]
[2009/07/31 11:37:21, 0] lib/util.c:smb_panic(1686)
  smb_panic(): action returned status 0
[2009/07/31 11:37:21, 0] lib/fault.c:dump_core(231)
  dumping core in /var/log/samba/cores/smbd
[2009/07/31 11:37:25, 0] param/loadparm.c:process_usershare_file(8322)
  process_usershare_file: stat of /var/lib/samba/usershares/us failed. Permission denied
[2009/07/31 11:37:30, 0] lib/substitute.c:alloc_sub_basic(561)
  alloc_sub_basic: NULL source string! This should not happen

I've tried to debug it further but was unable to obtain a coredump / attach a debugger. The "Permission denied" messages appears a few times when samba recorvers (sometimes just once, sometimes 3 times - I suspect some race here?).

Revision history for this message
iroli (roland-lezuo) wrote :

When activating [homes] and accessing the files through this share no data loss on write errors occure on the visual studio side. Also the speed when accessing the files is increased. The bug seems to be in the usershare mechanism.

Revision history for this message
Thierry Carrez (ttx) wrote :

Did you experience the same issue with older releases ?

Changed in samba (Ubuntu):
importance: Undecided → Medium
status: New → Incomplete
Revision history for this message
iroli (roland-lezuo) wrote :

I dud not use this feature in any older releases.

Thierry Carrez (ttx)
Changed in samba (Ubuntu):
status: Incomplete → New
Revision history for this message
Chuck Short (zulcss) wrote :

If possible can you try to reproduce this issue with Karmic?

Thanks
chuck

Changed in samba (Ubuntu):
status: New → Incomplete
Revision history for this message
iroli (roland-lezuo) wrote :

I downloaded karmic alpha4 and installed samba as well as samba-common-bin and created the usershare using nautilus.

I can not access the share from my windows system, /var/log/samba/log.windowsmachine is full of:

process_usershare_file: sttat of /var/lib/samba/usershare/foo failed. Permission denied

I doubel checked, /var/lib/samba/usershare/foo is o+r so it seems the feature is more broken so I can't test if it is still crashing.
I'll retry with updated karmic shortly.

Revision history for this message
iroli (roland-lezuo) wrote :
Download full text (3.4 KiB)

Okay, I dist-upgraded a few minutes ago, allowed guest acces (using nautilus) and could connect to the share. I tried some Visual Studio compilations and crash message appears in the log file.

I paste a crashdump from karmic:

  alloc_sub_basic: NULL source string! This should not happen
[2009/09/04 09:13:02, 0] lib/fault.c:41(fault_report)
  ===============================================================
[2009/09/04 09:13:02, 0] lib/fault.c:42(fault_report)
  INTERNAL ERROR: Signal 11 in pid 3015 (3.4.0)
  Please read the Trouble-Shooting section of the Samba3-HOWTO
[2009/09/04 09:13:02, 0] lib/fault.c:44(fault_report)

  From: http://www.samba.org/samba/docs/Samba3-HOWTO.pdf
[2009/09/04 09:13:02, 0] lib/fault.c:45(fault_report)
  ===============================================================
[2009/09/04 09:13:02, 0] lib/util.c:1480(smb_panic)
  PANIC (pid 3015): internal error
[2009/09/04 09:13:02, 0] lib/util.c:1584(log_stack_trace)
  BACKTRACE: 20 stack frames:
   #0 /usr/sbin/smbd(log_stack_trace+0x2d) [0x703ecd]
   #1 /usr/sbin/smbd(smb_panic+0x2d) [0x703fed]
   #2 /usr/sbin/smbd [0x6f192e]
   #3 [0x12f400]
   #4 /usr/sbin/smbd(str_checksum+0xd) [0x7012bd]
   #5 /usr/sbin/smbd [0x4dae2c]
   #6 /usr/sbin/smbd [0x4e738b]
   #7 /usr/sbin/smbd(reply_trans2+0x706) [0x4e8956]
   #8 /usr/sbin/smbd [0x50c89e]
   #9 /usr/sbin/smbd [0x50cd1d]
   #10 /usr/sbin/smbd [0x50d520]
   #11 /usr/sbin/smbd(run_events+0x12e) [0x7152de]
   #12 /usr/sbin/smbd(smbd_process+0x7b9) [0x50c129]
   #13 /usr/sbin/smbd [0x9e4918]
   #14 /usr/sbin/smbd(run_events+0x12e) [0x7152de]
   #15 /usr/sbin/smbd [0x71557f]
   #16 /usr/sbin/smbd(_tevent_loop_once+0x79) [0x715b79]
   #17 /usr/sbin/smbd(main+0xc88) [0x9e5638]
   #18 /lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe6) [0xb7f77b56]
   #19 /usr/sbin/smbd [0x487ac1]
[2009/09/04 09:13:02, 0] lib/util.c:1485(smb_panic)
  smb_panic(): calling panic action [/usr/share/samba/panic-action 3015]
[2009/09/04 09:13:02, 0] lib/util.c:1493(smb_panic)
  smb_panic(): action returned status 0
[2009/09/04 09:13:02, 0] lib/fault.c:321(dump_core)
  dumping core in /var/log/samba/cores/smbd
[2009/09/04 09:13:02, 1] smbd/service.c:1043(make_connection_snum)
  w004d038 (::ffff:148.198.114.89) connect to service foo initially as user nobody (uid=65534, gid=65534) (pid 3030)
[2009/09/04 09:13:06, 0] param/loadparm.c:8541(process_usershare_file)
  process_usershare_file: stat of /var/lib/samba/usershares/foo failed. Permission denied
[2009/09/04 09:13:07, 0] lib/substitute.c:560(alloc_sub_basic)
  alloc_sub_basic: NULL source string! This should not happen
[2009/09/04 09:13:07, 0] lib/substitute.c:560(alloc_sub_basic)
  alloc_sub_basic: NULL source string! This should not happen
[2009/09/04 09:13:11, 0] param/loadparm.c:8541(process_usershare_file)
  process_usershare_file: stat of /var/lib/samba/usershares/.git failed. Permission denied
[2009/09/04 09:13:11, 0] param/loadparm.c:8541(process_usershare_file)
  process_usershare_file: stat of /var/lib/samba/usershares/.git failed. No such file or directory
[2009/09/04 09:13:11, 0] smbd/service.c:1184(make_connection)
  w004d038 (::ffff:148.198.114.89) couldn't find ser...

Read more...

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

Thank you for your bug report. This bug has been reported to the developers of the software. You can track it and make comments at:

https://bugzilla.samba.org/show_bug.cgi?id=6725

Changed in samba (Ubuntu):
status: Incomplete → Triaged
Revision history for this message
iroli (roland-lezuo) wrote :

Answering the upstream bugtracker question, Chuck could you forward, I don't have an account at samba.org, thx!

$ ls -la /var/lib/samba/usershares/
total 20
drwxrwx--T 2 root sambashare 4096 2009-09-22 08:39 .
drwxr-xr-x 5 root root 4096 2009-06-05 09:56 ..
-rw-r--r-- 1 lezuo lezuo 76 2009-07-15 15:48 _svns
-rw-r--r-- 1 lezuo lezuo 83 2009-09-22 08:39 us
-rw-r--r-- 1 lezuo lezuo 82 2009-06-10 14:27 workspace

The us share itself:

$ ls -la Desktop/us/
total 14028
drwxrwxrwx 24 lezuo lezuo 4096 2009-09-02 13:50 .
drwxr-xr-x 8 lezuo lezuo 4096 2009-08-28 10:44 ..
-rw-r--r-- 1 lezuo lezuo 20607 2009-09-01 17:29 aclocal.m4
drwxr-xr-x 6 lezuo lezuo 4096 2009-09-07 13:10 appl

and smb.conf:

[global]
   workgroup = WORKGROUP
   server string = %h server (Samba, Ubuntu)
   dns proxy = no
log level = 0
   log file = /var/log/samba/log.%m
   max log size = 1000
   syslog = 0
   panic action = /usr/share/samba/panic-action %d
   encrypt passwords = true
   passdb backend = tdbsam
   obey pam restrictions = yes
   unix password sync = yes
   passwd program = /usr/bin/passwd %u
   passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
   pam password change = yes
   map to guest = bad user
   usershare allow guests = yes
[homes]
   comment = Home Directories
   browseable = no
   read only = no
[printers]
   comment = All Printers
   browseable = no
   path = /var/spool/samba
   printable = yes
   guest ok = no
   read only = yes
   create mask = 0700
[print$]
   comment = Printer Drivers
   path = /var/lib/samba/printers
   browseable = yes
   read only = yes
   guest ok = no

Changed in samba:
status: Unknown → Confirmed
Changed in samba:
status: Confirmed → Invalid
Changed in samba:
importance: Unknown → Medium
Revision history for this message
Maarten Bezemer (veger) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. There have been many changes in Ubuntu since that time you reported the bug and your problem may have been fixed with some of the updates. It would help us a lot if you could test it on a currently supported Ubuntu version. When you test it and it is still an issue, kindly upload the updated logs by running apport-collect 407297 and any other logs that are relevant for this particular issue.

Changed in samba (Ubuntu):
status: Triaged → Incomplete
Revision history for this message
Bryan Quigley (bryanquigley) wrote :

This should have expired already, closing.

Changed in samba (Ubuntu):
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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