SUNOS: Samba grabs all semaphores, breaking other softwares (PR#9755)
Jeremy Allison
jallison at cthulhu.engr.sgi.com
Tue Sep 15 16:48:37 GMT 1998
Ole.H.Nielsen at fysik.dtu.dk wrote:
>
> SAMBA grabs ALL available semaphores minus 1 on SunOS 4.1.3,
> where the kernel has 60, see /usr/include/sys/sem.h:
> #define SEMMNS 60 /* # of semaphores in system */
>
> This is a MAJOR PROBLEM to us, since our backup software
> (IBM ADSM) also needs available semaphores for the client
> part to work. Hence we can choose between running SAMBA
> or running backups :-(
Hi Ole, nice to hear from you again.
>
> On AIX 4.2.1 we see just 1 or 2 semaphores taken by SAMBA,
> so this is a SunOS specific problem. We'd really like to
> get this bug under control...
>
It's not actually a bug really, more a questionable
design decision.
The solution for Samba 1.9.18pXX is to set the number
of semaphores manually in shmem_sysv.c, ie. change
the lines:
#ifdef SEMMSL
#define SHMEM_HASH_SIZE (SEMMSL-1)
#else
#define SHMEM_HASH_SIZE 63
#endif
to be just :
#define SHMEM_HASH_SIZE <whatever you want here>
Samba-2 won't have this problem as it is much
more conservative about SYSV semaphore use. I'm
CC:ing this reply to the mailing list as I think
people might be interested in this answer.
Cheers,
Jeremy Allison,
Samba Team.
--
--------------------------------------------------------
Buying an operating system without source is like buying
a self-assembly Space Shuttle with no instructions.
--------------------------------------------------------
More information about the samba
mailing list