Subject: Re: java from Solaris 2.5 under compat_svr4
To: None <port-sparc@netbsd.org>
From: Christos Zoulas <christos@zoulas.com>
List: port-sparc
Date: 10/27/2001 21:46:12
In article <20011027151341.A769@mt.sri.com>,
Chris Jones <chris@cjones.org> wrote:

Are you specifying the full path on the java command in both cases?

like: /usr/local/jdk/bin/java?

christos

>-=-=-=-=-=-
>
>I'm mystified, and I was hoping somebody could help me out.
>
>This is all on NetBSD 1.5.2/sparc:
>
>I've gotten my compat_svr4 environment set up, and I copied down
>jdk1.2.2 as well.  When I run java as root, it works.  But when I run
>it as me, it dies.  Running the .java_wrapper script with -x shows the
>same processing whether I'm root or chris, and the environments are
>the same (except for the SU_FROM variable).  Ktrace shows some
>differences, though.  As root, it looks like this:
>
>  1360 java     EMUL  "svr4"
>  1360 java     RET   execve JUSTRETURN
>  1360 java     CALL  getuid
>  1360 java     RET   getuid 0
>  1360 java     CALL  open(0x100173a1,0,0x13)
>  1360 java     NAMI  "/emul/svr4/dev/zero"
>  1360 java     NAMI  "/dev/zero"
>  1360 java     RET   open 3
>  1360 java     CALL  mmap(0,0x1000,0x7,0x80000002,0x3,0)
>  1360 java     RET   mmap 268607488/0x1002a000
>  1360 java     CALL  open(0x100298bc,0,0xeffff63c)
>  1360 java     NAMI 
>"/emul/svr4/usr/local/jdk/bin/../jre/lib/sparc/green_threads/libhpi.so"
>  1360 java     NAMI 
>"/usr/local/jdk/bin/../jre/lib/sparc/green_threads/libhpi.so"
>  1360 java     RET   open 4
>...
>
>
>As chris, though, it's just a bit different:
>
>  1327 java     EMUL  "svr4"
>  1327 java     RET   execve JUSTRETURN
>  1327 java     CALL  getuid
>  1327 java     RET   getuid 1000/0x3e8
>  1327 java     CALL  getuid
>  1327 java     RET   getuid 1000/0x3e8
>  1327 java     CALL  open(0x100173a1,0,0x13)
>  1327 java     NAMI  "/emul/svr4/dev/zero"
>  1327 java     NAMI  "/dev/zero"
>  1327 java     RET   open 3
>  1327 java     CALL  mmap(0,0x1000,0x7,0x80000002,0x3,0)
>  1327 java     RET   mmap 268607488/0x1002a000
>  1327 java     CALL  open(0x100298bc,0,0xeffff644)
>  1327 java     NAMI  "/emul/svr4/usr/lib/libhpi.so"
>  1327 java     NAMI  "/usr/lib/libhpi.so"
>  1327 java     RET   open -1 errno 2 No such file or directory
>...and then ld.so.1 prints an error kills the process.
>
>This looks like some weirdness where the SunOS ld.so is checking the
>UID, and it's changing its library path based on what it finds.  Is
>this true?  If so, how can I get it to behave?
>
>TIA.
>
>Chris
>
>-- 
>---------------------------------------------------- chris@cjones.org
>Chris Jones                                          Mad scientist at large
>  www.netbsd.org www.postgresql.org www.schemers.org www.python.org
>
>-=-=-=-=-=-
>[Attachment type=application/pgp-signature, name=unknown]
>-=-=-=-=-=-