From owner-freebsd-hackers Sat Feb 15 10:14:21 2003 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 E6AD337B401 for ; Sat, 15 Feb 2003 10:14:19 -0800 (PST) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1F36843FAF for ; Sat, 15 Feb 2003 10:14:19 -0800 (PST) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.12.6/8.12.6) id h1FIEIog090426; Sat, 15 Feb 2003 12:14:18 -0600 (CST) (envelope-from dan) Date: Sat, 15 Feb 2003 12:14:18 -0600 From: Dan Nelson To: Thomas Spreng Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: linux binary and pwrite() problem... Message-ID: <20030215181418.GK15607@dan.emsphone.com> References: <20030215120007.GA44691@rock.stable.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030215120007.GA44691@rock.stable.ch> X-OS: FreeBSD 5.0-CURRENT X-message-flag: Outlook Error User-Agent: Mutt/1.5.3i Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In the last episode (Feb 15), Thomas Spreng said: > Hi, > > I have two fbsd systems, both running 4.7 and linux_base-7.1_2. > I am trying to run a gameserver linux binary (sof2 v1.02) on one > of these machines but it just hangs if i start it. The strange > thing is that exactly the same binary works on the other fbsd box > with the same linux_base port. > The only thing that differs is the build date of the two boxes, > which is '4.7-RELEASE-p4 #0: Sun Feb 9 00:34:14 CET 2003' for the > one that doesn't work and '4.7-RELEASE-p2 #13: Sat Dec 7 12:58:57 > CET 2002' for the working machine. > > I have traced the processes on both machines with 'ktrace' and > everying looks fine until the following strange thing: > > On the 'not-working' machine: > # kdump > ...... > 94449 sof2ded RET ftruncate 1001/0x3e9 > 94449 sof2ded CALL lseek > 94449 sof2ded RET lseek 1001/0x3e9 > 94449 sof2ded CALL #208(0xffffffff,0x3e9,0xffffffff) > 94449 sof2ded RET #208 0 > 94449 sof2ded CALL pwrite(0x4,0xbfbfe618,0xbfbfe588,0x8) > 94449 sof2ded RET pwrite 0 > 94449 sof2ded PSIG SIGILL caught handler=0x8126678 mask=0x0 code=0x0 > 94449 sof2ded PSIG SIGINT SIG_DFL > > While on the working box i got the following: > # kdump > ...... > 3874 sof2ded RET ftruncate 1001/0x3e9 > 3874 sof2ded CALL lseek > 3874 sof2ded RET lseek 1001/0x3e9 > 3874 sof2ded CALL #208(0xffffffff,0x3e9,0xffffffff) > 3874 sof2ded RET #208 0 > 3874 sof2ded CALL write(0x2,0xbfbfd75c,0x24) > 3874 sof2ded GIO fd 2 wrote 36 bytes > "SOF2MP V1.02 linux-i386 Sep 23 2002 > > I cannot explain why on one box 'pwrite()' is called and on the other > one 'write()', is this the first box has a newer build date? Or are > there any other components that might have an effect on running linux > binaries. You need to install the devel/linux_kdump port and run that instead of kdump on Linux traces. Some syscall numbers map to different functions (#208 for example is unused in FreeBSD but is setresuid() in Linux). -- Dan Nelson dnelson@allantgroup.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message