From owner-freebsd-hackers Sat Jan 24 01:19:18 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id BAA22838 for hackers-outgoing; Sat, 24 Jan 1998 01:19:18 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from word.smith.net.au (ppp7.portal.net.au [202.12.71.107]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id BAA22822 for ; Sat, 24 Jan 1998 01:19:12 -0800 (PST) (envelope-from mike@word.smith.net.au) Received: from word (localhost [127.0.0.1]) by word.smith.net.au (8.8.8/8.8.5) with ESMTP id OAA01185; Sat, 24 Jan 1998 14:48:04 +1030 (CST) Message-Id: <199801240418.OAA01185@word.smith.net.au> X-Mailer: exmh version 2.0zeta 7/24/97 To: Matthew Hagerty cc: FREEBSD-HACKERS@FreeBSD.ORG Subject: Re: Semaphore semop(), semctl() error 22 In-reply-to: Your message of "Fri, 23 Jan 1998 01:49:54 CDT." <3.0.1.32.19980123014954.006a7204@wolfepub.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sat, 24 Jan 1998 14:48:03 +1030 From: Mike Smith Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk > Greetings, > > I posted this in freebsd-questions but was told it should probably be > posted in -hackers. Please excuse me if it is inappropriate. > > I am trying to bet a BSDI binary (an RDBMS, Raima Velocis-1.4.1) to run > on 2.2.5-Release. The server starts fine, but when I try to access it, it > crashes with an error to semop(), then to semctl() error 22. Here is the > error that I get on the terminal: > > **** rm_syncDelete() semctl() failure, errno=22 (Invalid argument) > I did a ktrace and kdump to see what might be going on, but since I'm > really not sure what I'm looking at, it did not help me much. In the > kdump, there are several (about 100 actually) of these groups of lines that > seem to get the errors rolling: > > 196 rds CALL semop(0x10000,0xefbfdbcc,0x1) > 196 rds PSIG SIGALRM caught handler=0xdb8b8 mask=0x0 code=0x0 > 196 rds RET semop -1 errno 4 Interrupted system call That's normal; while waiting on a semaphore the application's timer has gone off. > .. > .. Then later they get worse: > .. > 196 rds CALL write(0x2,0xefbfcc84,0x44) > 196 rds GIO fd 2 wrote 68 bytes > "**** rm_syncEnterExcl() semop() failure, errno=22 (Invalid argument)" Where's the semop call that returned EINVAL? > 196 rds GIO fd 2 wrote 14 bytes > "NCP Child died" You'd need to know what the NCP Child was, and why it exited. > .. > .. Now semctl > .. > 196 rds CALL write(0x1,0x139000,0x43) > 196 rds GIO fd 1 wrote 67 bytes > "**** rm_syncDelete() semctl() failure, errno=22 (Invalid argument) Again, we need to see the trace for the semctl call, and perhaps you will need to put some debugging printf() calls in sys/kern/sysv_sem.c to see which EINVAL is being returned. > Any info, pointers, man pages to read, etc. would be greatly > appreciated. Also, how compatable is FreeBSD's semaphores to BSDI's? I > was told that FreeBSD's *native* operating mode was BSD (or is that BSD/OS, > BSDI, or BSD-4.4?) No emulation needed like for SCO or Linux binaries. > Then again, I think BSD4.4 borrowed semaphores from SVR4? Yes, no? FreeBSD should run BSD/OS binaries. The two systems share a common heritage, and there is some effort expended to ensure that BSD/OS code runs on FreeBSD. The people at BSDi aren't all so kind, unfortunately. -- \\ Sometimes you're ahead, \\ Mike Smith \\ sometimes you're behind. \\ mike@smith.net.au \\ The race is long, and in the \\ msmith@freebsd.org \\ end it's only with yourself. \\