fix: clamp logderivative inverse range to prevent OOB in debug builds#22346
Closed
AztecBot wants to merge 1 commit into
Closed
fix: clamp logderivative inverse range to prevent OOB in debug builds#22346AztecBot wants to merge 1 commit into
AztecBot wants to merge 1 commit into
Conversation
In compute_logderivative_inverse(), the multi-threaded path splits work by circuit_size, but inverse_polynomial.coeffs() only covers actual (non-virtual) data. When a thread chunk's start exceeds the polynomial's actual size, coeffs()[start] is out of bounds -- caught by _GLIBCXX_DEBUG span bounds checking in the debug build preset. Clamp start/end to the polynomial's actual data range before batch_invert. Virtual zero elements need no inversion. Same fix as PR #22312 (merged to merge-train/barretenberg but not yet on next).
federicobarbacovi
pushed a commit
that referenced
this pull request
Apr 7, 2026
…22347) ## Summary Fixes nightly barretenberg debug build failure (CI run https://github.com/AztecProtocol/aztec-packages/actions/runs/24066248159). **Root cause:** `HonkRecursionConstraintTestWithoutPredicate/2.GenerateVKFromConstraints` (root rollup circuit, the heaviest test variant) timed out at 601s against the 600s default timeout. Exit code 124. **Fix:** - Bump timeout from 600s to 900s for `HonkRecursionConstraintTest` and `ChonkRecursionConstraintTest` suites - Add `ChonkRecursionConstraintTest` to the CPUS=4:MEM=8g resource group Several other tests in these suites are also close to the 600s limit (503s, 519s), so this prevents future timeouts as debug build overhead grows. **Note:** PR #22346 (from earlier session) is a no-op — the logderivative fix it applies already exists on `next` via merge-train/barretenberg (#22324). The actual failure was this timeout. ClaudeBox log: https://claudebox.work/s/5f7d3bb56d7d756f?run=1
critesjosh
pushed a commit
that referenced
this pull request
Apr 14, 2026
…22347) ## Summary Fixes nightly barretenberg debug build failure (CI run https://github.com/AztecProtocol/aztec-packages/actions/runs/24066248159). **Root cause:** `HonkRecursionConstraintTestWithoutPredicate/2.GenerateVKFromConstraints` (root rollup circuit, the heaviest test variant) timed out at 601s against the 600s default timeout. Exit code 124. **Fix:** - Bump timeout from 600s to 900s for `HonkRecursionConstraintTest` and `ChonkRecursionConstraintTest` suites - Add `ChonkRecursionConstraintTest` to the CPUS=4:MEM=8g resource group Several other tests in these suites are also close to the 600s limit (503s, 519s), so this prevents future timeouts as debug build overhead grows. **Note:** PR #22346 (from earlier session) is a no-op — the logderivative fix it applies already exists on `next` via merge-train/barretenberg (#22324). The actual failure was this timeout. ClaudeBox log: https://claudebox.work/s/5f7d3bb56d7d756f?run=1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes nightly barretenberg debug build which has been failing for 5+ consecutive nights with SIGABRT (exit code 134).
Root cause: In
compute_logderivative_inverse(), the multi-threaded path splits work bycircuit_size, butinverse_polynomial.coeffs()only covers the actual (non-virtual) data. When a thread chunk'sstartexceeds the polynomial's actual size,coeffs()[start]is out of bounds — caught by_GLIBCXX_DEBUG's span bounds checking.Fix: Clamp
start/endto the polynomial's actual data range beforebatch_invert. Virtual zero elements need no inversion.This is the same fix as #22312 (merged to
merge-train/barretenbergbut not yet promoted tonext), applied directly tonextso the nightly build stops failing.Detailed analysis: https://gist.github.com/AztecBot/0e19941f5ef42d43f6f9bda3cb270aac
ClaudeBox log: https://claudebox.work/s/96869bdf3aa3b332?run=1