Skip to content

Sanity GC is broken #1078

@angussidney

Description

@angussidney

In the latest version of MMTk (mmtk-core commit 42754a5, mmtk-openjdk commit 54f6688fe4), the Sanity GC is broken.

MTK_PLAN=Immix ~/honours/openjdk-builds/20240130-mmtk-slowdebug-42754a5
f2-upstream/bin/java -XX:+UseThirdPartyHeap -Xms512M -Xmx512M -jar /usr/share/benchmarks/dacap
o/dacapo-23.11-chopin.jar lusearch                                                            
[2024-01-30T00:31:21Z INFO  mmtk::memory_manager] Initialized MMTk with Immix (FixedHeapSize(5
36870912))                                                                                    
Using scaled threading model. 24 processors detected, 24 threads used to drive the workload, i
n a possible range of [1,2048]                                                                
Version: lucene 9.7.0 (use -p to print nominal benchmark stats)                               
[2024-01-30T00:31:25Z INFO  mmtk::mmtk] User triggering collection                            
[2024-01-30T00:31:25Z INFO  mmtk::util::sanity::sanity_checker] Sanity GC prepare             
thread 'thread 'thread 'thread 'thread '<unnamed>thread 'thread 'thread '<unnamed><unnamed><un
named><unnamed>' panicked at 'thread '<unnamed><unnamed><unnamed><unnamed>thread '' panicked a
t 'thread '' panicked at 'thread '' panicked at 'thread 'internal error: entered unreachable c
ode: `MutatorConfig::prepare_func` must not be called for the current plan.' panicked at 'thre
ad 'internal error: entered unreachable code: `MutatorConfig::prepare_func` must not be called
 for the current plan.'  

[...]

fatal runtime error: failed to initiate panic, error 
5

Aborted (core dumped)

This is occurring because the sanity GC issues a PrepareMutator work packet for each mutator, which calls the prepare method on the mutator, which in turn calls the prepare_func for that plan. For most plans (with the exception of MarkSweep), this is set to the unreachable_prepare_func stub, which triggers a panic.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions