Semaphore problem

Lahr, Gary T. gtlahr at Z-TEL.com
Tue Nov 9 13:35:04 GMT 1999


I am sending this post to help more than ask for help. We run Samba 2.0.5a
on Solaris 2.6. We recently found a problem which gave us the following
errors in the log.smb log file.

[1999/11/06 03:15:41, 0] locking/shmem_sysv.c:sysv_shm_open(597)
  ERROR: root did not create the semaphore

It turns out this is a permission problem with the semaphores. To identify
the problem run ipcs -a and you should get output similar to the following:

# ipcs -a
IPC status from <running system> as of Tue Nov  9 08:27:33 1999
Message Queue facility not in system.
T         ID      KEY        MODE        OWNER    GROUP  CREATOR   CGROUP
NATTCH      SEGSZ  CPID  LPID   ATIME    DTIME    CTIME 
Shared Memory:
m          0   0x00280267 --rw-r--r--     root     root     root     root
4    1048576 21324 17086  8:25:25  8:19:51  6:32:38
T         ID      KEY        MODE        OWNER    GROUP  CREATOR   CGROUP
NSEMS   OTIME    CTIME 
Semaphores:
s          0   0x00280269 --ra-ra-ra-     root     other     root     other
14  8:27:26  8:25:25

Notice the ownership of the semaphore with ID=0 root other. This is the
problem, at least on our system, the ownership should be root root. This
system can get in this state one of two ways that we have found so far. 1 -
running smbstatus as root before the semaphores are created by the server. 2
- running smbd as root instead of using the -D option to run as a daemon. To
fix this problem use the ipcs -a command to get the above listing and then
run ipcrm -s <semaphoreid> to remove the semaphore. ***** Be careful not to
remove any semaphores used for other processes.

I hope this helps all who run into this problem.

Thanks

========================================================
|        Z - T e l   C o m m u n i c a t i o n s       |
========================================================
|Contact Information           |Phone/Web Information  |
========================================================
|Gary T. Lahr                  |Phone: 404.946.7086    |
|UNIX System Engineer          |Fax: 404.237.1167      |
|Z-Tel Communications          |Email: gtlahr at z-tel.com|
|3340 Peachtree Road           |                       |
|Suite 2900                    |www.myzline.com        |
|Atlanta, Ga. 30326            |www.z-tel.com          |
========================================================




More information about the samba mailing list