Semaphore problem on HP-UX ?
jallison at whistle.com
Tue Mar 31 18:27:12 GMT 1998
STEENHUYSE VAN DE VELDE Luc wrote:
> While testing the latest releases however we ran into a weird problem
> related to semaphores. As soon as we try to do something with samba
> HP-UX allocates all available semaphores and other services are having
> trouble because of this. E.g. Oracle won't start anymore as it cannot
> allocate any semaphores. I tested this on two different HP 800 systems
> a 4 processor K220 and a H70. Both machines are running HP-UX 10.20
> and Extension software (patch bundles) released in december 1997 are
> installed on both machines. Please find more technical details further
> on. I tested this with release 1.8.18p2 and the latest version
> 1.8.18p4. and both versions generate the same problem. When compiling
> SAMBA without the FAST_SHARE_MODES I was able to avoid this problem
> I was using this option with older versions of samba so I would like
> keep it as it is faster :-).
> Did anyone experience the same problem before ?
> The problem is not there when running SAMBA 1.9.17p3. Most of them are
> on HP-UX 10.20 as well with the same patch level.
> Can this problem be introduced with 1.9.18 ?
Hope you don't mind, but I'm CC:ing the samba
list with the reply to this, as other HPUX users will
find this useful.
It seems that HPUX10.x defines the symbol SEMMSL in
the include files to be a rather large number (the
max number of available semaphores on a system).
The code in shmem_sysv.c (new for the 1.9.18 releases),
which controls the use of System V semaphores in Samba,
uses the value (SEMMSL-1) as the number of semaphores
to use if SEMMSL is defined, and uses the number 63 if
it is not.
What I would recommend is to add the following
lines to includes.h (this is a context diff)
- this will undefine the SEMMSL value on
HPUX 10.x only.
If any HPUX gurus could comment (I don't have
access to a HPUX machine) I'd be grateful. I'm
sure this will fix your problem - I'm just not
sure it's the absolutely *correct* fix (which
I'd like to have :-).
Hope this helps,
RCS file: /data/cvs/samba/source/includes.h,v
retrieving revision 22.214.171.124
diff -w -b -c -r126.96.36.199 includes.h
*** includes.h 1998/03/27 20:45:41 188.8.131.52
--- includes.h 1998/03/31 18:28:10
*** 612,617 ****
--- 612,622 ----
not good for HPUX */
/* #define SIGCLD_IGNORE */
#define USE_SIGPROCMASK /* Needed to stop zombie processes on HPUX 9.x and 10.x.*/
+ #ifdef HPUX10
+ #ifdef SEMMSL
+ #undef SEMMSL
+ #endif /* SEMMSL */
+ #endif /* HPUX10 */
#endif /* HPUX */
More information about the samba