'fcntl lock of file' failing, Sol-2.6, Samba-2.0.6
Andrew Rakowski
rakowski at pnl.gov
Thu Dec 9 00:46:11 GMT 1999
[Not sure where to send bug reports, with samba-bugs out of service.]
---------- Forwarded message ----------
From: Andrew Rakowski <landrew at pnl.gov>
To: samba-bugs at samba.org
Subject: 'fcntl lock of file' failing, Sol-2.6, Samba-2.0.6
Hi folks...I've run into a problem while building Samba-2.0.6 on a
Solaris-2.6 system. I get the error (in smb.log):
...
[1999/12/08 12:37:42, 0] lib/pidfile.c:pidfile_create(99)
ERROR: smbd : fcntl lock of file /opt/local/samba/var/locks/smbd.pid
failed. Error was No such file or directory
...
when trying to start smbd (nmbd has the same failure mode.) David
Collier-Brown suggested that this looked odd enough that the developers
might want to look at it.
Here are some abbreviated details (I don't want to bomb the list.) I have
the entire build / install in a 'script' file, and can do whatever testing
folks would like to see where the problem is.
Even with the log level set to '9', I don't see the fcntl_lock DEBUG
messages that you'd expect from the fcntl_lock function, and I'm wondering
if it's related to HAVE_FCNTL_LOCK not being set (but not being a
developer, I'm not sure where to look for that setting.)
-Andrew Rakowski
[Start of Abbreviated details]
- Solaris-2.6 (5.6 Generic_105181-15 sun4u sparc SUNW,Ultra-30)
- gcc-2.8.1 (also, Sun C-5.0 does the same thing)
- GNU make 3.77
samba-2.0.6, configured with:
# time ./configure --prefix=/opt/local/samba --with-pam
The smb.conf file is:
...
lalala 23# cat lib/smb.conf
# Samba config file created using SWAT
# from xxx.yyy.pnl.gov (123.456.789.10)
# Date: 1999/12/06 17:19:32
# Global parameters
[global]
workgroup = PNL
encrypt passwords = Yes
username map = /opt/local/samba/lib/users.map
log level = 9
os level = 0
local master = No
locking = No
[test]
comment = Testing on lalala only
path = /opt/samba_share/test
read only = No
lalala 24#
...
...
lalala 24# pwd
/opt/local/samba
lalala 25#
lalala 25# ls -Fla var/locks/smbd.pid var/log.smb /tmp/truss.output
-rw-r--r-- 1 root other 33500 Dec 8 12:37 /tmp/truss.output
-rw-r--r-- 1 root root 0 Dec 8 12:37 var/locks/smbd.pid
-rw-r--r-- 1 root root 4310 Dec 8 12:37 var/log.smb
lalala 26#
lalala 26# tail var/log.smb
string_to_sid: converted SID S-1-5 ok
[1999/12/08 12:37:42, 7] lib/util_sid.c:string_to_sid(302)
string_to_sid: converted SID S-1-5-31-3158191630-1159153423-3195139123
ok
[1999/12/08 12:37:42, 3] smbd/server.c:main(699)
loaded services
[1999/12/08 12:37:42, 3] smbd/server.c:main(707)
Becoming a daemon.
[1999/12/08 12:37:42, 0] lib/pidfile.c:pidfile_create(99)
ERROR: smbd : fcntl lock of file /opt/local/samba/var/locks/smbd.pid failed. Error was No such file or directory
lalala 27#
lalala 27#
...
Output from truss...(just lock stuff...)
...
lalala 27# egrep -i fcntl\|lock /tmp/truss.output
14703: fcntl(3, F_SETFD, 0x00000001) = 0
14703: stat64("/dev/winlock", 0xEFFFF728) = 0
14703: stat64("/dev/lockstat", 0xEFFFF728) = 0
14703: fcntl(3, F_SETFD, 0x00000001) = 0
14703: sigprocmask(SIG_BLOCK, 0xEFFFFCE0, 0x00000000) = 0
14703: sigprocmask(SIG_BLOCK, 0xEFFFFCE0, 0x00000000) = 0
14703: fcntl(4, F_SETFD, 0x00000001) = 0
14703: fcntl(4, F_SETFD, 0x00000001) = 0
14703: fcntl(4, F_SETFD, 0x00000001) = 0
14703: fcntl(4, F_SETFD, 0x00000001) = 0
14704: stat64("/opt/local/samba/var/locks", 0xEFFFFC58) = 0
14704: open64("/opt/local/samba/var/locks/smbd.pid", O_RDWR|O_NONBLOCK) Err#2 ENOENT
14704: open64("/opt/local/samba/var/locks/smbd.pid", O_WRONLY|O_NONBLOCK|O_CREAT|O_EXCL, 0644) = 5
lalala 28#
...
Tail of truss output...
...
14703: write(4, " B e c o m i n g a".., 21) = 21
14703: fork() = 14704
14704: fork() (returning as child ...) = 14703
14704: setsid() = 14704
14704: close(0) = 0
14703: _exit(0)
14704: close(1) = 0
14704: close(2) = 0
14704: open64("/dev/null", O_RDWR) = 0
14704: open64("/dev/null", O_RDWR) = 1
14704: open64("/dev/null", O_RDWR) = 2
14704: stat64("/opt/local/samba/var/locks", 0xEFFFFC58) = 0
14704: open64("/opt/local/samba/var/locks/smbd.pid", O_RDWR|O_NONBLOCK) Err#2 ENOENT
14704: open64("/opt/local/samba/var/locks/smbd.pid", O_WRONLY|O_NONBLOCK|O_CREAT|O_E
XCL, 0644) = 5
14704: time() = 944685462
14704: time() = 944685462
14704: write(4, " [", 1) = 1
14704: write(4, " 1 9 9 9 / 1 2 / 0 8 1".., 19) = 19
14704: write(4, " , 0", 3) = 3
14704: write(4, " ] ", 2) = 2
14704: write(4, " l i b / p i d f i l e .".., 13) = 13
14704: write(4, " :", 1) = 1
14704: write(4, " p i d f i l e _ c r e a".., 14) = 14
14704: write(4, " ( 9 9", 3) = 3
14704: write(4, " )\n", 2) = 2
14704: write(4, " E R R O R : s m b".., 115) = 115
14704: llseek(0, 0, SEEK_CUR) = 0
14704: _exit(1)
(END)
...
The fcntl and lock related lines from the configure process:
...
checking for sys/fcntl.h... yes
checking for fcntl.h... yes
checking for sigblock... no
checking for _fcntl... yes
checking for __fcntl... no
checking for kernel oplock type definitions... no
checking for fcntl locking... no
checking for broken (glibc2.1/x86) 64 bit fcntl locking... no
checking for 64 bit fcntl locking... yes
Using FLAGS = -O -Iinclude -I./include -I./ubiqx -I./smbwrapper -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DSMBLOGFILE="/opt/local/samba/var/log.smb" -DNMBLOGFILE="/opt/local/samba/var/log.nmb" -DCONFIGFILE="/opt/local/samba/lib/smb.conf" -DLMHOSTSFILE="/opt/local/samba/lib/lmhosts" -DSWATDIR="/opt/local/samba/swat" -DSBINDIR="/opt/local/samba/bin" -DLOCKDIR="/opt/local/samba/var/locks" -DSMBRUN="/opt/local/samba/bin/smbrun" -DCODEPAGEDIR="/opt/local/samba/lib/codepages" -DDRIVERFILE="/opt/local/samba/lib/printers.def" -DBINDIR="/opt/local/samba/bin" -DHAVE_INCLUDES_H -DPASSWD_PROGRAM="/bin/passwd" -DSMB_PASSWD_FILE="/opt/local/samba/private/smbpasswd"
Using FLAGS32 = -O -Iinclude -I./include -I./ubiqx -I./smbwrapper -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DSMBLOGFILE="/opt/local/samba/var/log.smb" -DNMBLOGFILE="/opt/local/samba/var/log.nmb" -DCONFIGFILE="/opt/local/samba/lib/smb.conf" -DLMHOSTSFILE="/opt/local/samba/lib/lmhosts" -DSWATDIR="/opt/local/samba/swat" -DSBINDIR="/opt/local/samba/bin" -DLOCKDIR="/opt/local/samba/var/locks" -DSMBRUN="/opt/local/samba/bin/smbrun" -DCODEPAGEDIR="/opt/local/samba/lib/codepages" -DDRIVERFILE="/opt/local/samba/lib/printers.def" -DBINDIR="/opt/local/samba/bin" -DHAVE_INCLUDES_H -DPASSWD_PROGRAM="/bin/passwd" -DSMB_PASSWD_FILE="/opt/local/samba/private/smbpasswd"
Compiling smbd/blocking.c
Compiling smbd/oplock.c
Compiling locking/locking.c
Compiling locking/locking_shm.c
Compiling locking/locking_slow.c
Compiling locking/shmem.c
Compiling locking/shmem_sysv.c
Using FLAGS = -O -Iinclude -I./include -I./ubiqx -I./smbwrapper -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DSMBLOGFILE="/opt/local/samba/var/log.smb" -DNMBLOGFILE="/opt/local/samba/var/log.nmb" -DCONFIGFILE="/opt/local/samba/lib/smb.conf" -DLMHOSTSFILE="/opt/local/samba/lib/lmhosts" -DSWATDIR="/opt/local/samba/swat" -DSBINDIR="/opt/local/samba/bin" -DLOCKDIR="/opt/local/samba/var/locks" -DSMBRUN="/opt/local/samba/bin/smbrun" -DCODEPAGEDIR="/opt/local/samba/lib/codepages" -DDRIVERFILE="/opt/local/samba/lib/printers.def" -DBINDIR="/opt/local/samba/bin" -DHAVE_INCLUDES_H -DPASSWD_PROGRAM="/bin/passwd" -DSMB_PASSWD_FILE="/opt/local/samba/private/smbpasswd"
Using FLAGS32 = -O -Iinclude -I./include -I./ubiqx -I./smbwrapper -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DSMBLOGFILE="/opt/local/samba/var/log.smb" -DNMBLOGFILE="/opt/local/samba/var/log.nmb" -DCONFIGFILE="/opt/local/samba/lib/smb.conf" -DLMHOSTSFILE="/opt/local/samba/lib/lmhosts" -DSWATDIR="/opt/local/samba/swat" -DSBINDIR="/opt/local/samba/bin" -DLOCKDIR="/opt/local/samba/var/locks" -DSMBRUN="/opt/local/samba/bin/smbrun" -DCODEPAGEDIR="/opt/local/samba/lib/codepages" -DDRIVERFILE="/opt/local/samba/lib/printers.def" -DBINDIR="/opt/local/samba/bin" -DHAVE_INCLUDES_H -DPASSWD_PROGRAM="/bin/passwd" -DSMB_PASSWD_FILE="/opt/local/samba/private/smbpasswd"
...
[End of abbreviated details]
Andrew Rakowski
Environmental Molecular Sciences Laboratory
Pacific Northwest National Laboratories
P.O. Box 999 / Mailstop K1-87
Richland, WA 99352 [USA]
Voice: 509.375.2238 / Email: landrew at pnl.gov
More information about the samba-technical
mailing list