'fcntl lock of file' failing, Sol-2.6, Samba-2.0.6
landrew at pnl.gov
Thu Dec 9 22:12:56 GMT 1999
On Thu, 9 Dec 1999, Andrew Rakowski (AR) wrote:
AR} Hi folks...I've run into a problem while building Samba-2.0.6 on a
AR} Solaris-2.6 system. I get the error (in smb.log):
AR} [1999/12/08 12:37:42, 0] lib/pidfile.c:pidfile_create(99)
AR} ERROR: smbd : fcntl lock of file /opt/local/samba/var/locks/smbd.pid
AR} failed. Error was No such file or directory
The problem turns out to be that configure runs tests/fcntl_lock.c to see
if fcntl_lock works, and sets HAVE_FCNTL_LOCK based on this test. The
fcntl_lock.c program opens a file in it's working directory (the build
directory) to test locking.
If you run configure on a filesystem that does not support locking of byte
ranges (such as AFS, or possibly some implementations of NFS), the test
will fail. In particular, even if the specified locks directory is on a
ufs filesystem where locking is supported, it will fail.
Moving the configure and build process to a ufs filesystem solves the
problem. Ideally, test/fcntl_lock.c should try creating it's test file in
the lock directory (LOCKDIR - if it exists), in which case this would test
whether locking will work during runtime.
The short solution, build on a ufs filesystem (at least on Solaris) and
avoid this headache.
More information about the samba-technical