Skip to content

CI: surface Rust module panic payloads in nightly failure triage - #10911

Merged
memark merged 2 commits into
masterfrom
memark-ci-panic-highlight
Aug 14, 2026
Merged

memark merged 2 commits into
masterfrom
memark-ci-panic-highlight

Conversation

@memark

@memark memark commented Aug 13, 2026 •

Copy link
Copy Markdown
Collaborator

Describe the changes in the pull request

  1. Current: before capping failed-logs.txt to 200KB, ci-failure-context greps the whole log for "key failure lines" and pins them at the top so they survive truncation. That grep list looks for panicked at, which a module panic never puts in the collected log — RustPanicHook_Init chains a tracing hook ahead of std's, and only the tracing one (A panic occurred in the Rust code panic.payload=… panic.location=…) routes through RedisModule_Log into the redis logfile; std's copy goes to a stderr pipe RLTest never reads. So the one line naming the failing Rust file and line was dropped, while ~90 unsymbolized backtrace frames survived the cap. Separately, the dedupe strips ISO and Python-logger timestamps but not redis-server's <pid>:M <date> prefix or hex addresses, so the same crash repeated across N tests consumed N of the 150 available slots.
  2. Change: add the tracing hook's wording and crashed by signal: to the pattern list, and normalize the redis-server log prefix and hex addresses before deduplicating.
  3. Outcome: internal-only — no module behavior changes. Nightly and periodic-master-validation triage (Codex → Slack) now receives the panic payload and source location instead of backtrace noise. Against the artifacts of run 31388520069, the same 9 crashes reduce from 18 key lines to 2, one of which names c_entrypoint/triemap_ffi/src/iter_types.rs:39.

Which additional issues this PR fixes

N/A

Main objects this PR modified

  1. ci-failure-context action — highlight-patterns default gains the module's tracing panic wording and crashed by signal:.
  2. Same action's dedupe pass — normalizes redis-server <pid>:M <date> prefixes and 0x… addresses so repeats of one crash collapse to a single key line.

Consumers are event-nightly.yml and event-periodic-master-validation.yml. Note this does not reach the flow-test.yml → task-test.yml lane, which never invokes this action; making a crash visible in the job log itself is separate work.

The redis-prefix pattern is deliberately unanchored, because the console copy of a redis line carries an ANSI colour escape ahead of the prefix. It spells the month out so that an unanchored match cannot land mid-message.

Mark if applicable

  • This PR introduces API changes
  • This PR introduces serialization changes

Release Notes

  • This PR requires release notes
  • This PR does not require release notes

`ci-failure-context` highlighted `panicked at`, std's default panic hook
format. A loaded RediSearch module replaces that hook in
`RustPanicHook_Init`, so its panics read `A panic occurred in the Rust
code panic.payload=... panic.location=...` and never matched. Every
module-level Rust panic was therefore excluded from the KEY FAILURE
LINES banner and left to survive the tail-cap on its own.

Add that signature plus `crashed by signal:`, and normalize redis-server
log prefixes and hex addresses out of the dedupe key so N repetitions of
one crash collapse to a single entry instead of consuming N of the
`max-key-lines` slots.

Co-Authored-By: Claude Opus 5 <[email protected]>
@codecov

codecov Bot commented Aug 13, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.18%. Comparing base (1fec8e2) to head (65d7797).
⚠️ Report is 3 commits behind head on master.

❌ Your project check has failed because the head coverage (82.12%) is below the adjusted base coverage (82.13%). You can increase the head coverage or adjust the Removed Code Behavior.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #10911      +/-   ##
==========================================
- Coverage   83.19%   82.18%   -1.01%     
==========================================
  Files         608      632      +24     
  Lines       81025    82174    +1149     
  Branches    36273    37422    +1149     
==========================================
+ Hits        67405    67534     +129     
- Misses      13274    14293    +1019     
- Partials      346      347       +1     
Flag Coverage Δ
flow 84.34% <ø> (-0.04%) ⬇️
unit 55.72% <ø> (-0.62%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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.

`RustPanicHook_Init` chains its `tracing` hook ahead of std's rather than
replacing it, so a module panic emits both spellings. What decides which one
reaches these patterns is routing, not hook installation: `tracing` goes
through `RedisModule_Log` into the redis logfile that gets collected, while
std's `panicked at` goes to a stderr pipe RLTest never reads.

The redis-prefix dedupe pattern accepted any word where the month belongs, so
an unanchored match could land mid-message and merge two distinct `[FAIL]`
lines that differed only in such a span. Spell the month out. Anchoring is not
an option — the console copy of a redis line carries an ANSI colour escape
ahead of the prefix.

Co-Authored-By: Claude Opus 5 <[email protected]>
@sonarqubecloud

Copy link
Copy Markdown

@memark
memark added this pull request to the merge queue Aug 14, 2026
Merged via the queue into master with commit 8b3fe5a Aug 14, 2026
59 of 60 checks passed
@memark
memark deleted the memark-ci-panic-highlight branch August 14, 2026 07:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants