Skip to content

fix: don't reuse the parent's HTTP connections in forked children (bug 2088960) - #1095

Merged
jcristau merged 1 commit into
taskcluster:mainfrom
jcristau:fork-reset-sessions
Nov 4, 2026
Merged

jcristau merged 1 commit into
taskcluster:mainfrom
jcristau:fork-reset-sessions

Conversation

@jcristau

@jcristau jcristau commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Taskgraph forks a child per kind, and the children inherited the cached requests sessions, and the keep-alive connections pooled in them, from the parent. Two children using the same host at the same time then shared one TLS socket and corrupted each other's stream, failing with SSL: RECORD_LAYER_FAILURE.

Clear the get_session and get_taskcluster_client caches after fork in the child.

@jcristau
jcristau requested a review from a team as a code owner November 4, 2026 15:19
@jcristau
jcristau requested a review from hneiva November 4, 2026 15:19
@jcristau jcristau changed the title fix: don't reuse the parent's HTTP connections in forked children fix: don't reuse the parent's HTTP connections in forked children (bug 2088960) Nov 4, 2026

@Eijebong Eijebong left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, just one nit in the test. Really surprised it took this long to discover this tbh

Comment thread test/test_generator.py Resolved
@jcristau
jcristau force-pushed the fork-reset-sessions branch from 2ad30e8 to c184d44 Compare November 4, 2026 16:20
…g 2088960)

Taskgraph forks a child per kind, and the children inherited the cached
requests sessions, and the keep-alive connections pooled in them, from
the parent. Two children using the same host at the same time then
shared one TLS socket and corrupted each other's stream, failing with
SSL: RECORD_LAYER_FAILURE.

Clear the get_session and get_taskcluster_client caches after fork in
the child.
@jcristau
jcristau force-pushed the fork-reset-sessions branch from c184d44 to 6966d31 Compare November 4, 2026 16:21
@jcristau
jcristau enabled auto-merge (squash) November 4, 2026 16:21
@jcristau
jcristau merged commit 7fa5b30 into taskcluster:main Nov 4, 2026
22 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.

2 participants