From owner-freebsd-hackers@FreeBSD.ORG Wed May 14 04:26:25 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6150837B401 for ; Wed, 14 May 2003 04:26:25 -0700 (PDT) Received: from mail.icomag.de (ns.icomag.de [195.227.115.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4C52243FA3 for ; Wed, 14 May 2003 04:26:24 -0700 (PDT) (envelope-from bgd@icomag.de) Received: by mail.icomag.de (Postfix, from userid 1019) id BED212302E; Wed, 14 May 2003 13:26:21 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail.icomag.de (Postfix) with ESMTP id BDC0E23026 for ; Wed, 14 May 2003 13:26:21 +0200 (CEST) Date: Wed, 14 May 2003 13:26:21 +0200 (CEST) From: Bogdan TARU X-X-Sender: To: Message-ID: <20030514131951.O78837-100000@fw.office.icom> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: linux binary blues X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2003 11:26:25 -0000 Hi Hackers, 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: 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( 10995 engine CALL ktrace(0x8690000) 10995 engine RET ktrace 141099008/0x8690000 10995 engine CALL ktrace(0x869d000) 10995 engine RET ktrace 141152256/0x869d000 10995 engine CALL fchdir(0xbfbfe60c) 10995 engine RET fchdir 1052904408/0x3ec20bd8 10995 engine CALL open(0x852e160,0x441,0x1b6) 10995 engine NAMI "/compat/linux/usr/home/ohsandy/sandy/var/log" 10995 engine NAMI "/usr/home/ohsandy/sandy/var/log/error.log" 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). So, any ideas of what could go wrong, and if there are any chances of getting this binary to run on a 4.7? Thanks, bogdan