Date: Thu, 15 May 2003 09:28:57 +0200 (CEST) From: Bogdan TARU <bgd@icomag.de> To: Dan Nelson <dnelson@allantgroup.com> Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: linux binary blues Message-ID: <20030515092609.P94532-100000@fw.office.icom> In-Reply-To: <20030514150911.GI65927@dan.emsphone.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi Dan, And thanks for your answer... Yes, I have options SYSVSEM compiled on that machine... As about the third parameter to semget, as far as I can read in semget(2) the third parameter (flag) is an integer, not a pointer? Any other ideas? bogdan On Wed, 14 May 2003, Dan Nelson wrote: > In the last episode (May 14), Bogdan TARU said: > > I have a linux binary that runs well under a jail on a FreeBSD 4.8, > > but fails to run on a jaili on 4.7 (obviously, both have linux > > compatibility installed). > > > > As far as I know (don't have the sources of this linux binary), it > > tries to get a lock on a file which is called engine.pid. That failes > > on 4.7. > > > > The ktraces on the systems look like: > > BTW - it didn't matter in this case, but make sure you use the > linux_kdump program (in the ports tree) when dumping traces from Linux > executables. Some syscalls have different numbers under Linux and > FreeBSD. > > > Good (jail on 4.8): > > > > 582 engine NAMI "/home/test/testbot/var/run/engine.pid" > > 582 engine RET open 3 > > 582 engine CALL semget(0x3,0x6,0xbfbfe820) > > 582 engine RET semget 0 > > 582 engine CALL getpid > > 582 engine RET getpid 582/0x246 > > 582 engine CALL select(0x3,0) > > 582 engine RET select 0 > > 582 engine CALL write(0x3,0x864c28c,0x4) > > 582 engine GIO fd 3 wrote 4 bytes > > > > Failed (jail on 4.7): > > > > 10995 engine NAMI "/usr/home/ohsandy/sandy/var/run/engine.pid" > > 10995 engine RET open 3 > > 10995 engine CALL semget(0x3,0x6,0xbfbfe800) > > 10995 engine RET semget -1 errno -22 Unknown error: -22( > > Do you have sysv semaphores enabled on this box? Put this in your > kernel config file and rebuild: > > options SYSVSEM > > > I don't know, though, why the semget(2) has different values for the > > third argument (0xbfbfe820 != 0xbfbfe800), if the binary is the same and > > the linux libraries (as far as I can tell) are the same (tried with the > > 4.7 linux_base package, and as well with the 4.8 linux_base package > > installed on the 4.7 system). > > The third argument is a pointer value, so it's probably going to be > different every time. > > -- > Dan Nelson > dnelson@allantgroup.com >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030515092609.P94532-100000>