Skip to content

Prevent deadlock due to lack of approve_loaded()#497

Merged
bal-e merged 5 commits intomainfrom
approve-loaded-deadlock
Mar 3, 2026
Merged

Prevent deadlock due to lack of approve_loaded()#497
bal-e merged 5 commits intomainfrom
approve-loaded-deadlock

Conversation

@bal-e
Copy link
Contributor

@bal-e bal-e commented Mar 3, 2026

If review is not enabled, approve_loaded() was not called, causing a deadlock in Cascade. The approve_loaded() call has been moved so that it occurs whether review is enabled or not.

Thanks for catching and debugging this @ximon18!

@bal-e bal-e requested a review from ximon18 March 3, 2026 16:32
@bal-e bal-e self-assigned this Mar 3, 2026
bal-e added 5 commits March 3, 2026 19:59
If review is not enabled, 'approve_loaded()' was not called, causing a
deadlock. The 'approve_loaded()' call has been moved so that it occurs
whether review is enabled or not.
This avoids a deadlock where a new background task could be set while an
earlier one was ongoing.
'BackgroundTasks' extends the 'background_task' convention across the
codebase, allowing multiple background tasks to be ongoing at once.
This is important to allow; there are cases where one background task
spawns another. Within the current convention, the 'background_task'
field would sometimes be cleared early so that new tasks could be added.
'BackgroundTasks' eliminates this manual effort by allowing multiple
background tasks to coexist. It offers a nicer API that ensures that
'tracing::Span's are set to assist with logging.
@bal-e bal-e force-pushed the approve-loaded-deadlock branch from 93c9efa to c8d87a2 Compare March 3, 2026 19:36
Copy link
Member

@ximon18 ximon18 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

./act-wrapper --job ixfr-in works for me again with this PR.

It still fails due to #493 but no longer for other reasons.

@bal-e bal-e merged commit f1d5127 into main Mar 3, 2026
25 of 31 checks passed
@bal-e bal-e deleted the approve-loaded-deadlock branch March 3, 2026 20:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants