Skip to content

hackney_pool: regression test for the noproc race (#869)#870

Merged
benoitc merged 1 commit into
masterfrom
fix/pool-noproc-race-test
Jun 7, 2026
Merged

hackney_pool: regression test for the noproc race (#869)#870
benoitc merged 1 commit into
masterfrom
fix/pool-noproc-race-test

Conversation

@benoitc
Copy link
Copy Markdown
Owner

@benoitc benoitc commented Jun 7, 2026

Follow-up to #869 (fix by @kpy3).

Adds a regression test for the pool crash: it injects a process that is alive for is_process_alive/1 but exits the instant is_ready/1 calls it, reproducing the {noproc,{gen_statem,call,[_,is_ready,infinity]}} race. The test asserts the pool survives and serves a fresh connection. Verified it fails on the pre-#869 code and passes with the fix.

Also tidies the try/catch from #869: removes trailing whitespace and adds a comment explaining the race.

Adds a test that injects a process which is alive for is_process_alive/1
but exits when is_ready/1 calls it, asserting the pool survives and
serves a fresh connection. Without the #869 fix this crashed the pool.

Also tidies the try/catch landed in #869: trailing whitespace removed
and a comment explaining the race.
@benoitc benoitc merged commit 1d8354e into master Jun 7, 2026
6 checks passed
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.

1 participant