Bug 5688 - LPQ process is orphaned if socket address parameter is invalid
Summary: LPQ process is orphaned if socket address parameter is invalid
Alias: None
Product: Samba 3.2
Classification: Unclassified
Component: File services (show other bugs)
Version: 3.2.5
Hardware: All Solaris
: P3 normal
Target Milestone: ---
Assignee: Samba Bugzilla Account
QA Contact: Samba QA Contact
Depends on:
Reported: 2008-08-13 04:08 UTC by SATOH Fumiyasu
Modified: 2009-05-11 06:14 UTC (History)
0 users

See Also:

Interpret null string "socket address" as (478 bytes, patch)
2008-08-13 04:29 UTC, SATOH Fumiyasu
no flags Details
LPQ process can detect parent smbd died (2.30 KB, patch)
2008-12-09 04:11 UTC, SATOH Fumiyasu
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description SATOH Fumiyasu 2008-08-13 04:08:44 UTC
# uname -a
SunOS blade 5.10 Generic_127111-11 sun4u sparc SUNW,Sun-Blade-1000

# testparm -v -s 2>&1|grep "socket address"                                                                                          
        socket address =                                ***1***
# ps -ef |grep smbd |grep -v grep                       ***2***

# time /usr/sbin/smbd -F
real    0m0.269s                                        ***3***
user    0m0.088s
sys     0m0.081s

# cat /var/log/samba/log.smbd
[2008/08/13 17:41:54,  0] smbd/server.c:(1208)
  smbd version 3.2.1-16.sol10 started.
  Copyright Andrew Tridgell and the Samba Team 1992-2008
[2008/08/13 17:41:54,  3, pid=4323, effective(0, 0), real(0, 0)] printing/printing.c:(1397)
  start_background_queue: Starting background LPQ thread
[2008/08/13 17:41:54,  0, pid=4323, effective(0, 0), real(0, 0)] smbd/server.c:(547)
  open_sockets_smbd: No sockets available to bind to.   ***4***
[2008/08/13 17:41:54,  5, pid=4326, effective(0, 0), real(0, 0)] printing/printing.c:(1407)
  start_background_queue: background LPQ thread started ***5***

# ps -ef |grep smbd |grep -v grep                       ***6***
    root  4326     1   0 17:41:55 pts/1       0:00 /usr/sbin/smbd -F -d10

  The "socket address" parameter has null string
  that is invalid value for Samba 3.2 but valid for Samba 3.0.
  No output, i.e. no smbd process is running.
  Starting smbd in foreground, but aborted immediately.
  The main (parent) smbd process was aborted here.
***5***, ***6***
  The LPQ smbd process is remained.

This problem can be reproduced with "smbd -D" instead of "smbd -F",
but cannot be reproduced on CentOS 4 (i386).
Comment 1 SATOH Fumiyasu 2008-08-13 04:29:56 UTC
Created attachment 3469 [details]
Interpret null string "socket address" as
Comment 2 Jeremy Allison 2008-08-13 18:47:54 UTC
Correct - thanks ! Pushed for 3.2.2.
Comment 3 SATOH Fumiyasu 2008-12-09 04:11:58 UTC
Created attachment 3795 [details]
LPQ process can detect parent smbd died

This patch fixes a problem that smbd process for LPQ thread is
orphaned if (a) the parent smbd is aborted (e.g. SIGKILL, abort(3)
and so on), or (b) the "socket address" parameter has invalid value.
Comment 4 SATOH Fumiyasu 2008-12-09 04:14:47 UTC
Please see the Comment #3. This bug is NOT fixed completely.
Comment 5 Jeremy Allison 2008-12-09 16:33:06 UTC
Applied (minus the "static" on the pipes array, not needed and I'm trying to reduce our static footprint).

Thanks !

Comment 6 Karolin Seeger 2009-05-11 06:14:41 UTC
Closing out bug report.

Thanks for reporting!