Skip to content

EpochFlexOperator causes infinite loop/livelock when applied to 2-trees #1214

Description

@dpascall

When you have a tree on two tips, EpochFlexOperator never returns an output but CPUs usage remains at 100%. The correct behaviour should presumably be to just reject the proposal. The jstack dump is below and a replicable example is attached. (The error isn't driven by the lack of sequence data it shows up with data, I just removed the data for speed.)

replicable.xml

2026-05-24 16:26:34
Full thread dump OpenJDK 64-Bit Server VM (17.0.3+7-LTS mixed mode, sharing):

Threads class SMR info:
_java_thread_list=0x000078424c0019e0, length=12, elements={
0x00007842e4024520, 0x00007842e415f660, 0x00007842e4160a50, 0x00007842e4165f90,
0x00007842e4167350, 0x00007842e4168770, 0x00007842e416a1b0, 0x00007842e416b6f0,
0x00007842e416cb70, 0x00007842e41745b0, 0x00007842e4177940, 0x000078424c000eb0
}

"main" #1 prio=5 os_prio=0 cpu=35863.15ms elapsed=35.91s tid=0x00007842e4024520 nid=0x516ff runnable [0x00007842f9bfd000]
java.lang.Thread.State: RUNNABLE
at beast.base.evolution.operator.EpochFlexOperator.proposal(Unknown Source)
at beast.base.inference.Operator.proposal(Unknown Source)
at beast.base.inference.MCMC.propagateState(Unknown Source)
at beast.base.inference.MCMC.doLoop(Unknown Source)
at beast.base.inference.MCMC.run(Unknown Source)
at beastfx.app.beast.BeastMCMC.run(Unknown Source)
at beastfx.app.beast.BeastMain.main(Unknown Source)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(java.base@17.0.3/Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(java.base@17.0.3/Unknown Source)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(java.base@17.0.3/Unknown Source)
at java.lang.reflect.Method.invoke(java.base@17.0.3/Unknown Source)
at beast.pkgmgmt.launcher.BeastLauncher.run(Unknown Source)
at beast.pkgmgmt.launcher.BeastLauncher.main(Unknown Source)

"Reference Handler" #2 daemon prio=10 os_prio=0 cpu=0.30ms elapsed=35.91s tid=0x00007842e415f660 nid=0x51706 waiting on condition [0x000078428bffe000]
java.lang.Thread.State: RUNNABLE
at java.lang.ref.Reference.waitForReferencePendingList(java.base@17.0.3/Native Method)
at java.lang.ref.Reference.processPendingReferences(java.base@17.0.3/Unknown Source)
at java.lang.ref.Reference$ReferenceHandler.run(java.base@17.0.3/Unknown Source)

"Finalizer" #3 daemon prio=8 os_prio=0 cpu=0.24ms elapsed=35.91s tid=0x00007842e4160a50 nid=0x51707 in Object.wait() [0x0000784273ffe000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(java.base@17.0.3/Native Method)
- waiting on <0x000000041d01a170> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(java.base@17.0.3/Unknown Source)
- locked <0x000000041d01a170> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(java.base@17.0.3/Unknown Source)
at java.lang.ref.Finalizer$FinalizerThread.run(java.base@17.0.3/Unknown Source)

"Signal Dispatcher" #4 daemon prio=9 os_prio=0 cpu=0.34ms elapsed=35.91s tid=0x00007842e4165f90 nid=0x51708 waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE

"Service Thread" #5 daemon prio=9 os_prio=0 cpu=0.35ms elapsed=35.91s tid=0x00007842e4167350 nid=0x51709 runnable [0x0000000000000000]
java.lang.Thread.State: RUNNABLE

"Monitor Deflation Thread" #6 daemon prio=9 os_prio=0 cpu=1.25ms elapsed=35.91s tid=0x00007842e4168770 nid=0x5170a runnable [0x0000000000000000]
java.lang.Thread.State: RUNNABLE

"C2 CompilerThread0" #7 daemon prio=9 os_prio=0 cpu=248.82ms elapsed=35.91s tid=0x00007842e416a1b0 nid=0x5170b waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
No compile task

"C1 CompilerThread0" #15 daemon prio=9 os_prio=0 cpu=124.26ms elapsed=35.91s tid=0x00007842e416b6f0 nid=0x5170c waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
No compile task

"Sweeper thread" #19 daemon prio=9 os_prio=0 cpu=0.09ms elapsed=35.91s tid=0x00007842e416cb70 nid=0x5170d runnable [0x0000000000000000]
java.lang.Thread.State: RUNNABLE

"Notification Thread" #20 daemon prio=9 os_prio=0 cpu=0.05ms elapsed=35.91s tid=0x00007842e41745b0 nid=0x5170e runnable [0x0000000000000000]
java.lang.Thread.State: RUNNABLE

"Common-Cleaner" #21 daemon prio=8 os_prio=0 cpu=0.43ms elapsed=35.90s tid=0x00007842e4177940 nid=0x51710 in Object.wait() [0x00007841f3ffe000]
java.lang.Thread.State: TIMED_WAITING (on object monitor)
at java.lang.Object.wait(java.base@17.0.3/Native Method)
- waiting on <0x000000041d044178> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(java.base@17.0.3/Unknown Source)
- locked <0x000000041d044178> (a java.lang.ref.ReferenceQueue$Lock)
at jdk.internal.ref.CleanerImpl.run(java.base@17.0.3/Unknown Source)
at java.lang.Thread.run(java.base@17.0.3/Unknown Source)
at jdk.internal.misc.InnocuousThread.run(java.base@17.0.3/Unknown Source)

"Attach Listener" #22 daemon prio=9 os_prio=0 cpu=0.26ms elapsed=0.10s tid=0x000078424c000eb0 nid=0x5174b waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE

"VM Thread" os_prio=0 cpu=3.47ms elapsed=35.91s tid=0x00007842e415b730 nid=0x51705 runnable

"GC Thread#0" os_prio=0 cpu=0.97ms elapsed=35.91s tid=0x00007842e40563f0 nid=0x51700 runnable

"GC Thread#1" os_prio=0 cpu=0.80ms elapsed=35.69s tid=0x0000784290006c90 nid=0x51719 runnable

"GC Thread#2" os_prio=0 cpu=0.61ms elapsed=35.69s tid=0x00007842900076c0 nid=0x5171a runnable

"GC Thread#3" os_prio=0 cpu=0.68ms elapsed=35.69s tid=0x00007842900080f0 nid=0x5171b runnable

"GC Thread#4" os_prio=0 cpu=0.60ms elapsed=35.69s tid=0x0000784290008b20 nid=0x5171c runnable

"GC Thread#5" os_prio=0 cpu=0.28ms elapsed=35.69s tid=0x0000784290009550 nid=0x5171d runnable

"GC Thread#6" os_prio=0 cpu=0.62ms elapsed=35.69s tid=0x0000784290009f80 nid=0x5171e runnable

"GC Thread#7" os_prio=0 cpu=0.81ms elapsed=35.69s tid=0x000078429000a9b0 nid=0x5171f runnable

"GC Thread#8" os_prio=0 cpu=0.70ms elapsed=35.69s tid=0x000078429000b810 nid=0x51720 runnable

"GC Thread#9" os_prio=0 cpu=0.57ms elapsed=35.69s tid=0x000078429000c670 nid=0x51721 runnable

"GC Thread#10" os_prio=0 cpu=0.81ms elapsed=35.69s tid=0x000078429000d4d0 nid=0x51722 runnable

"GC Thread#11" os_prio=0 cpu=0.65ms elapsed=35.69s tid=0x000078429000df40 nid=0x51723 runnable

"G1 Main Marker" os_prio=0 cpu=0.04ms elapsed=35.91s tid=0x00007842e4067a10 nid=0x51701 runnable

"G1 Conc#0" os_prio=0 cpu=0.02ms elapsed=35.91s tid=0x00007842e4068980 nid=0x51702 runnable

"G1 Refine#0" os_prio=0 cpu=0.09ms elapsed=35.91s tid=0x00007842e4127780 nid=0x51703 runnable

"G1 Service" os_prio=0 cpu=6.31ms elapsed=35.91s tid=0x00007842e4128670 nid=0x51704 runnable

"VM Periodic Task Thread" os_prio=0 cpu=23.01ms elapsed=35.91s tid=0x00007842e4175f00 nid=0x5170f waiting on condition

JNI global refs: 17, weak refs: 0

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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