Subject: Re: java on current?
To: Christos Zoulas <christos@astron.com>
From: Chavdar Ivanov <ci4ic4@gmail.com>
List: current-users
Date: 12/18/2006 11:26:10
On 12/18/06, Christos Zoulas <christos@astron.com> wrote:
> In article <20061218135116.161a6a45@garlique.algebras.org>,
> George Michaelson  <ggm@apnic.net> wrote:
>
> >sure. Here is the kdump output over the ktrace of java -jar
> > 25114      1 java     CALL  readlink(0x80555e1,0xbfbfb710,0xfff)
> > 25114      1 java     NAMI  "/emul/linux/proc/self/exe"
> > 25114      1 java     NAMI  "/emul/linux"
> > 25114      1 java     NAMI  "/emul/linux/proc/self/exe"
> > 25114      1 java     RET   readlink 1
>
> This is the problem. readlink returns only 1 which means it returns /

On i386 4.99.5 as of 05/12 readlink returns the normal length and java
works. On the same 4.99.5 as of 10/12 it returns 1. Something has been
done in between - perhaps in readlink itself?

I noticed that there is quite a bit of a change in kern/vfs_syscalls.c
on the 9th of December, so I downloaded v 1.279 and and compiled this
in my kernel; it did not work to begin with - there was no WANTPARENT
defined anywhere, which is in the said version, so I removed this flag
from the 1.279 version and was able to get a kernel. This could not
complete multiuser boot - it crashed at ldconfig start - but in single
user java worked without problem (just 'java -version').

So the problem appears to be that commit. (I tried to replace
WANTPARENT with LOCKPARENT in the NDINIT call to avoid the ldconfig
crash, but all I got was another one - locking against myself - so I
gave up).





> I recall that there was a problem with procfs permissions recently,
> has that been fixed?

It seems not - just root can read /emul/linux/proc :

lisa% cat /emul/linux/proc/meminfo
cat: /emul/linux/proc/meminfo: Operation not permitted
lisa% ls -ld /emul/linux/proc/meminfo
-r--r--r--  1 root  wheel  0 Dec 18 11:24 /emul/linux/proc/meminfo
lisa% sudo  cat /emul/linux/proc/meminfo
        total:    used:    free:  shared: buffers: cached:
Mem:  1040408576 188416000 851992576        0 21020672 142876672
Swap: 1074475008        0 1074475008
MemTotal:   1016024 kB
MemFree:     832024 kB
MemShared:        0 kB
Buffers:      20528 kB
Cached:      139528 kB
SwapTotal:  1049292 kB
SwapFree:   1049292 kB
lisa%

But this is not the problem with java - it's the same for root.

>  Also if you can ^Z the java process before it exits,
> you can cd to /emul/linux/proc/<java-pid> and ls -l exe and see what
> it says.
>
> christos
>
>

Chavdar