Skip to content

Fix retry bucket corruption on Julia 1.10 - #1356

Merged
quinnj merged 4 commits into
masterfrom
jq/http-1355-retry-bucket
Aug 31, 2026
Merged

Fix retry bucket corruption on Julia 1.10#1356
quinnj merged 4 commits into
masterfrom
jq/http-1355-retry-bucket

Conversation

@quinnj

@quinnj quinnj commented Aug 31, 2026

Copy link
Copy Markdown
Member

Summary

  • replace the atomic Set{String} retry depletion snapshot with a pointer-free atomic counter
  • preserve the lock-free healthy path and the HTTP 2.6.6 six-field constructor
  • add concurrent retry and GC regression coverage for Julia 1.10
  • add Julia 1.10 to CI and guard Julia 1.11-only public API checks
  • bump the package version to 2.6.7

Root cause

Retry bucket writers already hold bucket.lock. The crash is not caused by a missing writer lock. On Julia 1.10, publishing a GC-managed Set through the atomic field can corrupt the set's backing dictionary during concurrent requests and garbage collection. Tracking only the number of depleted partitions keeps the atomic fast path pointer-free. When the count is nonzero, replenishment takes the existing lock and checks the requested partition.

Validation

  • full HTTP test suite on Julia 1.10.11
  • full HTTP test suite on Julia 1.12.6, including 69 JuliaC trim checks
  • exact Genie 6.0.4 reproduction on Julia 1.10.11 with one thread: 446 passed, 1 expected broken
  • focused retry suites on Julia 1.10 and 1.12 after the version bump
  • git diff --check

Fixes #1355

Co-authored by Codex

@codecov

codecov Bot commented Aug 31, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.43%. Comparing base (eee3447) to head (3f8e33f).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1356      +/-   ##
==========================================
+ Coverage   88.89%   89.43%   +0.53%     
==========================================
  Files          31       31              
  Lines       12134    12594     +460     
==========================================
+ Hits        10787    11263     +476     
+ Misses       1347     1331      -16     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

…tion states

The six-field HTTP 2.6.6 compatibility constructor trusted the legacy
set's length for the depleted-partition count. A set that disagrees with
the partition states (the only interesting input for a compat shim)
breaks the count invariant: a too-low count strands depleted partitions
(replenish early-returns at zero) and can arm the underflow tripwire in
_retry_partition_set_capacity!. Derive the count from the partition
states instead, matching the five-field constructor, and pin the
behavior with a stale-set test.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@quinnj
quinnj merged commit 769b917 into master Aug 31, 2026
10 checks passed
@quinnj
quinnj deleted the jq/http-1355-retry-bucket branch August 31, 2026 15:32
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.

Segmentation fault / SIGABRT in _retry_partition_set_capacity! during concurrent requests on Julia 1.10 (LTS)

1 participant