Skip site navigation (1)Skip section navigation (2)
Date:      30 Jul 1997 17:52:14 -0500
From:      stephen farrell <stephen@farrell.org>
To:        Jonathan Lemon <jlemon@americantv.com>, freebsd emulation list <emulation@freebsd.org>
Subject:   Re: linux jdk (v1.1.1-v3 and v1.1.3-pre-v1) on 2.2-STABLE/2.2.2
Message-ID:  <87vi1s5f1d.fsf@phaedrus.uchicago.edu>
In-Reply-To: Jonathan Lemon's message of Wed, 30 Jul 1997 16:09:58 -0500
References:  <199707301349.IAA02374@phaedrus.uchicago.edu> <19970730160958.07798@right.PCS>

next in thread | previous in thread | raw e-mail | index | archive | help
Jonathan Lemon <jlemon@americantv.com> 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<init>\^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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?87vi1s5f1d.fsf>