pool: let the texture pool go before taking it again (deadlock, title watchdog ~34 s in) #169

Open
mahhnameisjeff wants to merge 1 commit from upstream-pr/169 into amd
mahhnameisjeff commented 2026-12-03 14:27:42 +00:00 (Migrated from github.com)

Imported from eikkapine/jaxe. Originally posted by mahhnameisjeff on 2026-12-03T14:27:42Z.


Base: origin/amd (0902398). Independent of the other PRs from this batch.

pool::texture held the TEXTURES lock across a call that takes it again,
so a thread hung on its own lock. The title's watchdog sees a stalled
thread for about 30 s and ends the process by writing to address 0: every
run died some 34 s after the start (stack dumps of the run showed the
thread waiting on the pool lock it held). Releasing the guard after
take_ripe fixes it: no run has stopped there since.

origin/main does not have the bug (it grows the pool without the lock,
take_unlocked); origin/amd does.

Possibly related: #151 (crash while loading into the world), not verified.

🤖 Generated with Claude Code

<!-- greyfinch-sync:eikkapine/jaxe:issue:5628446027 --> Imported from [eikkapine/jaxe](https://github.com/eikkapine/jaxe/pull/169). Originally posted by [mahhnameisjeff](https://github.com/mahhnameisjeff) on 2026-12-03T14:27:42Z. --- Base: origin/amd (0902398). Independent of the other PRs from this batch. `pool::texture` held the `TEXTURES` lock across a call that takes it again, so a thread hung on its own lock. The title's watchdog sees a stalled thread for about 30 s and ends the process by writing to address 0: every run died some 34 s after the start (stack dumps of the run showed the thread waiting on the pool lock it held). Releasing the guard after `take_ripe` fixes it: no run has stopped there since. origin/main does not have the bug (it grows the pool without the lock, `take_unlocked`); origin/amd does. Possibly related: #151 (crash while loading into the world), not verified. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/169:upstream-pr/169'
git switch 'upstream-pr/169'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'amd'
git merge --no-ff 'upstream-pr/169'
git switch 'upstream-pr/169'
git rebase 'amd'
git switch 'amd'
git merge --ff-only 'upstream-pr/169'
git switch 'upstream-pr/169'
git rebase 'amd'
git switch 'amd'
git merge --no-ff 'upstream-pr/169'
git switch 'amd'
git merge --squash 'upstream-pr/169'
git switch 'amd'
git merge --ff-only 'upstream-pr/169'
git switch 'amd'
git merge 'upstream-pr/169'
git push origin 'amd'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
eikkapine/jaxe!169
No description provided.