From: samba@samba.org Message-Id: Reply-To: samba@samba.org Originator: samba@samba.org Sender: samba@samba.org To: Multiple recipients of list Subject: SAMBA digest 1947 X-Listprocessor-Version: 6.0c -- ListProcessor by Anastasios Kotsikonas X-URL: http://samba.anu.edu.au/listproc X-Comment: Discussion of Samba software package Content-Type: MULTIPART/MIXED; BOUNDARY="-1803424720-1667343476-916754176=:12797" MIME-Version: 1.0 Date: Wed, 20 Jan 1999 01:02:27 +1100 Hans, On Fri, 15 Jan 1999, Herb Lewis wrote: > > Hans Benedict wrote: > > > > 3) at the same time the following appears in log.smb > > > [1999/01/15 17:38:11, 0] locking/shmem_sysv.c:sysv_shm_open(590) > > > ERROR semctl: can't IPC_STAT. Error was Bad address > > > [1999/01/15 17:38:11, 0] locking/locking.c:locking_init(169) > > > ERROR: Failed to initialise share modes! > > > [1999/01/15 17:38:12, 0] locking/shmem_sysv.c:sysv_shm_open(590) > > > ERROR semctl: can't IPC_STAT. Error was Bad address > > > [1999/01/15 17:38:12, 0] locking/locking.c:locking_init(169) > > > ERROR: Failed to initialise share modes! > > > > Try stopping samba, deleting the shared memory segment and then > > restarting samba. Use "ipcs -ma" to see the segments, and > > "ipcrm -m " to delete sambas segment. > > O.k. - after talking to the local unix guru: using cc instead of gcc > seems to do the job! > > Thanks for your help, anyway. > > Regards, > Hans Benedict This is due to a bug in gcc 2.8+ (as well as egcs 1.0.2+) where the compiler doesn't properly align structs passed by value. Under the o32 object format, alignment was to the right. Under n32 (the "new" object format, what most current stuff should be built with), it is to align to the left. There is a FAQ about this at http://egcs.cygnus.com/faq.html#irix6n32bugs. [It would be really nice if this were fixed, but I don't understand compilers. Maybe someone at SGI could lend a hand?] My solution was to force the alignment to the left with the patch as follows. I suppose this could probably be worked into the configuration (like "checking for gcc's behavior with semctl"). I then define SGI_SEMUN_HACK in CFLAGS and configure. Don -- Don Badrak 301.457.1793 work Telecommunications Office 301.457.4438 fax U.S. Bureau of the Census 301.457.1828 fax Suitland MD, USA