United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-7000578 CMS: assert(SafepointSynchronize::is_at_safepoint()) failed: Else races are possible
JDK-7000578 : CMS: assert(SafepointSynchronize::is_at_safepoint()) failed: Else races are possible

Details
Type:
Bug
Submit Date:
2010-11-16
Status:
Closed
Updated Date:
2011-03-07
Project Name:
JDK
Resolved Date:
2011-03-07
Component:
hotspot
OS:
generic
Sub-Component:
gc
CPU:
generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
hs20
Fixed Versions:
hs20 (b04)

Related Reports
Backport:
Backport:
Relates:

Sub Tasks

Description
See:-

http://sqeweb.sfbay/nfs/results/vm/gtee/JDK7/NIGHTLY/VM/2010-11-15/Main_Baseline/javase/solaris-i586/client/mixed/solaris-i586_javase_client_mixed_JT_HS/workDir/compiler/6849574/Test/

and for the hs_err:-

http://sqeweb.sfbay/nfs/results/vm/gtee/JDK7/NIGHTLY/VM/2010-11-15/Main_Baseline/javase/solaris-i586/client/mixed/solaris-i586_javase_client_mixed_JT_HS/workDir/compiler/6849574/Test/hs_err_pid6569.log

Here's the pstack:-

core './workDir/compiler/6849574/Test/core' of 6569:	/export/local/common/jdk/baseline/solaris-i586/bin/java -Xmixed -clien
-----------------  lwp# 1 / thread# 1  --------------------
 fee92995 __lwp_wait (2, 8046e9c, fef31612, fee89847) + 15
 fee8989c _thrp_join (2, 0, 8046efc, 1) + 63
 fee899eb thr_join (2, 0, 8046efc, fef38084) + 23
 fef380cc ContinueInNewThread0 (fef3269c, 50000, 0, 8046f70) + 54
 fef365a0 ContinueInNewThread (8046fe8, 1, 806105c, 0, 8047d3c, 0) + a4
 fef32684 JLI_Launch (1, 806105c, 1, 0, 1, 0) + 278
 08050986 main     (17, 8047888, 80478e8, 804787c) + 72
 080507cd _start   (17, 8047970, 80479a8, 80479b0, 80479b8, 80479cc) + 7d
-----------------  lwp# 2 / thread# 2  --------------------
 fee92945 _lwp_kill (2, 6, fcfbe768, fee39f3e) + 15
 fee39f4a raise    (6, 0, fcfbe7b8, fee119da) + 22
 fee119fa abort    (fecd3d08, 304183f, 0, 50, 0, 2) + f2
 fe47e336 void os::abort(bool) (1, febdfb69, 1, fece85c0) + 12a
 fe7e5fba void VMError::report_and_die() (fcfbe930, fe92b010, fcfbea08, fd9bae8f) + a46
 fd9baeb4 void report_vm_error(const char*,int,const char*,const char*) (fe92b05f, 449, fe92b028, fe92b010) + 534
 fd868c24 bool CompactibleFreeListSpace::obj_is_alive(const HeapWord*)const (80c5158, f6c00000, fcfbeb88, 0) + 194
 fd882542 unsigned VerifyAllBlksClosure::do_blk(HeapWord*) (fcfbeb20, f6c00000, fcfbeb88, fd879ce4) + 8ba
 fd87a005 void CompactibleFreeListSpace::verify(bool)const (80c5158, 0, 0, fe7295ee) + 349
 fd9120a6 void ConcurrentMarkSweepGeneration::verify(bool) (80c4fe0, 1, 1, fdb39375) + 66
 fdb1230f void GenCollectedHeap::verify(bool,bool,bool) (8083280, 1) + 10f
 fe75d139 void Universe::verify(bool,bool,bool) (1, 0, 1, fe719104) + 1d9
 fe71913e int Threads::create_vm(JavaVMInitArgs*,bool*) (fcfbef40, fcfbeefc, fcfbef40, fddcc9a9) + 2aa
 fddcca0f JNI_CreateJavaVM (fcfbefa0) + 77
 fef348f5 InitializeJVM (fcfbefa0, fcfbefa4, fcfbefa8, fef326aa) + 101
 fef326f3 JavaMain (8046f70, fef10000, fcfbefe8, fee8d61e) + 57
 fee8d673 _thrp_setup (fcf50240) + 9b
 fee8d920 _lwp_start (fcf50240, 0, 0, 0, 0, 0)
-----------------  lwp# 3 / thread# 3  --------------------
 fee92a85 ___lwp_cond_wait (808494c, 8084934, 0, 1) + 15
 fe490b7d void os::PlatformEvent::park() (8084900, feaebfa3, 0, fe3d2719) + 145
 fe3d2ab5 int Monitor::IWait(Thread*,long long) (8083590, 8083800, 0, 0) + 3ad
 fe3d8ac8 bool Monitor::wait(bool,long,bool) (8083590, 1, 0, 0) + 66c
 fe83634c void GangWorker::loop() (8083800, 0, 0, 8083800, fecd32e8, fec812e0) + 304
 fe835ed8 void GangWorker::run() (8083800, fecf5288, 0, fe47a913) + 24
 fe47afcd java_start (8083800, fef10000, fad7dfe8, fee8d61e) + 711
 fee8d673 _thrp_setup (fcf50a40) + 9b
 fee8d920 _lwp_start (fcf50a40, 0, 0, 0, 0, 0)
-----------------  lwp# 4 / thread# 4  --------------------
 fee92a85 ___lwp_cond_wait (808604c, 8086034, 0, 1) + 15
 fe490b7d void os::PlatformEvent::park() (8086000, feaebfa3, 0, fe3d2719) + 145
 fe3d2ab5 int Monitor::IWait(Thread*,long long) (8083590, 8085000, 0, 0) + 3ad
 fe3d8ac8 bool Monitor::wait(bool,long,bool) (8083590, 1, 0, 0) + 66c
 fe83634c void GangWorker::loop() (8085000, 0, 0, 8085000, fecd32e8, fec812e0) + 304
 fe835ed8 void GangWorker::run() (8085000, fecf5288, 0, fe47a913) + 24
 fe47afcd java_start (8085000, fef10000, facfcfe8, fee8d61e) + 711
 fee8d673 _thrp_setup (fcf51240) + 9b
 fee8d920 _lwp_start (fcf51240, 0, 0, 0, 0, 0)
-----------------  lwp# 5 / thread# 5  --------------------
 fee92a85 ___lwp_cond_wait (8102c4c, 8102c34, f0bcd698, fee674e5, 0, 0) + 15
 fee6750c _lwp_cond_timedwait (8102c4c, 8102c34, f0bcd6f0, 1) + 34
 fe490fd6 int os::PlatformEvent::park(long long) (8102c00, c8, 0, fe3d2719) + 286
 fe3d2a4d int Monitor::IWait(Thread*,long long) (807a2c8, 8101c00, c8, 0) + 345
 fe3d8ac8 bool Monitor::wait(bool,long,bool) (807a2c8, 1, c8, 0) + 66c
 fd96177d void ConcurrentMarkSweepThread::run() (8101c00, fecf5288, 0, fe47a913) + 165
 fe47afcd java_start (8101c00, fef10000, f0bcdfe8, fee8d61e) + 711
 fee8d673 _thrp_setup (fcf51a40) + 9b
 fee8d920 _lwp_start (fcf51a40, 0, 0, 0, 0, 0)

I suspect we are so early in JVM start-up that SafepointSynchronize::is_at_safepoint() doesn't
yet answer precisely and we need to weaken the assert using something like !Universe::is_initialized() or
similar.
com.sun.javatest.regtest.MainWrapper /export/local/39839.JDK7.NIGHTLY.VM+solaris-i586_javase_client_mixed_JT_HS/results/workDir/classes/compiler/6849574/Test.jta


compiler/6849574/Test.java

                                    

Comments
EVALUATION

Benign to product build; assert needs slight weakening, see suggested fix.
                                     
2010-11-16
SUGGESTED FIX

Weaken the condition in the assert with || !Universe::is_fully_initialized()
for the maiden +VerifyBeforeGC at which point SafepointSynchronize::_state is _not_synchronized (per static initializer).
                                     
2010-11-16
EVALUATION

http://hg.openjdk.java.net/jdk7/hotspot-gc/hotspot/rev/9eecf81a02fb
                                     
2010-11-17
EVALUATION

http://hg.openjdk.java.net/jdk7/build/hotspot/rev/9eecf81a02fb
                                     
2010-12-25



Hardware and Software, Engineered to Work Together