Bug 255 - nmbd fails to remove pid fail on shutdown
Summary: nmbd fails to remove pid fail on shutdown
Status: RESOLVED LATER
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: nmbd (show other bugs)
Version: 3.0.0preX
Hardware: All FreeBSD
: P4 trivial
Target Milestone: none
Assignee: Samba Bugzilla Account
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-07-26 21:16 UTC by Carsten Menke
Modified: 2005-02-07 08:41 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Carsten Menke 2003-07-26 21:16:04 UTC
I have had a hard time to figure out, why I could see the Samba Server only part
of the time,
while not changing the configuration or anything else. Today I could see the
Samba Server 2 Times, but the rest it doesn't even appear in the Network
Neighborhood, and I get a failures like "Network path not found" despite of
seeing the Workgroup of the SMB PDC.

After inspecting the log files I saw a lot of these errors on my
FreeBSD-4.8-STABLE System

###################################################
fcntl_lock: fcntl lock gave errno 35 (Resource temporarily unavailable)
fcntl_lock: lock failed at offset 0 count 1 op 8 type 1 (Resource temporarily
unavailable)
###################################################

Also I remared that when I start nmbd manually with nmbd -D
it always starts 2 instances

#######################################################
root    38498  0.0  0.6  4176 2308  ??  Is    5:42AM   0:00.12
/usr/local/samba/sbin/nmbd -D
root    38571  0.0  0.6  4176 2308  ??  I     6:06AM   0:00.00
/usr/local/samba/sbin/nmbd -D
#######################################################

killall -15 nmbd
also doesn't remove the pidfile in /var/run

I compiled Samba (this time) with the following options:

########################################################
/configure --with-fhs --with-configdir=/etc/samba --with-logfilebase=/var/log
--with-privatedir=/etc/samba/private --with-piddir=/var/run
--with-swatdir=/etc/samba/swat --enable-cups
######################################################


The configfile contains this:

######################################################
[global]
        workgroup = PLASMATREAT
        netbios name = HAUPTSERVER
        server string = Server
        security = user
        debug level = 3
        passdb backend = tdbsam,guest
        username map = /etc/samba/user.map
        add user script = /usr/sbin/pw useradd -n %u -c 'Windows Domain User' -g
samba -s /nonexistent
        add machine script =  /usr/sbin/pw useradd -n %u -c 'Windows Machine' -g
samba -s /nonexistent
        add group script = /usr/sbin/pw groupadd %g
        delete user script = /usr/sbin/pw userdel %u
        log file = /var/log/log.smbd
        encrypt passwords = yes
        max log size = 50
        os level = 64
        root directory = /home/samba
        preferred master = Yes
        domain master = Yes
        domain logons = Yes
        wins support = Yes

[homes]
        comment = Home Directories
        read only = No
        browseable = No

[test]
      comment = Test Share
      read only = No
      browseable = yes
      path = /home/samba

[netlogon]
     comment = Adminstrative Netlogon share
     read only = no
     browseable = no
     path = /home/samba/netlogon

[printers]
        comment = All Printers
        path = /usr/spool/samba
        printable = Yes
        browseable = No
#######################################################
Comment 1 Carsten Menke 2003-07-27 07:18:25 UTC
#### Changing priority and Summary  ####

The log files still show this, but the cause for the originally described
symptom is another (So the bug is present)

I found out that this behviour of "completly not operating due to this" has
another cause, 
though I know that zonealarm personal firewall may cause problems, I completly
shut it down, and disabled it from starting up automatically, I also disabled
the "True Vector' service.

But the cause lied here, obiously it was still blocking the ports, more
strangely sometimes I could see the Samba machine, and a minuter after not. Only
uninstalling ZoneAlarm solved the problem. This is the second time I have such a
big problem with ZoneAlarm, so in future I will rely on my OpenBSD firewall only.

Comment 2 Gerald (Jerry) Carter (dead mail address) 2003-09-26 07:36:21 UTC
2 nmbd instances is normal when

  wins support = yes
  dns proxy = yes ( default )

to prevent nmbd from stalling on dns lookups.

I'll look into the removal of pid files on 
shutdown.
Comment 3 Gerald (Jerry) Carter (dead mail address) 2003-12-12 08:27:58 UTC
reseting target milestone.  3.0.1 has been frozen.  WIll have to 
re-evaluate these.
Comment 4 Gerald (Jerry) Carter (dead mail address) 2005-02-05 07:47:12 UTC
later.
Comment 5 Gerald (Jerry) Carter (dead mail address) 2005-02-07 08:41:25 UTC
originally reported against 3.0.0beta3.  CLeaning out 
non-production release versions.