United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: 7144318 GCLocker assert failure: assert(_needs_gc || SafepointSynchronize::is_at_safepoint(
7144318 : GCLocker assert failure: assert(_needs_gc || SafepointSynchronize::is_at_safepoint(

Details
Type:
Bug
Submit Date:
2012-02-09
Status:
Closed
Updated Date:
2013-04-23
Project Name:
JDK
Resolved Date:
2012-03-24
Component:
hotspot
OS:
generic
Sub-Component:
gc
CPU:
generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
hs23
Fixed Versions:
hs23

Related Reports
Backport:
Backport:

Sub Tasks

Description
There are nightly failures in the G1 GC baseline.

#  Internal Error (C:\temp\jprt\P1\063915.jcoomes\source\src\share\vm\memory/gcLocker.inline.hpp:31), pid=12028, tid=20836
#  assert(_needs_gc || SafepointSynchronize::is_at_safepoint()) failed: only read at safepoint

The assert started to show up after the hotspot-main -> hotspot-gc integration, which brought over the fix for:
7129164 - JNI Get/ReleasePrimitiveArrayCritical don't scale

                                    

Comments
EVALUATION

http://hg.openjdk.java.net/lambda/lambda/hotspot/rev/ad3b47344802
                                     
2012-03-22
EVALUATION

http://hg.openjdk.java.net/hsx/hotspot-gc/hotspot/rev/ad3b47344802
                                     
2012-02-18
EVALUATION

http://hg.openjdk.java.net/hsx/hotspot-comp/hotspot/rev/ad3b47344802
                                     
2012-02-16
EVALUATION

There's a minor race when clearing the _needs_gc flag.  It transitions to true during a safepoint but the transition back is outside of a safepoint.  needs_gc() && is_active() has two separate reads of _needs_gc and it can change in between.  The logic should be changed so that they assert doesn't trigger in this case.
                                     
2012-02-10



Hardware and Software, Engineered to Work Together