Skip to content

Fix TestRetryableFilteringStylusSandwichRollback flakiness - NIT-4762#4599

Open
mahdy-nasr wants to merge 2 commits intomasterfrom
fix-TestRetryableFilteringStylusSandwichRollback
Open

Fix TestRetryableFilteringStylusSandwichRollback flakiness - NIT-4762#4599
mahdy-nasr wants to merge 2 commits intomasterfrom
fix-TestRetryableFilteringStylusSandwichRollback

Conversation

@mahdy-nasr
Copy link
Copy Markdown
Contributor

Fix TestRetryableFilteringStylusSandwichRollback flakiness

Summary

  • Add SequenceTransactionsForTest to sequence transactions directly in a single block, bypassing the sequencer queue
  • Replace the racy Pause/Activate goroutine pattern in TestRetryableFilteringStylusSandwichRollback with the new helper

Fixes NIT-4762

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 3, 2026

Codecov Report

❌ Patch coverage is 0% with 15 lines in your changes missing coverage. Please review.
✅ Project coverage is 34.43%. Comparing base (eb994bc) to head (33b3709).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4599      +/-   ##
==========================================
- Coverage   34.98%   34.43%   -0.56%     
==========================================
  Files         494      494              
  Lines       58915    58930      +15     
==========================================
- Hits        20611    20290     -321     
- Misses      34708    35054     +346     
+ Partials     3596     3586      -10     

joshuacolvin0
joshuacolvin0 previously approved these changes Apr 3, 2026
Copy link
Copy Markdown
Member

@joshuacolvin0 joshuacolvin0 left a comment

Choose a reason for hiding this comment

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

Looks great!

@joshuacolvin0 joshuacolvin0 enabled auto-merge April 3, 2026 14:42
@joshuacolvin0 joshuacolvin0 added this pull request to the merge queue Apr 3, 2026
@joshuacolvin0 joshuacolvin0 removed this pull request from the merge queue due to a manual request Apr 3, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 3, 2026

❌ 9 Tests Failed:

Tests completed Failed Passed Skipped
4709 9 4700 0
View the top 3 failed tests by shortest run time
TestAliasingFlaky
Stack Traces | -0.000s run time
... [CONTENT TRUNCATED: Keeping last 20 lines]
INFO [04-03|23:56:22.800] Persisted trie from memory database      nodes=24  flushnodes=0 size=4.55KiB  flushsize=0.00B time="81.773µs"  flushtime=0s gcnodes=0 gcsize=0.00B gctime=0s          livenodes=122  livesize=22.14KiB
INFO [04-03|23:56:22.800] Writing snapshot state to disk           root=77ae46..2fbcae
INFO [04-03|23:56:22.800] Persisted trie from memory database      nodes=0   flushnodes=0 size=0.00B    flushsize=0.00B time=531ns       flushtime=0s gcnodes=0 gcsize=0.00B gctime=0s          livenodes=122  livesize=22.14KiB
ERROR[04-03|23:56:22.800] Dangling trie nodes after full cleanup
INFO [04-03|23:56:22.800] Updated payload                          id=0x0343ea2b5aadb3fd                      number=45 hash=71ffb3..8309dc txs=1  withdrawals=0 gas=21000     fees=0.002090750527 root=9e5cb5..83eca2 elapsed="312.432µs"
INFO [04-03|23:56:22.800] Submitted transaction                    hash=0x7dc789c237a0ba47019d4278af3d4db047bcdd94b6ca03df54a7ecc7f2b1919a from=0xb386a74Dcab67b66F8AC07B4f08365d37495Dd23 nonce=4  recipient=0xB21A96cB63E02fD5d8cd4011a917645dc2b8F783 value=0
INFO [04-03|23:56:22.800] Blockchain stopped
INFO [04-03|23:56:22.800] Stopping work on payload                 id=0x0343ea2b5aadb3fd                      reason=delivery
INFO [04-03|23:56:22.800] Ethereum protocol stopped
INFO [04-03|23:56:22.800] Starting work on payload                 id=0x0307777e660e3653
INFO [04-03|23:56:22.800] Transaction pool stopped
INFO [04-03|23:56:22.800] Persisting dirty state                   head=35 root=d1a36f..49f03f layers=35
INFO [04-03|23:56:22.801] Imported new potential chain segment     number=45 hash=71ffb3..8309dc blocks=1  txs=1  mgas=0.021 elapsed="367.182µs" mgasps=57.192   triediffs=216.03KiB triedirty=0.00B
INFO [04-03|23:56:22.801] Chain head was updated                   number=45 hash=71ffb3..8309dc root=9e5cb5..83eca2 elapsed="25.488µs"
INFO [04-03|23:56:22.801] Persisted dirty state to disk            size=170.08KiB elapsed="870.66µs"
INFO [04-03|23:56:22.801] Blockchain stopped
INFO [04-03|23:56:22.801] Updated payload                          id=0x0307777e660e3653                      number=36 hash=2c7ddd..a51b31 txs=1  withdrawals=0 gas=2,821,510 fees=0.0001410755   root=13175f..d7fda9 elapsed=1.024ms
WARN [04-03|23:56:22.801] Error performing sealing work            err="chain rewind interrupted calculation of finalized block hash"
INFO [04-03|23:56:22.801] Stopping work on payload                 id=0x0307777e660e3653                      reason=delivery
INFO [04-03|23:56:22.802] Submitted transaction                    hash=0x6a1cf092c6d6afdf876d7804bb459aa4f7c1329a31bd5ecaa42b24236e5b0921 from=0xaF24Ca6c2831f4d4F629418b50C227DF0885613A nonce=8  recipient=0xaF24Ca6c2831f4d4F629418b50C227DF0885613A value=1,000,000,000,000
TestBatchPosterL1SurplusMatchesBatchGasFlaky
Stack Traces | 0.580s run time
... [CONTENT TRUNCATED: Keeping last 20 lines]
panic: runtime error: invalid memory address or nil pointer dereference [recovered, repanicked]
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x207ed32]

goroutine 15 [running]:
testing.tRunner.func1.2({0x37e7200, 0x62029b0})
	/opt/hostedtoolcache/go/1.25.8/x64/src/testing/testing.go:1872 +0x237
testing.tRunner.func1()
	/opt/hostedtoolcache/go/1.25.8/x64/src/testing/testing.go:1875 +0x35b
panic({0x37e7200?, 0x62029b0?})
	/opt/hostedtoolcache/go/1.25.8/x64/src/runtime/panic.go:783 +0x132
github.com/offchainlabs/nitro/arbnode.(*InboxTracker).GetBatchCount(0x1a8d900?)
	/home/runner/work/nitro/nitro/arbnode/inbox_tracker.go:210 +0x12
github.com/offchainlabs/nitro/arbnode.(*InboxTracker).FindInboxBatchContainingMessage(0x0, 0x7)
	/home/runner/work/nitro/nitro/arbnode/inbox_tracker.go:225 +0x2f
github.com/offchainlabs/nitro/system_tests.TestBatchPosterL1SurplusMatchesBatchGasFlaky(0xc0002c3180)
	/home/runner/work/nitro/nitro/system_tests/batch_poster_test.go:839 +0x725
testing.tRunner(0xc0002c3180, 0x41b9d08)
	/opt/hostedtoolcache/go/1.25.8/x64/src/testing/testing.go:1934 +0xea
created by testing.(*T).Run in goroutine 1
	/opt/hostedtoolcache/go/1.25.8/x64/src/testing/testing.go:1997 +0x465
TestParentChainEthConfigForkTransition
Stack Traces | 3.720s run time
... [CONTENT TRUNCATED: Keeping last 20 lines]
INFO [04-03|23:59:28.336] Imported new potential chain segment     number=15 hash=6acdf5..87d511 blocks=1  txs=1  mgas=1.860  elapsed=1.716ms      mgasps=1083.752 triediffs=53.13KiB  triedirty=0.00B
INFO [04-03|23:59:28.336] Chain head was updated                   number=15 hash=6acdf5..87d511 root=bd5001..d3ce57 elapsed="341.066µs"
INFO [04-03|23:59:28.338] Submitted transaction                    hash=0xa46947b34cb4be66ed52668661d6e4e7f0527c12d8d732ed6c9f43f717f10f9d from=0xaF24Ca6c2831f4d4F629418b50C227DF0885613A nonce=2  recipient=0x7E23C8862920797d81916d62c274dd9217113e28 value=1,000,000,000,000
INFO [04-03|23:59:28.338] Starting work on payload                 id=0x038b899bef35b263
INFO [04-03|23:59:28.339] Updated payload                          id=0x038b899bef35b263 number=16 hash=968511..1f007f txs=0  withdrawals=0 gas=0          fees=0             root=19cc0e..06f576 elapsed="427.743µs"
INFO [04-03|23:59:28.339] Stopping work on payload                 id=0x038b899bef35b263 reason=delivery
INFO [04-03|23:59:28.339] Starting work on payload                 id=0x03fec12611061c32
INFO [04-03|23:59:28.340] Updated payload                          id=0x03fec12611061c32 number=32 hash=f150f1..f4c63a txs=1  withdrawals=0 gas=21000      fees=0.002048565003 root=b71b61..2e546d elapsed="716.955µs"
INFO [04-03|23:59:28.340] Starting work on payload                 id=0x0367b6423437efd0
INFO [04-03|23:59:28.341] Indexed transactions                     blocks=3  txs=4  tail=0 elapsed="827.142µs"
INFO [04-03|23:59:28.341] Stopping work on payload                 id=0x03fec12611061c32 reason=delivery
INFO [04-03|23:59:28.341] Updated payload                          id=0x0367b6423437efd0 number=7  hash=49e53d..2cb60d txs=1  withdrawals=0 gas=580,911    fees=5.80911e-07    root=b5d318..1333e0 elapsed="864.703µs"
INFO [04-03|23:59:28.342] Imported new potential chain segment     number=16 hash=968511..1f007f blocks=1  txs=0  mgas=0.000  elapsed=3.105ms      mgasps=0.000    triediffs=55.95KiB  triedirty=0.00B
INFO [04-03|23:59:28.342] Chain head was updated                   number=16 hash=968511..1f007f root=19cc0e..06f576 elapsed="45.244µs"
WARN [04-03|23:59:28.342] ExecuteNextMsg failed to send message to execEngine err="createBlock mutex held"              msgIdxToExecute=5
INFO [04-03|23:59:28.342] Stopping work on payload                 id=0x0367b6423437efd0 reason=delivery
INFO [04-03|23:59:28.343] Imported new potential chain segment     number=7  hash=49e53d..2cb60d blocks=1  txs=1  mgas=0.581  elapsed=1.361ms      mgasps=426.813  triediffs=21.69KiB  triedirty=0.00B
INFO [04-03|23:59:28.343] Chain head was updated                   number=7  hash=49e53d..2cb60d root=b5d318..1333e0 elapsed="277.621µs"
INFO [04-03|23:59:28.343] Submitted transaction                    hash=0x905e74e3fc3c2248c78c389969082ceb06f3357a67e52429387eb66fd3d40491 from=0x26E554a8acF9003b83495c7f45F06edCB803d4e3 nonce=4  recipient=0x0000000000000000000000000000000000000070 value=0
--- FAIL: TestParentChainEthConfigForkTransition (3.72s)

📣 Thoughts on this report? Let Codecov know! | Powered by Codecov

…lteringStylusSandwichRollback

# Conflicts:
#	execution/gethexec/sequencer.go
Copy link
Copy Markdown
Member

@joshuacolvin0 joshuacolvin0 left a comment

Choose a reason for hiding this comment

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

LGTM

@joshuacolvin0 joshuacolvin0 enabled auto-merge April 3, 2026 23:43
@joshuacolvin0 joshuacolvin0 added this pull request to the merge queue Apr 3, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Apr 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants