Bug 1983 - alloc_sub_basic: NULL source string
Summary: alloc_sub_basic: NULL source string
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: File Services (show other bugs)
Version: 3.0.9
Hardware: All Linux
: P3 normal
Target Milestone: none
Assignee: Samba Bugzilla Account
QA Contact: Samba QA Contact
Depends on:
Reported: 2004-11-01 11:37 UTC by Andreas Hasenack (mail address dead)
Modified: 2005-08-24 10:18 UTC (History)
0 users

See Also:

level 10 debug (72.75 KB, text/plain)
2004-11-01 11:43 UTC, Andreas Hasenack (mail address dead)
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Hasenack (mail address dead) 2004-11-01 11:37:21 UTC
I'm getting a segfault when performing a certain operation (described below).
I'm not sure what exactly triggers this, although it seems to be the removal of
the [homes] section combined with a sighup signal. So, here it goes:

1) I start with this simple smb.conf file:
        workgroup = TESTING
        server string = Testing server
        log file = /var/log/samba/%m.log
        max log size = 50
        log level = 1
        name resolve order = lmhosts bcast
        unix charset = iso-8859-1
        security = user
        passdb backend = tdbsam

        path = /data
        browseable = yes
        writable = yes

       browseable = no
       writable = yes

2) start samba (smbd and nmbd) and run "smbclient -L pandora -N" (pandora is the
machine's netbios name). It works.

3) Edit smb.conf and comment the [homes] section:
        browseable = yes
        writable = yes

#       browseable = no
#       writable = yes

4) issue "smbcontrol smbd reload-config"

5) Run "smbclient -L pandora -N" again. This time it fails:
# smbclient -L pandora -N
Anonymous login successful
Domain=[TESTING] OS=[Unix] Server=[Samba 3.0.8pre2]

        Sharename       Type      Comment
        ---------       ----      -------
Error returning browse list: Call returned zero bytes (EOF)
Anonymous login successful

6) The logs show (I'll add a level 10 debug to this ticket):
[2004/11/01 15:36:52, 0] lib/substitute.c:alloc_sub_basic(507)
  alloc_sub_basic: NULL source string!  This should not happen
[2004/11/01 15:36:52, 0] lib/fault.c:fault_report(36)
[2004/11/01 15:36:52, 0] lib/fault.c:fault_report(37)
  INTERNAL ERROR: Signal 11 in pid 22468 (3.0.8pre2)
  Please read the appendix Bugs of the Samba HOWTO collection
[2004/11/01 15:36:52, 0] lib/fault.c:fault_report(39)
[2004/11/01 15:36:52, 0] lib/util.c:smb_panic2(1403)
  PANIC: internal error
[2004/11/01 15:36:52, 0] lib/util.c:smb_panic2(1411)
  BACKTRACE: 14 stack frames:
   #0 smbd(smb_panic2+0x7c) [0x81e165c]
   #1 smbd(smb_panic+0x1a) [0x81e185a]
   #2 smbd [0x81ce458]
   #3 [0xffffe420]
   #4 smbd(push_ascii_fstring+0x2a) [0x81cc4fa]
   #5 smbd [0x80910d2]
   #6 smbd(api_reply+0x23a) [0x8095e7a]
   #7 smbd(reply_trans+0x5f4) [0x808cc44]
   #8 smbd [0x80d3844]
   #9 smbd(process_smb+0x16a) [0x80d3c2a]
   #10 smbd(smbd_process+0x145) [0x80d4915]
   #11 smbd(main+0x4e7) [0x8257fe7]
   #12 /lib/tls/libc.so.6(__libc_start_main+0xe0) [0xb7c23e20]
   #13 smbd [0x80786d1]
Comment 1 Andreas Hasenack (mail address dead) 2004-11-01 11:43:06 UTC
Created attachment 749 [details]
level 10 debug

started smb with the smb.conf first showed in this ticket, then edited smb.conf
to comment the [homes] share as explained, ran smbcontrol smbd reload-config
and then smbclient -L pandora -N.
Comment 2 Gerald (Jerry) Carter (dead mail address) 2005-02-07 09:32:37 UTC
originally reported against 3.0.8pre2.  Should be fixed in 3.0.11.
Comment 3 Gerald (Jerry) Carter (dead mail address) 2005-02-08 21:13:45 UTC
Comment 4 Gerald (Jerry) Carter (dead mail address) 2005-08-24 10:18:19 UTC
sorry for the same, cleaning up the database to prevent unecessary reopens of bugs.