Subject: Re: 32 bit linux java
To: None <port-amd64@netbsd.org>
From: Arto Huusko <arto.huusko@pp2.inet.fi>
List: port-amd64
Date: 11/15/2007 23:20:56
> No change. Same symptoms as I described earlier: two java
> processes eating system time, ktrace shows the other process
> in a loop calling sched_yield (top shows state CPU for that
> process) and the other process is not doing anything according
> to ktrace (top shows state RUN).

A few pointers I have found out about this. Hopefully this'll
help someone in finding the problem:


When the processes are in the state described above, I looked
at vmstat -e and vmstat -s outputs. In vmstat -e the line

	uvmmap mlk_call

increases at a huge rate: something like million every few
seconds (I have a sparc64 with uptime of 9 days, for it
uvmmap mlk_call reports total of ~130 million; after testing this
problem, the amd64 with uptime of 12 minutes reports total of
~180 million).

In vmstat -s, total faults taken and traps increases at a
similarly huge rate when the processes are running.


Looking at ktrace output, the last things the process calling
sched_yield before it starts the yield loop is call mprotect for
a few pages. I don't have the trace at hand, so I don't recall
the exact changes it makes.

I learned from JDK 1.5.0_14 (which unfortunately didn't fix
this problem) release notes that JVM uses SIGSEGV for some
communications between threads. Maybe this has something to do
with the emul problem. For some more details on this:

	http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6546278