Subject: Re: bin/8306: /etc/rc cleans /var/run completely
To: None <gnats-bugs@NetBSD.ORG>
From: Martin Husemann <>
List: current-users
Date: 09/02/1999 07:28:48
I filed this PR to fast - /etc/rc cleaning /var/run has nothing to do
with the problem. Someone please close the PR, and someone please 
give me some hint of the real failure cause!

Fact remains: samba stopped working for me (which may have happened while
updating to -current last sunday, but I did several other things at the
same time, and I don't know yet whose fault it is).

I ktrace'd smbd (nmbd works just fine), and while a session connect 
was tried, I got this (pid 615 is the smbd child processing the request,
605 is the "master" smbd):

   615 smbd     CALL  semget(0x280269,0,0)
   615 smbd     RET   semget 65536/0x10000
   615 smbd     CALL  compat_14___semctl(0x10000,0,0x2,0xefbfd7d4)
   615 smbd     PSIG  SIGSYS SIG_DFL
   605 smbd     PSIG  SIGCHLD caught handler=0x80bc1a8 mask=(8,13) code=0x0
   605 smbd     RET   select -1 errno 4 Interrupted system call
   605 smbd     CALL  wait4(0xffffffff,0,0x1,0)
   605 smbd     RET   wait4 615/0x267
   605 smbd     CALL  wait4(0xffffffff,0,0x1,0)
   605 smbd     RET   wait4 -1 errno 10 No child processes
   605 smbd     CALL  __sigreturn14(0xefbfd340)
   605 smbd     RET   __sigreturn14 JUSTRETURN
   605 smbd     CALL  select(0x100,0xefbfd430,0,0,0)

So something is wrong wiht SYSV semaphores? I have 

options 	SYSVMSG		# System V-like message queues
options 	SYSVSEM		# System V-like semaphores
options 	SYSVSHM		# System V-like memory sharing
#options 	SHMMAXPGS=1024	# 1024 pages is the default

in my kernel config, but there is no shared memory file in /var/run/samba
(that's why I initially thaught /etc/rc brute force cleaning was the

ls -l /var/run/samba shows:

-rw-r--r--  1 root  wheel  231 Sep  2 07:25 browse.dat
-rw-r--r--  1 root  wheel   20 Sep  2 05:52
-rw-r--r--  1 root  wheel   20 Sep  2 07:16
-rw-r--r--  1 root  wheel  425 Sep  2 07:26 wins.dat

This is all on a system running -current as of August 30, i386/ELF.

Any hints?