JDK-4503832 : atg server failed with Merlin b79 on x86 in C2 mixed mode
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 1.3.0_03,1.3.1_02,1.4.0
  • Priority: P1
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic,solaris_7,solaris_8
  • CPU: generic,sparc
  • Submitted: 2001-09-17
  • Updated: 2002-05-21
  • Resolved: 2001-10-11
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 Other
1.3.1_03 03Fixed 1.4.0Fixed
Related Reports
Duplicate :  
Duplicate :  
Relates :  
Description
On machine jtgbp62d.sfbay, with Merlin build 79, atg server hang after 30 minutes with -server flag.
Error message in atgserver.log
"Unexpected Signal: 11, PC: de9671c8"

Segv in "compute_monomorphic_entry". 
Stack trace: 
  ---- called from signal handler with signal 11 (SIGSEGV) ------ 
  [9] CompiledIC::compute_monomorphic_entry(0x827b074), at 0xde9671c8 
  [10] OptoRuntime::inner_resolve_helper(0x827a928), at 0xde95202c 
  [11] OptoRuntime::resolve_helper(0x827a928), at 0xde951e46 
  [12] OptoRuntime::resolve_opt_virtual_call_C(0x827a928), at 0xde96b7f7

log files are under /net/jtgb4u4c.sfbay/export/sail9/bigapps_log/solaris/merlin_b79/jtgbp62d/atg*
there is a gcore (core.317) under  
/net/jtgb4u4c.sfbay/export/sail9/bigapps_log/solaris/merlin_b79/jtgbp62d/atg*


###@###.### 2001-09-17

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: 1.3.1_03 generic FIXED IN: 1.3.1_03 merlin-beta3 INTEGRATED IN: 1.3.1_03 merlin-beta3 VERIFIED IN: merlin-rc1
14-06-2004

WORK AROUND The problem is a race between the deoptimization of some method X and the dynamic linkage which occurs at the first call to X. The linker asks for the compiled code twice (in rapid succession) and loses if the compiled code is thrown away between the two queries. This bug often shows up during start-up or other phase changes in the application, since it requires the linker to be performing a one-time initialization a call site. Therefore, perturbing the application so that it performs less deoptimization should lower the probability of this bug hitting. One way to attempt this is to have the compiler compile more selectively and slowly, such as with a setting like -XX:CompileThreshold=20000 . ###@###.### 2002-02-19
19-02-2002

EVALUATION Diagnosis: Race condition between call to methodOop::has_compiled_code and methodOop::code. The methodOop::_code field slowly oscillates between null and non-null, and the hapless caller of has_compiled_code picked up a newly-set null pointer and indirected through it. Solution: Visit all places where has_compiled_code() and code()!=NULL predicates are used, and change them to fetch the code exactly once instead of twice. ###@###.### 2001-09-28 The bug is fixed in JDK1.4.0-beta3-b84(merlin-beta3) ###@###.### 2001-12-10 The bug is also fixed in 1.3.1_03, not yet released, but soon. ###@###.### 2002-01-03
10-12-2001

SUGGESTED FIX This bug is part of the problems seen at E&Y on their appserver (esc 532166). The following is a diff to 1.3.1 FCS that was applied to provide a fix for their problems: src/share/vm/code/compiledIC.cpp ------- compiledIC.cpp ------- 321c321,322 < if (method->has_compiled_code()) { --- > nmethod* method_code = method->code(); /* bug# 4503832 */ > if (method_code != NULL ) { 325c326 < info._entry = method->code()->verified_entry_point(); --- > info._entry = method_code->verified_entry_point(); 328c329 < info._entry = method->code()->entry_point(); --- > info._entry = method_code->entry_point(); src/share/vm/compiler/compileBroker.cpp ------- compileBroker.cpp ------- 592c592,593 < if (method->has_compiled_code()) return method->code(); --- > nmethod* method_code = method->code(); > if (method_code != NULL) return method_code; /* bug# 4503832 */ src/share/vm/compiler/inlining.cpp ------- inlining.cpp ------- 67c67,68 < if( m->has_compiled_code() && m->code()->instructions_size() > InlineSmallCode ) --- > nmethod* m_code = m->code(); > if( m_code != NULL && m_code->instructions_size() > InlineSmallCode ) /* bug# 4503832 */ ###@###.### 2001-10-05
05-10-2001