martedì 31 agosto 2010

Maxine linkage/JNI errors

After a source update of the Maxine's Mercurial clone, I was unable to run the virtual machine again. The machine exited with signal 11, even after a clean-build. I increased the debug messages and discovered the error:

loadSymbol(0x7f887f161128, "nativeSetGlobalThreadAndGCLock")
loadSymbol(0x7f887f161128, "nativeSetGlobalThreadAndGCLock") = (nil)
Error message: /sviluppo/java/src/maxine-
hg/maxine/Native/generated/linux/maxvm:
 undefined symbol: nativeSetGlobalThreadAndGCLock
SIGNAL: 11 [SIGSEGV]

Thanks to the help on the mailing list, I was able to find that the libjvm.so I was using was older than the Maxine executable I compiled, so there was a name clash on some variables. Here there is how I solved the problem:
  1. do a max clean to remove all generated objects;
  2. remove the whole content of the Native/generated/linux directory;
  3. do a max build to rebuild the virtual machine;
  4. launch again the boot image generator to get the maxine.vm image into the Native/generated/linux directory.

Nessun commento: