Repository navigation
Skip non-log os_signpost entries in OsTraceRelayReceiver::next - #5
Merged
Merged
Conversation
Real iOS 27.2.1 devices (e.g. WebKit/Safari loading a page) emit frequent
0x02-framed os_signpost / non-log activity entries whose level byte is outside
the five os_log levels (0, 1, 2, 0x10, 0x11). Previously OsTraceRelayReceiver::next
returned Err(UnexpectedResponse("unknown log level byte value")), terminating
callers' log capture loops within seconds.
Skip valid-framed non-log entries unconditionally (the length-prefixed framing
keeps the stream in step), skip structurally malformed single entries up to 64
in a row before failing, include the hex byte in TryFrom<u8> errors, and add a
unit test covering both an 80-signpost burst and a 64-malformed run.
Co-Authored-By: Claude Code <noreply@anthropic.com>
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
0x02-framed non-log entries (e.g.os_signpostintervals) in 12 seconds whose level byte is outside{0, 1, 2, 0x10, 0x11}, causingOsTraceRelayReceiver::next()to returnErr(UnexpectedResponse("unknown log level byte value"))and prematurely kill log capture streams.OsTraceRelayReceiver::next()(length prefix keeps the stream in step), skip structurally malformed entries up to 64 consecutively before erroring, and include the hex byte value inLogLevel::try_fromerror strings.receiver_skips_non_log_signposts_and_caps_malformed_bursts.Verification
cargo fmt -p idevice -- --checkcargo clippy -p idevice --features full --lib --tests -- -D warningscargo test -p idevice --features full --lib(98/98)🤖 Generated with Claude Code