All Linux JDK with Hotspot or JIT unstable on FreeBSD

All Linux JDK with Hotspot or JIT unstable on FreeBSD

Post by Bill Hu » Sat, 25 May 2002 08:15:16




>    It is known that linux jdks with hotspot are not stable on
>    FreeBSD linux emulation. Must be something hard to fix,
>    since it has been like this for quite a long time.
>    (maybe this has something to do with signal handling
>    differences between linux and freebsd ?)

It's almost certain the case. Linux's clone() uses SIGCHLD to notify
thread termination and other crazy non-Posix things in their threading
system. They can't implement the full specificiation without some kind
of kernel based signal sharing and other things. The HotSpot code
supporting this stuff is all over the place both inside and outside of
their threading implementation.

Quote:>    Yes. Maybe someone on freebsd-emulation mailing
>    list could help. Before this gets fixed, one must be mad
>    to run a production server using linux-jdk + hotspot + freebsd.
>    Current solutions are (to my understanding) to either
>    use native jdk 1.3 (which has no hotspot - yet - so performance
>    is not so great) or install linux to your server and use linux-jdk
>    (which works ok but you can kiss goodbye for freebsd :-()

>            Ari S.

The FreeBSD port of HotSpot over here is half running. I'm having problems
with the ABI layer that mediates/marshalls native calls from the HotSpot
system to the raw JVM. It uses the JVM for first class type support facilities.

Threads spawn and block correctly, the HotSpot interpreter subsystem initializes
correctly, classes initialize correctly, but it's having problems doing some
kind of JVM_ArrayCopy(), which implies some kind of stack corruption problem.

It's encouraging, yet disappointing since I'm just this random *guy* that's
just getting into what is probably the most advanced compiler of its kind on
that planet that's written in high complicated C++ program/class structure.

It's basically a SMPng-ed GCC in C++.

http://www.cs.ucsb.edu/labs/oocsb/self/

The Self runtime is what HotSpot is originally based upon and does insanely
complicate dynamic type analysis, adaptive inlining and other things that
pretty much represents what the state-of-the-art is for this kind of system.

bill


with "unsubscribe freebsd-java" in the body of the message

 
 
 

All Linux JDK with Hotspot or JIT unstable on FreeBSD

Post by Tim E Schafe » Sat, 25 May 2002 08:51:50


Have I told you all lately how much I really appreciate the hard work
put
into making Java on FreeBSD a reality :)

I may have to use Linux for some up coming stuff where native threads is
a make or break feature

But I dream of the day when FreeBSD is on equal ground (or better!) in
the Java arena

That said I place here a shameless plug for the only Linux a FreeBSD
user could love (or at least like)

www.gentoo.org

They have a ports system!
Unfortunately they are more concerned with pushing the envelope than
with the stability and security I've come to know and love in FreeBSD.

So again, many thanks to those that have gotten Java on FreeBSD to where
it is now. I look forward to where it will be.

--------------------------------------------

Programmer
800-562-9915 x190 or 916-376-6190

Associated Global Systems
3231 Evergreen Ave
West Sacramento, CA 95691
--------------------------------------------

-----Original Message-----


Sent: Thursday, May 23, 2002 4:14 PM
To: Ari Suutari

Subject: Re: All Linux JDK with Hotspot or JIT unstable on FreeBSD


>    It is known that linux jdks with hotspot are not stable on
>    FreeBSD linux emulation. Must be something hard to fix,
>    since it has been like this for quite a long time.
>    (maybe this has something to do with signal handling
>    differences between linux and freebsd ?)

It's almost certain the case. Linux's clone() uses SIGCHLD to notify
thread termination and other crazy non-Posix things in their threading
system. They can't implement the full specificiation without some kind
of kernel based signal sharing and other things. The HotSpot code
supporting this stuff is all over the place both inside and outside of
their threading implementation.

>    Yes. Maybe someone on freebsd-emulation mailing
>    list could help. Before this gets fixed, one must be mad
>    to run a production server using linux-jdk + hotspot + freebsd.
>    Current solutions are (to my understanding) to either
>    use native jdk 1.3 (which has no hotspot - yet - so performance
>    is not so great) or install linux to your server and use
linux-jdk
>    (which works ok but you can kiss goodbye for freebsd :-()

>            Ari S.

The FreeBSD port of HotSpot over here is half running. I'm having
problems
with the ABI layer that mediates/marshalls native calls from the HotSpot
system to the raw JVM. It uses the JVM for first class type support
facilities.

Threads spawn and block correctly, the HotSpot interpreter subsystem
initializes
correctly, classes initialize correctly, but it's having problems doing
some
kind of JVM_ArrayCopy(), which implies some kind of stack corruption
problem.

It's encouraging, yet disappointing since I'm just this random *guy*
that's
just getting into what is probably the most advanced compiler of its
kind on
that planet that's written in high complicated C++ program/class
structure.

It's basically a SMPng-ed GCC in C++.

http://www.cs.ucsb.edu/labs/oocsb/self/

The Self runtime is what HotSpot is originally based upon and does
insanely
complicate dynamic type analysis, adaptive inlining and other things
that
pretty much represents what the state-of-the-art is for this kind of
system.

bill


with "unsubscribe freebsd-java" in the body of the message


with "unsubscribe freebsd-java" in the body of the message


 
 
 

All Linux JDK with Hotspot or JIT unstable on FreeBSD

Post by Tim E Schafe » Sat, 25 May 2002 10:16:24


Please, please do not quit.
You've come so far.

If there is anything I can do to help I would be honored to do so.

My understanding from earlier posts is that there are some legal issues
with this being an open process.  What if anything could I do to become
involved at the code level (or any level I might be useful) ?

--------------------------------------------

Programmer
800-562-9915 x190 or 916-376-6190

Associated Global Systems
3231 Evergreen Ave
West Sacramento, CA 95691
--------------------------------------------

-----Original Message-----


Sent: Thursday, May 23, 2002 5:40 PM
To: Tim E Schafer

Subject: Re: All Linux JDK with Hotspot or JIT unstable on FreeBSD


> Have I told you all lately how much I really appreciate the hard work
> put
> into making Java on FreeBSD a reality :)

> I may have to use Linux for some up coming stuff where native threads
is
> a make or break feature

Because of the fact that our libc_r system living in one domain, context
switch times and waking up a thread is pretty much just a function call
away to the UTS. That means that I'm expecting threading performance to
be much better than the clone() model when this is all done.

Only an empirical analysis will prove or disprove this, but the claim
makes sense since I've been in both the libc_r and HotSpot internals.

KSE's should also make it rock.

> But I dream of the day when FreeBSD is on equal ground (or better!) in
> the Java arena

We have a good chance of being exactly that. But a port of 1.4 is needed
which means that we must have HotSpot working. -classic has been removed
from that tree. NIO, SMPng and KSEs are all needed for this to come into
play.

We'll see. Personally, I'm getting pooped doing this and comtemplated
quitting last night. I feel different today and I suspect I was
suffering
from depression as a result of caffine withdrawl. ;) But this project
is definitely pushing to the edge of my inherent technical abilty and I
not use to being overrun with this amount of technical knowledge.

In other words, I'm use to conquering all. ;)

bill


with "unsubscribe freebsd-java" in the body of the message


with "unsubscribe freebsd-java" in the body of the message

 
 
 

All Linux JDK with Hotspot or JIT unstable on FreeBSD

Post by Tim E Schafe » Sun, 26 May 2002 05:58:52


Thanks, I'll have a look at that

I'm probably going to hold out for the native port though.
Based on the fact that the native port when released as binary will be
certified ... where as the Linux one is already certified, yet there
isn't any way to guarantee that FreeBSD Linux compatibility is
certifiably as good
as native Linux (at least I don't know of such a test)

--------------------------------------------

Programmer
800-562-9915 x190 or 916-376-6190

Associated Global Systems
3231 Evergreen Ave
West Sacramento, CA 95691
--------------------------------------------

-----Original Message-----


Sent: Friday, May 24, 2002 9:38 AM
To: Tim E Schafer
Cc: 'Java FreeBSD'
Subject: Re: All Linux JDK with Hotspot or JIT unstable on FreeBSD


> While I understand that hotspot and native threads are separate things
> I noticed that when I use -classic with the Sun Linux JDK 1.3.1 it
> doesn't seem to use native threads either

> So I figured it was an all or nothing thing.

Hmm, looks like the Sun .java_wrapper currently enforces that for Linux:

if [ "${vmtype}" = "classic" ]; then
    ttype=green_threads
    LD_BIND_NOW=yes
    export LD_BIND_NOW
    _JVM_THREADS_TYPE=green_threads
    export _JVM_THREADS_TYPE
fi            

You could try removing the green_threads setting and see how it goes.
I was assuming because FreeBSD doesn't force a threading subsystem that
Linux wouldn't, but it looks like I was wrong.

BTW, mandating a specific threading subsystem goes against a core tenet
of Java.  For instance, the JCK testing suite specifically disallows
tests
that rely on a specific underelying threading model.

--

Eyes Beyond                           Web   : http://www.eyesbeyond.com
Information Technology


with "unsubscribe freebsd-java" in the body of the message


with "unsubscribe freebsd-java" in the body of the message