From 1829dc9f3e4aaaf5504d7eb21697ab58d1ba4d79 Mon Sep 17 00:00:00 2001 From: Jeffrey Czyz Date: Fri, 6 Feb 2026 17:25:43 -0600 Subject: [PATCH] Fix thread starvation in test_single_channel_multiple_mpp The busy-wait loop polling for PaymentClaimed events had no yield, causing it to continuously acquire ChannelManager locks via get_and_clear_pending_events(). This could starve the claim_funds thread of lock access, preventing it from ever queuing the event. Add a yield_now() call matching the pattern used by the other two spin loops in this test. Co-Authored-By: Claude Opus 4.6 --- lightning/src/ln/chanmon_update_fail_tests.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lightning/src/ln/chanmon_update_fail_tests.rs b/lightning/src/ln/chanmon_update_fail_tests.rs index 3fa2073d5ba..e492562d54d 100644 --- a/lightning/src/ln/chanmon_update_fail_tests.rs +++ b/lightning/src/ln/chanmon_update_fail_tests.rs @@ -4715,6 +4715,9 @@ fn test_single_channel_multiple_mpp() { } have_event = true; } + if !have_event { + std::thread::yield_now(); + } } });