Repository navigation
Bound benchmark stderr log lines without losing diagnostics - #810
Merged
fcostaoliveira merged 1 commit intoOct 23, 2026
Merged
Conversation
This was referenced Oct 23, 2026
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.
Problem
Verbose RLTest logging turns all captured benchmark stderr into one escaped bytes-repr line. The mixed Zipfian SET/GET/HSET workload produces thousands of expected WRONGTYPE messages, yielding a 360k-character log line. Two #799 sanitizer jobs stalled immediately before that line appeared and reached their 45-minute job limit.
Root cause
logging.debug(..., stderr_bytes)escapes each newline instead of preserving line boundaries. Both failed jobs reached the debug marker aftercommunicate()returned, so their logs do not demonstrate a memtier worker deadlock. GitHub Actions has a documented long-line processing problem. This fixes the confirmed oversized-log construction; the connection to issue #482's historical hangs remains provisional until actual CI passes.Fix
Save
mb.stderrbyte-for-byte before logging. When DEBUG is enabled, decode display text as UTF-8 with replacement for invalid bytes, preserve line boundaries, and split genuine long lines into chunks of at most 2048 characters. Nothing is truncated. Benchmark exit statuses, timeout behavior, workload and sanitizer coverage remain unchanged.Tests
Affected versions
The bytes-repr logging was introduced by beea70e (#322), first released in 2.3.0, and remains through 2.5.2/current master. The mixed Zipfian arbitrary-command test was introduced earlier by 908ea0b (#314), first released in 2.2.0. Source presence does not prove every release/runner exhibits the timeout.
Refs #482. Keep this issue open until PR799 also passes its own CI with the logging fix integrated.
🤖 Generated with Claude Code
Note
Low Risk
Test-harness logging only; benchmark execution, timeouts, and artifact bytes are unchanged aside from safer DEBUG output formatting.
Overview
Fixes CI log stalls when memtier benchmark stderr is huge (e.g. thousands of WRONGTYPE lines) by changing how
Benchmark.runemits DEBUG diagnostics intests/mb.py.Raw stderr is still written to
mb.stderrfirst, byte-for-byte, before any logging. When DEBUG is on, stderr is no longer passed as a single bytes object (which repr-escapes newlines into one massive line). It is decoded as UTF-8 with replacement, logged line-by-line, and lines longer than 2048 characters are split into multiple DEBUG records so nothing is dropped.Adds
tests/test_benchmark_logging.pywith subprocess-based RLTest coverage: bounded log line length, full byte fidelity and save-before-log order, invalid UTF-8 handling, no stderr logging when DEBUG is off, and unchanged success/failure for empty stderr.Reviewed by Cursor Bugbot for commit 97f9c77. Bugbot is set up for automated code reviews on this repo. Configure here.