From owner-freebsd-hackers@FreeBSD.ORG Wed Aug 13 14:04:06 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9B7BF1065670 for ; Wed, 13 Aug 2008 14:04:06 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from redbull.bpaserver.net (redbullneu.bpaserver.net [213.198.78.217]) by mx1.freebsd.org (Postfix) with ESMTP id 2E1BE8FC22 for ; Wed, 13 Aug 2008 14:04:06 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from outgoing.leidinger.net (p54A565AB.dip.t-dialin.net [84.165.101.171]) by redbull.bpaserver.net (Postfix) with ESMTP id 4227A2E16C; Wed, 13 Aug 2008 16:03:57 +0200 (CEST) Received: from webmail.leidinger.net (webmail.leidinger.net [192.168.1.102]) by outgoing.leidinger.net (Postfix) with ESMTP id F285914FD70; Wed, 13 Aug 2008 16:03:53 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=Leidinger.net; s=outgoing-alex; t=1218636234; bh=WUelGVgg3hKQ8m0LFQBs3T0A7t+A72pgy pmHwYt3mZ0=; h=Message-ID:Date:From:To:Cc:Subject:References: In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=SigvekPsm0p6+TjAqULUzq1/PvN67e2d5yvO2VEowTnvYTS19bWbUm3g1tYGrU8Vp gXD46DO1KbSuFIzkSiqTdWjmOlLdkEBFXECAJDgditr7L/Rg7cMg9RKQ1UurSEW/nmF iTHG5dwkO7xRzFEz6FOxZpLpHHNJSBJX3XdssTuW17NsBCVX0qAGwMucqybNASW4cgp LZkUDEVbXZ1KKMXhnJQEykY8/meKv5SGrZGt7gykivdxeNotK7nyRjtIE2SWo4ipyOW 0T/bG690lcZws7U7/JEbvjwpH4sQ2ARgA+LqN9epQSfgOfmvCcobytmnarWdcoHp28e IBS9vjyXg== Received: (from www@localhost) by webmail.leidinger.net (8.14.2/8.13.8/Submit) id m7DE3r4x062204; Wed, 13 Aug 2008 16:03:53 +0200 (CEST) (envelope-from Alexander@Leidinger.net) Received: from pslux.cec.eu.int (pslux.cec.eu.int [158.169.9.14]) by webmail.leidinger.net (Horde Framework) with HTTP; Wed, 13 Aug 2008 16:03:53 +0200 Message-ID: <20080813160353.55171pui9o2wvm4g@webmail.leidinger.net> X-Priority: 3 (Normal) Date: Wed, 13 Aug 2008 16:03:53 +0200 From: "Alexander Leidinger" To: "Kostik Belousov" References: <20080813132822.18394zk66kfg0xcs@webmail.leidinger.net> <20080813115413.GF1803@deviant.kiev.zoral.com.ua> In-Reply-To: <20080813115413.GF1803@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable User-Agent: Internet Messaging Program (IMP) H3 (4.2) / FreeBSD-8.0 X-BPAnet-MailScanner-Information: Please contact the ISP for more information X-MailScanner-ID: 4227A2E16C.9DC80 X-BPAnet-MailScanner: Found to be clean X-BPAnet-MailScanner-SpamCheck: not spam, ORDB-RBL, SpamAssassin (not cached, score=-12.523, required 6, BAYES_00 -15.00, DKIM_SIGNED 0.00, DKIM_VERIFIED -0.00, MANGLED_SAVELE 2.30, RDNS_DYNAMIC 0.10, TW_KD 0.08) X-BPAnet-MailScanner-From: alexander@leidinger.net X-Spam-Status: No X-Mailman-Approved-At: Wed, 13 Aug 2008 14:55:08 +0000 Cc: Nate Eldredge , freebsd-hackers@freebsd.org Subject: Re: Debugging reboot with Linux emulation X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Aug 2008 14:04:06 -0000 Quoting "Kostik Belousov" (from Wed, 13 Aug 2008 =20 14:54:13 +0300): > On Wed, Aug 13, 2008 at 01:28:22PM +0200, Alexander Leidinger wrote: >> Quoting "Nate Eldredge" (from Tue, 12 Aug >> 2008 23:52:35 -0700 (PDT)): >> >> >Hi folks, >> > >> >I recently tried to run a Linux binary of Maple (commercial math >> >software) on my FreeBSD 7.0-RELEASE/amd64 box, and the machine >> >rebooted. I tried it again while watching the console, and no panic >> >message appeared to be produced. Does anyone have any ideas on how >> >to debug problems of this nature? I realize I may not be able to >> >get Maple to work, but in any case the system should not die like >> >this, so I can at least try to fix that bug. >> > >> >Incidentally, is it possible to run kdb with a USB keyboard? >> >Hitting Ctrl-Alt-Esc gives me the kdb prompt, but I can't type, so I >> >can do nothing except hit the power button. I do have >> >hint.atkbd.0.flags=3D"0x1" in /boot/device.hints. Unfortunately I >> >don't have a PS/2 keyboard on hand, though I can try and get a hold >> >of one if all else fails. >> >> A guess out of my cristallball: >> That's one of the cases which happen if you run a linux program >> without branding it as a linux program first. People tend to think it >> is not needed, but in some rare circumstances it just causes what you >> see, a reboot. So go and identify all binaries (IMPORTANT: but not the >> libraries!), e.g. with the file(1), and use "brandelf -t Linux" on >> those programs. > > That would be an enormous local hole, assuming an native FreeBSD binary > may cause system crash. I actually doubt that non-branded elf binary > ever start, due to unsatisfied dynamic dependencies. You see this behavior only for static binaries. In the non-branded =20 case the image activator takes the FreeBSD image and unfortunately =20 there's a common syscall in linux which matches the syscall number in =20 FreeBSD which causes the reboot (IIRC reboot syscall, do we have =20 something like this?). It's not a system crash (kernel panic), it's a =20 real reboot. AFAIR this also only works if you run the program as =20 root. So... Bye, Alexander. --=20 Blow it out your ear. http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID =3D B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID =3D 72077137