From owner-freebsd-emulation Sun Jul 27 13:51:50 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id NAA20836 for emulation-outgoing; Sun, 27 Jul 1997 13:51:50 -0700 (PDT) Received: from axis.axisnet.net (root@axis.axisnet.net [206.54.226.1]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id NAA20824 for ; Sun, 27 Jul 1997 13:51:46 -0700 (PDT) Received: from default (dial41.axisnet.net [206.54.226.41]) by axis.axisnet.net (8.8.5/8.8.5) with SMTP id PAA16449 for ; Sun, 27 Jul 1997 15:51:42 -0500 Date: Sun, 27 Jul 1997 15:48:32 -0600 From: Bill Hogan To: emulation@freebsd.org X-Mailer: Z-Mail Pro 6.1 (Win32 - 021297) Evaluation Copy, NetManage Inc. X-Priority: 3 (Normal) Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; CHARSET=ISO-8859-1 Sender: owner-freebsd-emulation@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Subscribe -- Bill Hogan http://www.titania.net E-mail: Bill Hogan Sent: 07/27/97 CDT/CST 15:48:32 An airplane is a series of compromises, flying in close formation. -- From owner-freebsd-emulation Sun Jul 27 16:12:17 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id QAA26682 for emulation-outgoing; Sun, 27 Jul 1997 16:12:17 -0700 (PDT) Received: from fly.HiWAAY.net (root@fly.HiWAAY.net [208.147.154.56]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id QAA26639 for ; Sun, 27 Jul 1997 16:12:01 -0700 (PDT) Received: from nexgen.hiwaay.net by fly.HiWAAY.net; (8.8.6/1.1.8.2/21Sep95-1003PM) id SAA09400; Sun, 27 Jul 1997 18:11:40 -0500 (CDT) Received: from nexgen (localhost [127.0.0.1]) by nexgen.hiwaay.net (8.8.6/8.8.4) with ESMTP id SAA00535 for ; Sun, 27 Jul 1997 18:09:29 -0500 (CDT) Message-Id: <199707272309.SAA00535@nexgen.hiwaay.net> X-Mailer: exmh version 2.0zeta 7/24/97 To: emulation@freebsd.org Subject: NetBSD i386 binaries? From: dkelly@HiWAAY.net Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sun, 27 Jul 1997 18:09:29 -0500 Sender: owner-freebsd-emulation@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Asked this in questions last week and didn't get a reply. Thought a bit about it and decided this was probably a better place to ask. Learned the Introl 68HC11 (and 6809, HC12, HC16, and 68k) C compilers were now available for NetBSD so I downloaded the demo at http://www.introl.com/ and had a go at it. Rather than separate the *.html doc files from the rest of the Introl distribution I simply placed them in my public_html directory as Grumpy doesn't have a suitable graphics console: Grumpy: {1090} pwd /usr/home/dkelly/public_html/code/i386-netbsd/bin and this is the problem, Introl obviously uses shared libraries: Grumpy: {1091} ./cc11 Bad magic: ld.so Grumpy: {1092} All executable binaries emit that error message. So, what am I doing wrong? Should I push for a native FreeBSD version? (they sounded willing) Do I need NetBSD's ld.so and associated libraries? Where do I put them? Where do I get them? -- David Kelly N4HHE dkelly@hiwaay.net ====================================================================== The human mind ordinarily operates at only ten percent of its capacity -- the rest is overhead for the operating system. From owner-freebsd-emulation Sun Jul 27 16:45:14 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id QAA28500 for emulation-outgoing; Sun, 27 Jul 1997 16:45:14 -0700 (PDT) Received: from ingenieria ([168.176.15.11]) by hub.freebsd.org (8.8.5/8.8.5) with SMTP id QAA28494 for ; Sun, 27 Jul 1997 16:45:07 -0700 (PDT) Received: from unalmodem.usc.unal.edu.co by ingenieria (SMI-8.6/SMI-SVR4) id TAA07625; Sun, 27 Jul 1997 19:31:33 -0400 Message-ID: <33DBF8B5.7CC5@fps.biblos.unal.edu.co> Date: Sun, 27 Jul 1997 18:41:09 -0700 From: "Pedro Giffuni S," Organization: Universidad Nacional de Colombia X-Mailer: Mozilla 3.01Gold [it] (Win16; I) MIME-Version: 1.0 To: dkelly@HiWAAY.net CC: emulation@FreeBSD.ORG Subject: Re: NetBSD i386 binaries? References: <199707272309.SAA00535@nexgen.hiwaay.net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-emulation@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk dkelly@HiWAAY.net wrote: >... > > All executable binaries emit that error message. So, what am I doing wrong? I tried NetBSD's daVinci and got bus errors. You might have noticed that FreeBSD 2.x doesn't support all the system calls in NetBSD. I assume you are using 2.x, I don't know how 3.0 goes. > Should I push for a native FreeBSD version? (they sounded willing) > Don't push, just ask :-). People that offer products for NetBSD are rational enough to offer FreeBSD binaries. Pedro. > > -- > David Kelly N4HHE dkelly@hiwaay.net > ====================================================================== > The human mind ordinarily operates at only ten percent of its > capacity -- the rest is overhead for the operating system. From owner-freebsd-emulation Sun Jul 27 23:50:52 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id XAA13632 for emulation-outgoing; Sun, 27 Jul 1997 23:50:52 -0700 (PDT) Received: from euthyphro.uchicago.edu (euthyphro.uchicago.edu [128.135.21.31]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id XAA13616; Sun, 27 Jul 1997 23:50:45 -0700 (PDT) Received: from phaedrus.uchicago.edu (phaedrus [128.135.21.10]) by euthyphro.uchicago.edu (8.8.6/8.8.4) with ESMTP id BAA03984; Mon, 28 Jul 1997 01:50:43 -0500 (CDT) Received: from phaedrus.uchicago.edu (localhost [127.0.0.1]) by phaedrus.uchicago.edu (8.8.5/8.8.5) with ESMTP id BAA03938; Mon, 28 Jul 1997 01:50:41 -0500 (CDT) Message-Id: <199707280650.BAA03938@phaedrus.uchicago.edu> To: marc@bowtie.nl Cc: erich@FreeBSD.org, freebsd-emulation@FreeBSD.org Subject: Re: linux jdk on freebsd In-reply-to: Your message of "Sun, 27 Jul 1997 21:49:51 +0200." <199707271949.VAA24704@nietzsche.bowtie.nl> From: stephen farrell Mime-Version: 1.0 (generated by tm-edit 7.89) Content-Type: text/plain; charset=US-ASCII Date: Mon, 28 Jul 1997 01:50:36 -0500 Sender: owner-freebsd-emulation@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk >Yes, I saw it come by on the mailing list, > >Allthough I havent't tried it yet it seemed to be a problem in the >linux libraries (but this is from memory, I'll have to get back >to you when I find the messages telling this) > >Did you try to install the latest linux-lib package from ports? Yes... I've just been playing around with this some more. It's tantalizingly close to working beautifully--and noticeably faster than it does under linux (!). Basically we're working with the following: steve byrne packaged up with 1.1.1-v3 libc.so.5.4.13, and libdl.so.1.?.? (he did not leave the version names on them, and strings won't show me which libdl this is). These reside in jdk1.1.1/lib/i586/green_threads/, and are found by default unless you rename them. the latest linux_lib (2.4) includes libc.so.5.4.23 and libdl.so.1.7.14. (incidentally, either running "linux", or a note that you need to do so before installing this port might be good. I was a little confused at first when it failed to run ldconfig) Now, I can toggle between which of these is used by renaming the libs in jdk1.1.1/lib/i586/green_threads/. I find immediately that the linux_lib libdl.so causes a "illegal instruction" error if I try to use it. It doesn't appear to matter much which libc I use... either one is susceptible to the "pause hang". This hang occurs rarely, but is reproducible. Sometimes it's more common, like when I was running the trace below, the pause hang was more common. It was particularly reproducible, for example, in one program I can only get it to happen if I try to open up a heirarchical list that takes a few seconds to load under linux or solaris. Here's a bit of a ktrace output, which appears to just repeat like this indefinitely: http://www.farrell.org/stephen_paul/trace.html -- Steve Farrell From owner-freebsd-emulation Mon Jul 28 00:55:34 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id AAA16612 for emulation-outgoing; Mon, 28 Jul 1997 00:55:34 -0700 (PDT) Received: from genesis.atrad.adelaide.edu.au (genesis.atrad.adelaide.edu.au [129.127.96.120]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id AAA16603; Mon, 28 Jul 1997 00:55:26 -0700 (PDT) Received: (from msmith@localhost) by genesis.atrad.adelaide.edu.au (8.8.5/8.7.3) id RAA05458; Mon, 28 Jul 1997 17:22:40 +0930 (CST) From: Michael Smith Message-Id: <199707280752.RAA05458@genesis.atrad.adelaide.edu.au> Subject: Re: linux jdk on freebsd In-Reply-To: <199707280650.BAA03938@phaedrus.uchicago.edu> from stephen farrell at "Jul 28, 97 01:50:36 am" To: stephen@farrell.org (stephen farrell) Date: Mon, 28 Jul 1997 17:22:40 +0930 (CST) Cc: marc@bowtie.nl, erich@FreeBSD.ORG, freebsd-emulation@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL28 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-emulation@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk stephen farrell stands accused of saying: > > Here's a bit of a ktrace output, which appears to just repeat like > this indefinitely: > > http://www.farrell.org/stephen_paul/trace.html I can't talk to this server (ECONN). Any chance of just posting the fragment? Also, could you build the Linux LKM with DEBUG defined (look in src/lkm/linux/Makefile) and see if that's at all enlightening? > Steve Farrell -- ]] Mike Smith, Software Engineer msmith@gsoft.com.au [[ ]] Genesis Software genesis@gsoft.com.au [[ ]] High-speed data acquisition and (GSM mobile) 0411-222-496 [[ ]] realtime instrument control. (ph) +61-8-8267-3493 [[ ]] Unix hardware collector. "Where are your PEZ?" The Tick [[ From owner-freebsd-emulation Wed Jul 30 06:50:11 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id GAA01488 for emulation-outgoing; Wed, 30 Jul 1997 06:50:11 -0700 (PDT) Received: from euthyphro.uchicago.edu (euthyphro.uchicago.edu [128.135.21.31]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id GAA01435 for ; Wed, 30 Jul 1997 06:49:56 -0700 (PDT) Received: from phaedrus.uchicago.edu (phaedrus [128.135.21.10]) by euthyphro.uchicago.edu (8.8.6/8.8.4) with ESMTP id IAA15323 for ; Wed, 30 Jul 1997 08:49:42 -0500 (CDT) Received: from phaedrus.uchicago.edu (LOCALHOST [127.0.0.1]) by phaedrus.uchicago.edu (8.8.5/8.8.5) with ESMTP id IAA02374 for ; Wed, 30 Jul 1997 08:49:41 -0500 (CDT) Message-Id: <199707301349.IAA02374@phaedrus.uchicago.edu> To: emulation@freebsd.org Subject: linux jdk (v1.1.1-v3 and v1.1.3-pre-v1) on 2.2-STABLE/2.2.2 From: stephen farrell Mime-Version: 1.0 (generated by tm-edit 7.89) Content-Type: text/plain; charset=US-ASCII Date: Wed, 30 Jul 1997 08:49:41 -0500 Sender: owner-freebsd-emulation@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Hi--I meant to cc: a message to this list a couple of days ago, and I'm not sure if it went through (and it probably wasn't right to the point), so I'm sending again. Basically, linux jdk (v1.1.1-v3 and v1.1.3-pre-v1) works 95% _beautifully_ under freebsd--in fact, noticeably faster than it does natively under linux (which is remarkable!) However, it is not 100%, because it seems susceptible to hanging. Top says that it's in the "pause" state. Ktrace gives output (indefinitely) like: http://www.farrell.org/stephen_paul/trace.html These hangs do _not_ occur under native linux (with the exact same jdk) or under solx86. These hangs seem to come at very particular times, such as when opening a heirarchical list in one application I was testing. However, it's a crap shoot-sometimes it'll just work and everything is great. It does seem to work best right after rebooting. It feels like the lkm gets crufty after a while, b/c once stuff starts hanging, it seems like nothing will run any more. I've just tried the latest hotjava and it too has the same "pause hang" behavior. I know that people are working on a native port of jdk to freebsd. However, linux has some important support inside javasoft (steve byrne). So there are releases of the jdk for linux before they could possibly be released for freebsd b/c the source isn't available yet! Notice the jdk I'm working with here is 1.1.3 and it has been available (an early release) for a couple of weeks. So my point is that linux ports of the latest jdk will probably be available a couple of months ahead of freebsd ports at least for the foreseeable future, and thus that fixing this (seemingly) minor glitch would be very helpful. The 1.1 apps I've tried to run with kaffe (latest from ports) have not worked, so that doesn't seem like a viable option yet. If I knew where to start I'd be trying to find the problem myself--if there is any other ways I can be helpful in finding the problem, please let me know! I'd also like to hear if others have had the same experience. Just to clarify--I'm running 2.2-STABLE cvsupped today, and have the latest linux_lib "port". (also, incidentally, linux emulation works great for staroffice and linux netscape4) Thanks! -- Steve Farrell From owner-freebsd-emulation Wed Jul 30 08:16:34 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id IAA07717 for emulation-outgoing; Wed, 30 Jul 1997 08:16:34 -0700 (PDT) Received: from rocky.mt.sri.com (rocky.mt.sri.com [206.127.76.100]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id IAA07695 for ; Wed, 30 Jul 1997 08:16:21 -0700 (PDT) Received: (from nate@localhost) by rocky.mt.sri.com (8.7.5/8.7.3) id JAA04845; Wed, 30 Jul 1997 09:16:14 -0600 (MDT) Date: Wed, 30 Jul 1997 09:16:14 -0600 (MDT) Message-Id: <199707301516.JAA04845@rocky.mt.sri.com> From: Nate Williams MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: stephen farrell Cc: emulation@freebsd.org Subject: Re: linux jdk (v1.1.1-v3 and v1.1.3-pre-v1) on 2.2-STABLE/2.2.2 In-Reply-To: <199707301349.IAA02374@phaedrus.uchicago.edu> References: <199707301349.IAA02374@phaedrus.uchicago.edu> X-Mailer: VM 6.29 under 19.15 XEmacs Lucid Sender: owner-freebsd-emulation@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > Basically, linux jdk (v1.1.1-v3 and v1.1.3-pre-v1) works 95% > _beautifully_ under freebsd--in fact, noticeably faster than it does > natively under linux (which is remarkable!) Multi-cast doesn't work, but then again it doesn't work under the FreeBSD native stuff either from Canada. However, you may try downloading the FreeBSD 1.1 stuff (I know, it's old), and see if it works any better. http://www.csi.uottawa.ca/~kwhite/javaport.html Nate From owner-freebsd-emulation Wed Jul 30 08:35:22 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id IAA09181 for emulation-outgoing; Wed, 30 Jul 1997 08:35:22 -0700 (PDT) Received: from ohm.ingsala.unal.edu.co ([168.176.15.18]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id IAA09120 for ; Wed, 30 Jul 1997 08:35:02 -0700 (PDT) Received: from unalmodem.usc.unal.edu.co (unalmodem06.usc.unal.edu.co [168.176.3.36]) by ohm.ingsala.unal.edu.co (8.8.5/8.8.5) with SMTP id KAA19370; Wed, 30 Jul 1997 10:36:23 -0500 (COT) Message-ID: <33DF728F.6CFE@fps.biblos.unal.edu.co> Date: Wed, 30 Jul 1997 09:57:51 -0700 From: "Pedro Giffuni S," Organization: Universidad Nacional de Colombia X-Mailer: Mozilla 3.01Gold [it] (Win16; I) MIME-Version: 1.0 To: stephen farrell CC: emulation@freebsd.org Subject: Re: linux jdk (v1.1.1-v3 and v1.1.3-pre-v1) on 2.2-STABLE/2.2.2 References: <199707301349.IAA02374@phaedrus.uchicago.edu> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-emulation@freebsd.org X-Loop: FreeBSD.org Precedence: bulk stephen farrell wrote: > > I know that people are working on a native port of jdk to freebsd. http://www.csi.uottawa.ca/~kwhite/javaport.html I think we use the patches for Linux's version somewhere. Pedro. > > -- > > Steve Farrell From owner-freebsd-emulation Wed Jul 30 14:09:20 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id OAA03758 for emulation-outgoing; Wed, 30 Jul 1997 14:09:20 -0700 (PDT) Received: from sumatra.americantv.com (sumatra.americantv.com [207.170.17.37]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id OAA03750 for ; Wed, 30 Jul 1997 14:09:08 -0700 (PDT) Received: from right.PCS (right.PCS [148.105.10.31]) by sumatra.americantv.com (8.8.5/8.8.5) with ESMTP id QAA10211; Wed, 30 Jul 1997 16:13:36 -0500 (CDT) Received: (jlemon@localhost) by right.PCS (8.6.13/8.6.4) id QAA00248; Wed, 30 Jul 1997 16:09:59 -0500 Message-ID: <19970730160958.07798@right.PCS> Date: Wed, 30 Jul 1997 16:09:58 -0500 From: Jonathan Lemon To: stephen farrell Cc: emulation@FreeBSD.ORG Subject: Re: linux jdk (v1.1.1-v3 and v1.1.3-pre-v1) on 2.2-STABLE/2.2.2 References: <199707301349.IAA02374@phaedrus.uchicago.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.61.1 In-Reply-To: <199707301349.IAA02374@phaedrus.uchicago.edu>; from stephen farrell on Jul 07, 1997 at 08:49:41AM -0500 Sender: owner-freebsd-emulation@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk On Jul 07, 1997 at 08:49:41AM -0500, stephen farrell wrote: > However, it is not 100%, because it seems susceptible to hanging. Top > says that it's in the "pause" state. Ktrace gives output > (indefinitely) like: > > http://www.farrell.org/stephen_paul/trace.html This ktrace shows that syscalls are being made to mincore(). Now, I'm admittedly not familiar with the linux emulation code, but I don't think that mincore() is a linux syscall, at least it isn't listed in the linux syscalls.master file. However, under BSD, the syscall number for mincore() is 78, while under linux, gettimeofday() == 78. gettimeofday() appears to be a more likely syscall than mincore(). It almost appears that somehow this process has 'forgotten' that it is an emulated linux process, and is calling the native BSD routines directly. Would this make any sense? I wouldn't know where to look, but maybe someone else would. :-) -- Jonathan From owner-freebsd-emulation Wed Jul 30 15:52:28 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id PAA10242 for emulation-outgoing; Wed, 30 Jul 1997 15:52:28 -0700 (PDT) Received: from euthyphro.uchicago.edu (euthyphro.uchicago.edu [128.135.21.31]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id PAA10237 for ; Wed, 30 Jul 1997 15:52:26 -0700 (PDT) Received: from phaedrus.uchicago.edu (phaedrus [128.135.21.10]) by euthyphro.uchicago.edu (8.8.6/8.8.4) with ESMTP id RAA17951; Wed, 30 Jul 1997 17:52:21 -0500 (CDT) Received: (from sfarrell@localhost) by phaedrus.uchicago.edu (8.8.5/8.8.5) id RAA04137; Wed, 30 Jul 1997 17:52:16 -0500 (CDT) To: Jonathan Lemon , freebsd emulation list Subject: Re: linux jdk (v1.1.1-v3 and v1.1.3-pre-v1) on 2.2-STABLE/2.2.2 References: <199707301349.IAA02374@phaedrus.uchicago.edu> <19970730160958.07798@right.PCS> From: stephen farrell Mime-Version: 1.0 (generated by tm-edit 7.89) Content-Type: text/plain; charset=US-ASCII Date: 30 Jul 1997 17:52:14 -0500 In-Reply-To: Jonathan Lemon's message of Wed, 30 Jul 1997 16:09:58 -0500 Message-ID: <87vi1s5f1d.fsf@phaedrus.uchicago.edu> Lines: 168 X-Mailer: Gnus v5.4.37/XEmacs 19.15 Sender: owner-freebsd-emulation@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Jonathan Lemon writes: > > > > http://www.farrell.org/stephen_paul/trace.html > > This ktrace shows that syscalls are being made to mincore(). Now, I'm > admittedly not familiar with the linux emulation code, but I don't think > that mincore() is a linux syscall, at least it isn't listed in the linux > syscalls.master file. However, under BSD, the syscall number for mincore() > is 78, while under linux, gettimeofday() == 78. > > gettimeofday() appears to be a more likely syscall than mincore(). > > It almost appears that somehow this process has 'forgotten' that it is an > emulated linux process, and is calling the native BSD routines directly. > > Would this make any sense? I wouldn't know where to look, but maybe someone > else would. :-) Interesting idea, but actually mincore() is called frequently while the code is still functional, as is setreuid() (which strikes me as odd). Here's a stretch while it's still alive: 2503 java CALL mincore(0x115ea844,0) 2503 java RET mincore 0 2503 java CALL mincore(0x115ea844,0) 2503 java RET mincore 0 2503 java CALL setpgid(0x115ea844) 2503 java RET setpgid 0 2503 java CALL mincore(0x115ea844,0) 2503 java RET mincore 0 2503 java CALL mincore(0x115ea844,0) 2503 java RET mincore 0 2503 java CALL setpgid(0x115ea844) 2503 java RET setpgid 0 2503 java CALL mincore(0x115ea844,0) 2503 java RET mincore 0 2503 java CALL mincore(0x115ea844,0) 2503 java RET mincore 0 2503 java CALL setpgid(0x115ea844) 2503 java RET setpgid 0 2503 java CALL mincore(0x115ea844,0) 2503 java RET mincore 0 2503 java CALL mincore(0x115ea844,0) 2503 java RET mincore 0 2503 java CALL setpgid(0x115ea844) 2503 java RET setpgid 0 2503 java CALL mincore(0x115ea844,0) 2503 java RET mincore 0 2503 java CALL mincore(0x115ea844,0) 2503 java RET mincore 0 2503 java CALL setpgid(0x115ea844) 2503 java RET setpgid 0 2503 java CALL mincore(0x115ea844,0) 2503 java RET mincore 0 2503 java CALL mincore(0x115ea844,0) 2503 java RET mincore 0 2503 java CALL setpgid(0x115ea844) 2503 java RET setpgid 0 2503 java CALL mincore(0x115ea844,0) 2503 java RET mincore 0 2503 java CALL mincore(0x115ea844,0) and a smaller snippet with setreuid(): 2503 java CALL setreuid(0,0,0x115a8f84) 2503 java RET setreuid 0 2503 java CALL mincore(0x115c9c54,0) 2503 java RET mincore 0 2503 java CALL mincore(0x115c9824,0) 2503 java RET mincore 0 2503 java CALL setpgid(0x115c9824) 2503 java RET setpgid 0 2503 java CALL mincore(0x115c9824,0) 2503 java RET mincore 0 2503 java CALL setreuid(0,0,0x115c9f84) 2503 java RET setreuid 0 Here's the bit where it "falls of the ledge": 2503 java NAMI "/compat/linux/opt/jdk1.1/classes/sun/misc/Ref.class" 2503 java NAMI "/opt/jdk1.1/classes/sun/misc/Ref.class" 2503 java RET open JUSTRETURN 2503 java CALL old.lseek(0x3,0x2628ee,0) 2503 java RET old.lseek 2500846/0x2628ee 2503 java CALL read(0x3,0x1160b584,0x1e) 2503 java GIO fd 3 read 30 bytes "PK\^C\^D \0\0\0\0\0\M-|\M-2\M-3"\M-A5x\M-$p\^B\0\0p\^B\0\0\^R\0\0\0" 2503 java RET read 30/0x1e 2503 java CALL old.lseek(0x3,0x26291e,0) 2503 java RET old.lseek 2500894/0x26291e 2503 java CALL read(0x3,0x8a02d08,0x270) 2503 java GIO fd 3 read 624 bytes "\M-J\M-~\M-:\M->\0\^C\0-\0#\a\0\^\\a\0! \0\^A\0\b \0\^B\0 \0\^B\0 \0\^B\0\v \0\^B\0\f\f\0\^P\0\^N\f\0\^]\0\^T\f\0\^^\0\^T\f\0\^_\0\ \r\f\0"\0\^U\^A\0\^T()Ljava/lang/Object;\^A\0\^C()V\^A\0\^U(Ljava/lang\ /Object;)V\^A\0\^F\^A\0\^DCode\^A\0\rConstantValue\^A\0 Exceptions\^A\0\^AJ\^A\0\^RLjava/lang/Object;\^A\0\^NLocalVariables\^A\ \0\bRef.java\^A\0 SourceFile\^A\0\^Echeck\^A\0\^Eflush\^A\0\^Cget\^A\0\^Pjava/lang/Objec\ t\^A\0\blruclock\^A\0\bpriority\^A\0\freconstitute\^A\0\bsetThing\^A\0\ \fsun/misc/Ref\^A\0\^Ething\^D\^A\0\^B\0\^A\0\0\0\^C\0\b\0\^]\0\^T\0\0\ \0\^B\0"\0\^U\0\0\0\^B\0\^^\0\^T\0\0\0\^F\0\^A\0\^[\0\r\0\^A\0\^Q\0\0\ \0K\0\^E\0\^C\0\0\0007*\M-4\0\aL+\M-G\0"*M,\M-B*\M-4\0\aYL\M-G\0\r*\ \M-6\0\^FL*+\M-5\0\a,\M-C\M-'\0\^F,\M-C\M-?*\M-2\0\^D a\\\M-3\0\^D\M-5\0\^E+\M-0\0\^A\0\r\0 \0%\0\0\0\0\^D\^A\0\^_\0\r\0\0\0\ \^A\0\^Z\0\^N\0\^A\0\^Q\0\0\0\^R\0\^B\0\^A\0\0\0\^F*\^A\M-5\0\a\M-1\0\ \0\0\0\0\^A\0 \0\^O\0\^A\0\^Q\0\0\0\^R\0\^B\0\^B\0\0\0\^F*+\M-5\0\a\ \M-1\0\0\0\0\0\^A\0\^Y\0\r\0\^A\0\^Q\0\0\0\^Q\0\^A\0\^A\0\0\0\^E*\M-4\ \0\a\M-0\0\0\0\0\0\^A\0\^P\0\^N\0\^A\0\^Q\0\0\0\^^\0\^E\0\^A\0\0\0\^R*\ \M-7\0\^C*\M-2\0\^D a\\\M-3\0\^D\M-5\0\^E\M-1\0\0\0\0\0\^A\0\^X\0\0\0\^B\0\^W" 2503 java RET read 624/0x270 2503 java CALL ktrace(0x8a05000) 2503 java RET ktrace 144723968/0x8a05000 2503 java CALL setreuid(0,0,0x1160bf84) 2503 java RET setreuid 0 2503 java CALL setreuid(0,0,0x1162cf84) 2503 java RET setreuid 0 2503 java CALL setreuid(0x2,0x115c9f84,0) 2503 java RET setreuid 0 2503 java CALL ioctl(0x9,0x541b ,0x115c9420) 2503 java RET ioctl 0 2503 java CALL ioctl(0x9,0x541b ,0x115c9420) 2503 java RET ioctl 0 2503 java CALL mincore(0x115c9824,0) 2503 java RET mincore 0 2503 java CALL setpgid(0x115c9824) 2503 java RET setpgid 0 2503 java CALL mincore(0x115c9824,0) 2503 java RET mincore 0 2503 java CALL mincore(0x115c9a70,0) 2503 java RET mincore 0 2503 java CALL setpgid(0x115c9a70) 2503 java RET setpgid 0 2503 java CALL mincore(0x115c9a70,0) 2503 java RET mincore 0 2503 java CALL mincore(0x115c9a1c,0) 2503 java RET mincore 0 2503 java CALL setreuid(0,0,0x115c9f84) ...ad infinitum I'm thinking that ioctl might be interesting... no? While it succeeds, it keeps trying the same ones: ioctl(0x9,0x541b ,0x115ea440) and the one above.... All previous ioctl's are followed either immediately or within 20 syscalls by a read() or write() on an fd. The whole dang dump is here (gzipped it's 784822k) http://www.farrell.org/stephen_paul/trace.gz (It just doesn't really smack of efficiency =). --sf From owner-freebsd-emulation Wed Jul 30 16:25:25 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id QAA12212 for emulation-outgoing; Wed, 30 Jul 1997 16:25:25 -0700 (PDT) Received: from kithrup.com (kithrup.com [205.179.156.40]) by hub.freebsd.org (8.8.5/8.8.5) with SMTP id QAA12203 for ; Wed, 30 Jul 1997 16:25:17 -0700 (PDT) Received: (from sef@localhost) by kithrup.com (8.6.8/8.6.6) id QAA07729; Wed, 30 Jul 1997 16:24:45 -0700 Date: Wed, 30 Jul 1997 16:24:45 -0700 From: Sean Eric Fagan Message-Id: <199707302324.QAA07729@kithrup.com> To: jlemon@americantv.com, stephen@farrell.org Subject: Re: linux jdk (v1.1.1-v3 and v1.1.3-pre-v1) on 2.2-STABLE/2.2.2 Cc: emulation@FreeBSD.ORG Sender: owner-freebsd-emulation@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk >This ktrace shows that syscalls are being made to mincore(). Now, I'm >admittedly not familiar with the linux emulation code, but I don't think >that mincore() is a linux syscall, at least it isn't listed in the linux >syscalls.master file. However, under BSD, the syscall number for mincore() >is 78, while under linux, gettimeofday() == 78. > >gettimeofday() appears to be a more likely syscall than mincore(). > >It almost appears that somehow this process has 'forgotten' that it is an >emulated linux process, and is calling the native BSD routines directly. > >Would this make any sense? ktrace only grabs the system call number, but doesn't know anything about emulated systems; as a result, it can't do a translation from syscall number to any name other than BSD. This is something I'm thinking about, although not for ktrace. Sean. From owner-freebsd-emulation Wed Jul 30 19:42:37 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id TAA24872 for emulation-outgoing; Wed, 30 Jul 1997 19:42:37 -0700 (PDT) Received: from sumatra.americantv.com (sumatra.americantv.com [207.170.17.37]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id TAA24864 for ; Wed, 30 Jul 1997 19:42:31 -0700 (PDT) Received: from right.PCS (right.PCS [148.105.10.31]) by sumatra.americantv.com (8.8.5/8.8.5) with ESMTP id VAA10713; Wed, 30 Jul 1997 21:47:03 -0500 (CDT) Received: (jlemon@localhost) by right.PCS (8.6.13/8.6.4) id VAA01806; Wed, 30 Jul 1997 21:43:19 -0500 Message-ID: <19970730214319.61060@right.PCS> Date: Wed, 30 Jul 1997 21:43:19 -0500 From: Jonathan Lemon To: Sean Eric Fagan Cc: stephen@farrell.org, emulation@FreeBSD.ORG Subject: Re: linux jdk (v1.1.1-v3 and v1.1.3-pre-v1) on 2.2-STABLE/2.2.2 References: <199707302324.QAA07729@kithrup.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.61.1 In-Reply-To: <199707302324.QAA07729@kithrup.com>; from Sean Eric Fagan on Jul 07, 1997 at 04:24:45PM -0700 Sender: owner-freebsd-emulation@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk On Jul 07, 1997 at 04:24:45PM -0700, Sean Eric Fagan wrote: > ktrace only grabs the system call number, but doesn't know anything about > emulated systems; as a result, it can't do a translation from syscall number > to any name other than BSD. Oh well, it was an idea. Besides, isn't it kdump that does the actual number -> name translation? Perhaps if ktr_header had a flag that indicated whether this was an emulated process or not, then kdump could do the correct mapping later? -- Jonathan From owner-freebsd-emulation Wed Jul 30 19:47:12 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id TAA25184 for emulation-outgoing; Wed, 30 Jul 1997 19:47:12 -0700 (PDT) Received: from kithrup.com (kithrup.com [205.179.156.40]) by hub.freebsd.org (8.8.5/8.8.5) with SMTP id TAA25177 for ; Wed, 30 Jul 1997 19:47:09 -0700 (PDT) Received: (from sef@localhost) by kithrup.com (8.6.8/8.6.6) id TAA19151; Wed, 30 Jul 1997 19:47:07 -0700 Date: Wed, 30 Jul 1997 19:47:07 -0700 From: Sean Eric Fagan Message-Id: <199707310247.TAA19151@kithrup.com> To: jlemon@americantv.com Subject: Re: linux jdk (v1.1.1-v3 and v1.1.3-pre-v1) on 2.2-STABLE/2.2.2 Cc: emulation@FreeBSD.ORG, stephen@farrell.org Sender: owner-freebsd-emulation@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk >Oh well, it was an idea. Besides, isn't it kdump that does the actual >number -> name translation? Perhaps if ktr_header had a flag that indicated >whether this was an emulated process or not, then kdump could do the >correct mapping later? Yes, kdump is what does the translation. I actually said that in one draft of the message, but I am spending my days in class this week, and I only had a few minutes to write that message :). The information is available at the time the process is running; procfs has it in the pseudo-file etype. (I'm planning on making truss use that.) Sean. From owner-freebsd-emulation Wed Jul 30 23:37:53 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id XAA09179 for emulation-outgoing; Wed, 30 Jul 1997 23:37:53 -0700 (PDT) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id XAA09161 for ; Wed, 30 Jul 1997 23:37:40 -0700 (PDT) Received: (from bde@localhost) by godzilla.zeta.org.au (8.8.5/8.6.9) id QAA19072; Thu, 31 Jul 1997 16:32:30 +1000 Date: Thu, 31 Jul 1997 16:32:30 +1000 From: Bruce Evans Message-Id: <199707310632.QAA19072@godzilla.zeta.org.au> To: jlemon@americantv.com, stephen@farrell.org Subject: Re: linux jdk (v1.1.1-v3 and v1.1.3-pre-v1) on 2.2-STABLE/2.2.2 Cc: emulation@freebsd.org Sender: owner-freebsd-emulation@freebsd.org X-Loop: FreeBSD.org Precedence: bulk >This ktrace shows that syscalls are being made to mincore(). Now, I'm >admittedly not familiar with the linux emulation code, but I don't think >that mincore() is a linux syscall, at least it isn't listed in the linux >syscalls.master file. However, under BSD, the syscall number for mincore() >is 78, while under linux, gettimeofday() == 78. > >gettimeofday() appears to be a more likely syscall than mincore(). > >It almost appears that somehow this process has 'forgotten' that it is an >emulated linux process, and is calling the native BSD routines directly. It never knew. kdump knows nothing of sysent vectors or emulation. For syscall 78, it prints syscallnames[78], where syscallnames[] is the table of BSD syscall names in kern/syscalls.c. Bruce