JDK-7109987 : SIGSEGV in nmethod::total_size
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: hs23
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 2011-11-09
  • Updated: 2011-11-09
  • Resolved: 2011-11-09
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
hs23Resolved
Related Reports
Duplicate :  
Description
JSR292 stress test crashes with

# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x0fa12d1c, pid=20165, tid=1247306928
#
# JRE version: 7.0-b147
# Java VM: Java HotSpot(TM) Embedded Client VM (23.0-b03-internal-201111072242.kvn.7059047-fastdebug mixed mode, sharing linux-ppc )
# Problematic frame:
# V  [libjvm.so+0x871d1c]  nmethod::total_size() const+0x4

Comments
EVALUATION Not embedded specific. Issue seems to have been introduced by 7097546 When compilation fails, PrintCompilation can crash because it tries to dump the size of the NULL buffer [2011-11-08T07:02:41.37] 240 COMPILE SKIPPED: CodeBuffer overflow (not retryable) [2011-11-08T07:02:41.37] 4556 240 # [2011-11-08T07:02:41.37] # A fatal error has been detected by the Java Runtime Environment: [2011-11-08T07:02:41.37] # [2011-11-08T07:02:41.37] # SIGSEGV (0xb) at pc=0x0fa12d1c, pid=20165, tid=1247306928 Here is a fix that should work: diff --git a/src/share/vm/compiler/compileBroker.cpp b/src/share/vm/compiler/compileBroker.cpp --- a/src/share/vm/compiler/compileBroker.cpp +++ b/src/share/vm/compiler/compileBroker.cpp @@ -1747,7 +1747,7 @@ tty->print("%7d ", (int) tty->time_stamp().milliseconds()); // print timestamp tty->print("%4d ", compile_id); // print compilation number tty->print("%s ", (is_osr ? "%" : " ")); - tty->print_cr("size: %d time: %d inlined: %d bytes", task->code()->total_size(), time.milliseconds(), task->num_inlined_bytecodes()); + tty->print_cr("size: %d time: %d inlined: %d bytes", (task->code() == NULL) ? 0 : task->code()->total_size(), time.milliseconds(), task->num_inlined_bytecodes()); } if (compilable == ciEnv::MethodCompilable_never) {
09-11-2011