JDK-8150738 : [JVMCI] runtime/CommandLine/TraceExceptionsTest.java fails with: java.lang.RuntimeException: '' missing from stdout/stderr
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 9
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: linux
  • CPU: x86
  • Submitted: 2016-02-26
  • Updated: 2017-08-07
  • Resolved: 2016-02-26
JDK 9
9 b110Fixed
Related Reports
Relates :  
Description
This failure is showing up now that JDK-8144953 is fixed:

...
[0.641s][info][exceptions] Exception <a 'java/lang/ClassNotFoundException'> (0x0000000101cdc178) thrown in compiled method <{method} {0x00007fa778abf720} 'newBundle' '(Ljava/lang/String;Ljava/util/Locale;Ljava/lang/String;Ljava/lang/ClassLoader;Z)Ljava/util/ResourceBundle;' in 'java/util/ResourceBundle$Control'> at PC 0x00007fa8c30590fc for thread 0x00007fa8d0025000
[0.641s][info][exceptions] Thread 0x00007fa8d0025000 continuing at PC 0x00007fa8c305ba4a for exception thrown at PC 0x00007fa8c30590fc
];
 stderr: [Error: Could not find or load main class NoClassFound
]
 exitValue = 1

java.lang.RuntimeException: '<a 'java/lang/ClassNotFoundException': NoClassFound>' missing from stdout/stderr 

	at jdk.test.lib.OutputAnalyzer.shouldContain(OutputAnalyzer.java:138)
	at TraceExceptionsTest.main(TraceExceptionsTest.java:41)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:520)
	at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:92)
	at java.lang.Thread.run(Thread.java:804)

Comments
As [~coleenp] pointed out it's a missing change in JVMCI: diff -r 2c15b0c12165 src/share/vm/jvmci/jvmciRuntime.cpp --- a/src/share/vm/jvmci/jvmciRuntime.cpp Wed Feb 24 12:04:35 2016 -0800 +++ b/src/share/vm/jvmci/jvmciRuntime.cpp Fri Feb 26 10:16:47 2016 -0800 @@ -293,13 +293,11 @@ JRT_ENTRY_NO_ASYNC(static address, excep // tracing if (log_is_enabled(Info, exceptions)) { ResourceMark rm; - log_info(exceptions)("Exception <%s> (" INTPTR_FORMAT ") thrown in" - " compiled method <%s> at PC " INTPTR_FORMAT - " for thread " INTPTR_FORMAT, - exception->print_value_string(), - p2i((address)exception()), - nm->method()->print_value_string(), p2i(pc), - p2i(thread)); + stringStream tempst; + tempst.print("compiled method <%s>\n" + " at PC" INTPTR_FORMAT " for thread " INTPTR_FORMAT, + nm->method()->print_value_string(), p2i(pc), p2i(thread)); + Exceptions::log_exception(exception, tempst); } // for AbortVMOnException flag NOT_PRODUCT(Exceptions::debug_check_abort(exception));
26-02-2016