http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57074
Bug #: 57074 Summary: gcc-4.8.0 libgcj regression on 32bit Power architecture Classification: Unclassified Product: gcc Version: 4.8.1 Status: UNCONFIRMED Severity: critical Priority: P3 Component: libgcj AssignedTo: unassig...@gcc.gnu.org ReportedBy: r...@us.ibm.com GCC Revision 186687 has been identified as causing a regression in PowerC 32-bit libgcj: http://gcc.gnu.org/viewcvs/gcc?view=revision&revision=186687 I've verified that this fails with upstream GCC: ryanarn@bns:~> /home/bergner/gcc/install/gcc-fsf-4_8-java32/bin//gkeytool -import -alias `basename 99.pem .pem` -keystore cacerts -storepass '' -file 99.pem Exception in thread "main" java.lang.NoClassDefFoundError: gnu.classpath.tools.keytool.Main at java.lang.Class.initializeClass(libgcj.so.14) Caused by: java.lang.IllegalMonitorStateException: current thread not owner at java.lang.Object.notifyAll(libgcj.so.14) at gnu.gcj.runtime.SystemClassLoader.findClass(libgcj.so.14) at java.lang.ClassLoader.loadClass(libgcj.so.14) at java.lang.ClassLoader.loadClass(libgcj.so.14) at java.lang.Class.initializeClass(libgcj.so.14) If this wasn't failing it would be reporting: ryanarn@bns:~> ryanarn@bns:~> /home/bergner/gcc/install/gcc-fsf-4_8-java/bin/gkeytool -import -alias `basename 99.pem .pem` -keystore cacerts -storepass '' -file 99.pem keytool error: java.security.InvalidParameterException: File object [99.pem] MUST be an existing readable file /home/bergner/gcc/install/gcc-fsf-4_8-java/bin/gkeytool -import -alias `basename 99.pem .pem` -keystore cacerts -storepass '' -file 99.pem keytool error: java.security.InvalidParameterException: File object [99.pem] MUST be an existing readable file I'm able to trap on the catch, but trying to capture the throw or identify the state of the GCJ locking mechanisms when the problem happens has proven problematic. Turning on logging and lock debugging might help, but there's a lot going on in the state initialization. Here's a back trace: Breakpoint 8, _Jv_Linker::wait_for_state (klass=klass@entry=0x10020018 <gnu::classpath::tools::keytool::Main::class$>, state=state@entry=9) at ../../../libjava/link.cc:2086 2086 throw exc; $8 = "In the wait_for_state catch." klass: 0x10020018 (gdb) bt #0 _Jv_Linker::wait_for_state (klass=klass@entry=0x10020018 <gnu::classpath::tools::keytool::Main::class$>, state=state@entry=9) at ../../../libjava/link.cc:2086 #1 0x0e2c2aec in java::lang::Class::initializeClass (this=0x10020018 <gnu::classpath::tools::keytool::Main::class$>) at ../../../libjava/java/lang/natClass.cc:728 #2 0x0e2c39b4 in _Jv_InitClass (klass=<optimized out>) at ../../../libjava/java/lang/Class.h:742 #3 0x0fe3eabc in gnu.classpath.tools.keytool.Main.main(java.lang.String[])void (args=@f7d4ad50) at ../../../../../libjava/classpath/tools/gnu/classpath/tools/keytool/Main.java:137 #4 0x0e2b63c0 in gnu::java::lang::MainThread::call_main (this=this@entry=0xf7ce7f60) at ../../../libjava/gnu/java/lang/natMainThread.cc:54 #5 0x0e33f3dc in gnu.java.lang.MainThread.run()void (this=@f7ce7f60) at /usr/src/debug/gcc-4.8.0-20130412/libjava/gnu/java/lang/MainThread.java:106 #6 0x0e2cce88 in _Jv_ThreadRun (thread=0xf7ce7f60) at ../../../libjava/java/lang/natThread.cc:335 #7 0x0e26e6fc in _Jv_RunMain (vm_args=vm_args@entry=0x0, klass=<optimized out>, name=name@entry=0x0, argc=<optimized out>, argv=<optimized out>, is_jar=<optimized out>) at ../../../libjava/prims.cc:1790 #8 0x0e26e944 in _Jv_RunMain (klass=<optimized out>, name=name@entry=0x0, argc=<optimized out>, argv=<optimized out>, is_jar=is_jar@entry=false) at ../../../libjava/prims.cc:1815 #9 0x0e26e9a0 in JvRunMain (klass=<optimized out>, argc=<optimized out>, argv=<optimized out>) at ../../../libjava/prims.cc:1821 #10 0x0d1c17f4 in generic_start_main (main=0x100004c0 <main>, argc=10, ubp_av=0xfffef6f4, auxvec=0xfffef774, init=<optimized out>, rtld_fini=<optimized out>, stack_end=<optimized out>, fini=<optimized out>) at ../csu/libc-start.c:258 #11 0x0d1c1990 in __libc_start_main (argc=<optimized out>, ubp_av=<optimized out>, ubp_ev=<optimized out>, auxvec=<optimized out>, rtld_fini=<optimized out>, stinfo=<optimized out>, stack_on_entry=<optimized out>) at ../sysdeps/unix/sysv/linux/powerpc/libc-start.c:91 #12 0x00000000 in ?? ()