SUNOS: Samba grabs all semaphores, breaking other softwares (PR#9755)
Ole Holm Nielsen
Ole.H.Nielsen at fysik.dtu.dk
Wed Sep 16 11:12:10 GMT 1998
-- Jeremy Allison 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 */
...
> 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>
I added this bit of code after the above lines in shmem_sysv.c:
#ifdef SUNOS4
/* Do not grab all available semaphores (64) on SunOS 4 */
#undef SHMEM_HASH_SIZE
#define SHMEM_HASH_SIZE 10
#endif
Now SAMBA grabs only 11 out of 64 available (by default)
semaphores, and I'm happy again :-) ADSM backup works
for us once again, now that there are available semaphores.
Developers: How about adding this hack to the main 1.9.18 code ?
It's really a problem on SunOS 4.
Best regards,
Ole Holm Nielsen
Department of Physics, Building 307
Technical University of Denmark, DK-2800 Lyngby, Denmark
More information about the samba
mailing list