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

Open
github-bot wants to merge 1 commit from github-bot/gh-169 into amd AGit
Owner

@⁠mahhnameisjeff on GitHub · 2026-12-03 14:27 UTC · original
mahhnameisjeff:amd-pool-texture-deadlock → amd · +9 −0 · 1 files · 1 commits · open

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

**@⁠mahhnameisjeff** on GitHub · 2026-12-03 14:27 UTC · [original](https://github.com/eikkapine/jaxe/pull/169) `mahhnameisjeff:amd-pool-texture-deadlock` → `amd` · +9 −0 · 1 files · 1 commits · open 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)
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.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-03 14:35:06 +00:00
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/169/head:github-bot/gh-169'
git switch 'github-bot/gh-169'

Merge

Merge the changes and update on Forgejo.
git switch 'amd'
git merge --no-ff 'github-bot/gh-169'
git switch 'github-bot/gh-169'
git rebase 'amd'
git switch 'amd'
git merge --ff-only 'github-bot/gh-169'
git switch 'github-bot/gh-169'
git rebase 'amd'
git switch 'amd'
git merge --no-ff 'github-bot/gh-169'
git switch 'amd'
git merge --squash 'github-bot/gh-169'
git switch 'amd'
git merge --ff-only 'github-bot/gh-169'
git switch 'amd'
git merge 'github-bot/gh-169'
git push origin 'amd'
This discussion has been locked. Commenting is limited to contributors.
No description provided.