[concurrency-interest] Running ForkJoin framework on J9 virtual machine

Rémi Forax forax at univ-mlv.fr
Thu May 14 20:32:54 EDT 2009

Binh Le a écrit :
> When I run the Fibonacci program using the FJ framework with J9 on a 
> Linux box, I got the following exception (presumably related to JNI). 
> I just wonder if someone also run into the same problem. It appears 
> that IBM's javac can compile FJ programs but J9 can not run FJ 
> bytecode. When I browse the FJ framework implementation, it uses a 
> class named "Unsafe". Probably this class is the cause for the exception.
sun.misc.Unsafe is a class containing lot of magic traps to the hotspot 
VM (technically it's doesn't use JNI).
You can find it in all java environment that use the OpenJDK implementation
for their VM (Sun JDK, JRockit, AppleJDK) but not IBM one.

> I would appreciate pointers to resolve the problems of running FJ 
> programs with J9. Thanks.
> Exception in thread "main" java.lang.UnsatisfiedLinkError: 
> sun/misc/Unsafe.putOrderedObject(Ljava/lang/Object;JLjava/lang/Object;)V
>         at 
> jsr166y.ForkJoinWorkerThread.setSlot(ForkJoinWorkerThread.java:395)
>         at 
> jsr166y.ForkJoinWorkerThread.pushTask(ForkJoinWorkerThread.java:424)
>         at jsr166y.ForkJoinTask.fork(ForkJoinTask.java:481)
>         at jsr166y.ForkJoinTask.invokeAll(ForkJoinTask.java:550)
>         at LBJ2.nlp.coref.CorefRootAction.compute(CorefRootAction.java:22)
>         at jsr166y.RecursiveAction.exec(RecursiveAction.java:147)
>         at jsr166y.ForkJoinTask.quietlyExec(ForkJoinTask.java:422)
>         at 
> jsr166y.ForkJoinWorkerThread.mainLoop(ForkJoinWorkerThread.java:327)
>         at jsr166y.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:312)
> -- 
> Binh Le
> http://www.cs.uiuc.edu/homes/binhle2/

More information about the Concurrency-interest mailing list