Bad reference map created by IA32 baseline compiler

Description

Running the test on a BaseBase build:

public class Main {
public static void main(String args[]) {
createThread();
infiniteLoop();
}

private static void infiniteLoop() {
System.out.println("Waiting...");
while (true);
}

private static void createThread() {
Thread t1 = new Thread (new Runnable() {
public void run() {
System.out.println("Sleeping for 10 seconds");
try {
Thread.sleep(10000);
} catch (InterruptedException i) {
System.err.println;
}
System.out.println("Going to call System.gc()");
System.gc();
}
});
t1.start();
}
}

Results in a bad reference map:

validRef: TIB outside heap, ref = 0x7080a1ba tib = 0x00547e83
TIB=0x00547e83 STATUS=0x15ff067e
Invalid ref reported while scanning stack

— METHOD (BASELINE) LMain;.infiniteLoop ()V
— fp = 0x714cde9c code base = 0x7080a16c code offset = 0x0000004e
line number = 9
0x714cde8c:REF=0x7080a1ba TIB=0x00547e83 STATUS=0x15ff067e (INVALID TIB: CLASS NOT ACCESSIBLE)
0x714cde88 (0x00000000): 0x714cde9c
0x714cde8c (0x00000004): 0x7080a1ba
0x714cde90 (0x00000008): 0x00000000
0x714cde94 (0x0000000c): 0x00000000
0x714cde98 (0x00000010): 0x000033ec

Dumping stack starting at frame with bad ref:

– Stack –
at LMain; infiniteLoop()V at line 9
at LMain; main([Ljava/lang/StringV at line 4
at <invisible method>
at Lorg/jikesrvm/runtime/Reflection; outOfLineInvoke(Lorg/jikesrvm/classloader/RVMMethod;Ljava/lang/Object;[Ljava/lang/Object;Z)Ljava/lang/Object; at line 190
at Lorg/jikesrvm/runtime/Reflection; invoke(Lorg/jikesrvm/classloader/RVMMethod;Lorg/jikesrvm/runtime/ReflectionBase;Ljava/lang/Object;[Ljava/lang/Object;Z)Ljava/lang/Object; at line 81
at Lorg/jikesrvm/scheduler/MainThread; run()V at line 202
at Lorg/jikesrvm/scheduler/RVMThread; run()V at line 622
at Lorg/jikesrvm/scheduler/RVMThread; startoff()V at line 647

– Stack –
at Lorg/jikesrvm/scheduler/greenthreads/GreenProcessor; dispatch(Z)V at line 325
at Lorg/jikesrvm/scheduler/greenthreads/GreenThread; morph(Z)V at line 478
at Lorg/jikesrvm/scheduler/greenthreads/GreenThread; timerTickYield(I)V at line 387
at Lorg/jikesrvm/scheduler/greenthreads/GreenThread; yieldpoint(ILorg/vmmagic/unboxed/AddressV at line 364
at Lorg/jikesrvm/scheduler/RVMThread; yieldpointFromBackedge()V at line 870
at LMain; infiniteLoop()V at line 9
at LMain; main([Ljava/lang/StringV at line 4
at <invisible method>
at Lorg/jikesrvm/runtime/Reflection; outOfLineInvoke(Lorg/jikesrvm/classloader/RVMMethod;Ljava/lang/Object;[Ljava/lang/Object;Z)Ljava/lang/Object; at line 190
at Lorg/jikesrvm/runtime/Reflection; invoke(Lorg/jikesrvm/classloader/RVMMethod;Lorg/jikesrvm/runtime/ReflectionBase;Ljava/lang/Object;[Ljava/lang/Object;Z)Ljava/lang/Object; at line 81
at Lorg/jikesrvm/scheduler/MainThread; run()V at line 202
at Lorg/jikesrvm/scheduler/RVMThread; run()V at line 622
at Lorg/jikesrvm/scheduler/RVMThread; startoff()V at line 647
Failing iterators:
Iterator 0: 0x714cde8c: REF=0x7080a1ba TIB=0x00547e83 STATUS=0x15ff067e (INVALID TIB: CLASS NOT ACCESSIBLE)
Iterator 1: 0x714cde88: REF=0x714cde9c TIB=0x00000000 STATUS=0x00000000 (INVALID TIB: CLASS NOT ACCESSIBLE)
Died in GC:

ScanStack: Detected bad GC map; exiting RVM with fatal error

– Stack –
at Lorg/jikesrvm/VM; sysFail(Ljava/lang/StringV at line 2147
at Lorg/jikesrvm/mm/mmtk/ScanThread; checkReference(Lorg/vmmagic/unboxed/Address;I)V at line 651
at Lorg/jikesrvm/mm/mmtk/ScanThread; scanFrameForObjects(I)V at line 427
at Lorg/jikesrvm/mm/mmtk/ScanThread; scanFrame(I)Lorg/vmmagic/unboxed/Address; at line 348
at Lorg/jikesrvm/mm/mmtk/ScanThread; scanThreadInternal(Lorg/vmmagic/unboxed/Address;I)V at line 257
at Lorg/jikesrvm/mm/mmtk/ScanThread; startScan(Lorg/mmtk/plan/TraceLocal;ZLorg/jikesrvm/scheduler/RVMThread;Lorg/vmmagic/unboxed/Address;Lorg/vmmagic/unboxed/Address;Lorg/vmmagic/unboxed/Address;Lorg/vmmagic/unboxed/Address;Lorg/vmmagic/unboxed/AddressV at line 217
at Lorg/jikesrvm/mm/mmtk/ScanThread; scanThread(Lorg/jikesrvm/scheduler/RVMThread;Lorg/mmtk/plan/TraceLocal;ZLorg/vmmagic/unboxed/Address;Lorg/vmmagic/unboxed/AddressV at line 183
at Lorg/jikesrvm/mm/mmtk/ScanThread; scanThread(Lorg/jikesrvm/scheduler/RVMThread;Lorg/mmtk/plan/TraceLocal;Z)V at line 127
at Lorg/jikesrvm/mm/mmtk/Scanning; computeThreadRoots(Lorg/mmtk/plan/TraceLocalV at line 329
at Lorg/mmtk/plan/SimpleCollector; collectionPhase(SZ)V at line 74
at Lorg/mmtk/plan/generational/GenCollector; collectionPhase(SZ)V at line 125
at Lorg/mmtk/plan/generational/marksweep/GenMSCollector; collectionPhase(SZ)V at line 156
at Lorg/mmtk/plan/Phase; processPhaseStack(Z)Z at line 477
at Lorg/mmtk/plan/Phase; beginNewPhaseStack(I)Z at line 390
at Lorg/mmtk/plan/StopTheWorldCollector; collect()V at line 39
at Lorg/jikesrvm/mm/mminterface/CollectorThread; run()V at line 387
at Lorg/jikesrvm/scheduler/RVMThread; startoff()V at line 647
Virtual machine state:

– Processors –
Processor 1 (me) running thread3-daemon-collector-RUNNABLE
system thread id -137775424
transferQueue:
readyQueue:5-main-RUNNABLE 1-RUNNABLE
ioQueue:
processWaitQueue:
idleQueue:2-daemon-idle-NEW
status: IN_JAVA
timeSliceExpired: 0

– System Queues –
wakeupQueue:
debuggerQueue: 6-daemon-RUNNABLE
collectorQueue:
finalizerQueue: 4-daemon-BLOCKED

– Threads –
1-RUNNABLE
2-daemon-idle-NEW
3-daemon-collector-RUNNABLE
4-daemon-BLOCKED
5-main-RUNNABLE
6-daemon-RUNNABLE

– Locks in use –

Dumping stack of active thread

– Stack –
at Lorg/jikesrvm/scheduler/greenthreads/GreenScheduler; dumpVirtualMachineInternal()V at line 497
at Lorg/jikesrvm/scheduler/Scheduler; dumpVirtualMachine()V at line 240
at Lorg/jikesrvm/VM; sysFail(Ljava/lang/StringV at line 2149
at Lorg/jikesrvm/mm/mmtk/ScanThread; checkReference(Lorg/vmmagic/unboxed/Address;I)V at line 651
at Lorg/jikesrvm/mm/mmtk/ScanThread; scanFrameForObjects(I)V at line 427
at Lorg/jikesrvm/mm/mmtk/ScanThread; scanFrame(I)Lorg/vmmagic/unboxed/Address; at line 348
at Lorg/jikesrvm/mm/mmtk/ScanThread; scanThreadInternal(Lorg/vmmagic/unboxed/Address;I)V at line 257
at Lorg/jikesrvm/mm/mmtk/ScanThread; startScan(Lorg/mmtk/plan/TraceLocal;ZLorg/jikesrvm/scheduler/RVMThread;Lorg/vmmagic/unboxed/Address;Lorg/vmmagic/unboxed/Address;Lorg/vmmagic/unboxed/Address;Lorg/vmmagic/unboxed/Address;Lorg/vmmagic/unboxed/AddressV at line 217
at Lorg/jikesrvm/mm/mmtk/ScanThread; scanThread(Lorg/jikesrvm/scheduler/RVMThread;Lorg/mmtk/plan/TraceLocal;ZLorg/vmmagic/unboxed/Address;Lorg/vmmagic/unboxed/AddressV at line 183
at Lorg/jikesrvm/mm/mmtk/ScanThread; scanThread(Lorg/jikesrvm/scheduler/RVMThread;Lorg/mmtk/plan/TraceLocal;Z)V at line 127
at Lorg/jikesrvm/mm/mmtk/Scanning; computeThreadRoots(Lorg/mmtk/plan/TraceLocalV at line 329
at Lorg/mmtk/plan/SimpleCollector; collectionPhase(SZ)V at line 74
at Lorg/mmtk/plan/generational/GenCollector; collectionPhase(SZ)V at line 125
at Lorg/mmtk/plan/generational/marksweep/GenMSCollector; collectionPhase(SZ)V at line 156
at Lorg/mmtk/plan/Phase; processPhaseStack(Z)Z at line 477
at Lorg/mmtk/plan/Phase; beginNewPhaseStack(I)Z at line 390
at Lorg/mmtk/plan/StopTheWorldCollector; collect()V at line 39
at Lorg/jikesrvm/mm/mminterface/CollectorThread; run()V at line 387
at Lorg/jikesrvm/scheduler/RVMThread; startoff()V at line 647
Attempting to dump the stack of all other live threads
This is somewhat risky since if the thread is running we're going to be quite confused
1-RUNNABLE
– Stack –
at Lorg/jikesrvm/scheduler/greenthreads/GreenThread; morph(Z)V at line 478
at Lorg/jikesrvm/scheduler/greenthreads/GreenThread; yield()V at line 399
at Lorg/jikesrvm/scheduler/greenthreads/GreenScheduler; yieldInternal()V at line 631
at Lorg/jikesrvm/scheduler/Scheduler; yield()V at line 275
at Lorg/jikesrvm/mm/mminterface/Handshake; requestAndAwaitCompletion(I)V at line 72
at Lorg/jikesrvm/mm/mminterface/CollectorThread; collect(Lorg/jikesrvm/mm/mminterface/Handshake;I)V at line 275
at Lorg/jikesrvm/mm/mmtk/Collection; triggerCollectionStatic(I)V at line 126
at Lorg/jikesrvm/mm/mminterface/MemoryManager; gc()V at line 435
at Ljava/lang/VMCommonLibrarySupport$GCLock; gc()V at line 82
at Ljava/lang/VMCommonLibrarySupport; gc()V at line 93
at Ljava/lang/VMRuntime; gc()V at line 50
at Ljava/lang/Runtime; gc()V at line 610
at Ljava/lang/System; gc()V at line 590
at LMain$1; run()V at line 22
at Ljava/lang/Thread; run()V at line 745
at Lorg/jikesrvm/scheduler/RVMThread; run()V at line 622
at Lorg/jikesrvm/scheduler/RVMThread; startoff()V at line 647
4-daemon-BLOCKED
– Stack –
at Lorg/jikesrvm/scheduler/greenthreads/GreenThread; morph(Z)V at line 478
at Lorg/jikesrvm/scheduler/greenthreads/GreenThread; yield(Lorg/jikesrvm/scheduler/greenthreads/AbstractThreadQueue;Lorg/jikesrvm/scheduler/ProcessorLockV at line 416
at Lorg/jikesrvm/scheduler/greenthreads/GreenScheduler; suspendFinalizerThreadInternal()V at line 660
at Lorg/jikesrvm/scheduler/Scheduler; suspendFinalizerThread()V at line 456
at Lorg/jikesrvm/scheduler/FinalizerThread; run()V at line 52
at Lorg/jikesrvm/scheduler/RVMThread; startoff()V at line 647
5-main-RUNNABLE
– Stack –
at Lorg/jikesrvm/scheduler/greenthreads/GreenThread; morph(Z)V at line 478
at Lorg/jikesrvm/scheduler/greenthreads/GreenThread; timerTickYield(I)V at line 387
at Lorg/jikesrvm/scheduler/greenthreads/GreenThread; yieldpoint(ILorg/vmmagic/unboxed/AddressV at line 364
at Lorg/jikesrvm/scheduler/RVMThread; yieldpointFromBackedge()V at line 870
at LMain; infiniteLoop()V at line 9
at LMain; main([Ljava/lang/StringV at line 4
at <invisible method>
at Lorg/jikesrvm/runtime/Reflection; outOfLineInvoke(Lorg/jikesrvm/classloader/RVMMethod;Ljava/lang/Object;[Ljava/lang/Object;Z)Ljava/lang/Object; at line 190
at Lorg/jikesrvm/runtime/Reflection; invoke(Lorg/jikesrvm/classloader/RVMMethod;Lorg/jikesrvm/runtime/ReflectionBase;Ljava/lang/Object;[Ljava/lang/Object;Z)Ljava/lang/Object; at line 81
at Lorg/jikesrvm/scheduler/MainThread; run()V at line 202
at Lorg/jikesrvm/scheduler/RVMThread; run()V at line 622
at Lorg/jikesrvm/scheduler/RVMThread; startoff()V at line 647
6-daemon-RUNNABLE
– Empty Stack –

Such a bad map is a likely cause for crashes in GC such as:

http://jikesrvm.anu.edu.au/cattrack/results/habanero.anu.edu.au/perf/6302/production/default/perf-dacapo/lusearch-10/6/Output.txt

Environment

None

Assignee

Ian Rogers

Reporter

Ian Rogers

Labels

None

Fix versions

Priority

Highest
Configure