Skip to content

Conversation

adam-miller
Copy link
Contributor

@adam-miller adam-miller commented Oct 4, 2025

This is an extension of the issue being addressed in #659

I encountered this during shutdown and it seems to just be an uncommon race condition where a thread happened to still be adding outlinks to the frontier. The added unit test reproduces the behavior if the Thread.interrupted() calls aren't present.

Maybe something could be done in ToeThread itself to override the interrupt() function and delay the base interrupt() call until it has reached the end of the chain?

@adam-miller adam-miller requested a review from ato October 4, 2025 14:59
Copy link
Collaborator

@ato ato left a comment

Choose a reason for hiding this comment

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

Yeah, to make it robust I guess we could give each thread its own "interrupt lock". Take the lock for the duration of each BDB operation and also when calling interrupt() on it.

@adam-miller
Copy link
Contributor Author

If I understand Thread.interrupt() properly, it is just setting a flag, but that flag has special connotations for bdb. Maybe giving ToeThread its own requestStop() could replace the call to interrupt() and then switch uses of interrupted() to stopRequested(). Then maybe we wouldn't have to wrap each of the bdb interactions?

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.

3 participants