Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 24 Jan 1998 14:48:03 +1030
From:      Mike Smith <mike@smith.net.au>
To:        Matthew Hagerty <matthew@wolfepub.com>
Cc:        FREEBSD-HACKERS@FreeBSD.ORG
Subject:   Re: Semaphore semop(), semctl() error 22 
Message-ID:  <199801240418.OAA01185@word.smith.net.au>
In-Reply-To: Your message of "Fri, 23 Jan 1998 01:49:54 CDT." <3.0.1.32.19980123014954.006a7204@wolfepub.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
> 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.  \\ 





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199801240418.OAA01185>