-
Notifications
You must be signed in to change notification settings - Fork 130
Add debug features to moq-native #806
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Warning Rate limit exceeded@kixelated has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 7 minutes and 14 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (2)
WalkthroughRemoved the Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
rs/moq-native/src/log.rs (1)
60-83: Approve deadlock detection implementation with optional clarity improvement.The debug-only deadlock detector is well-implemented: properly scoped to debug builds, provides detailed logging, and uses appropriate polling interval.
💡 Optional: Clarify the commented abort suggestion
The commented
std::process::abort()could benefit from additional context about when developers should uncomment it:- // Optionally: std::process::abort() to get a core dump + // Uncomment to abort and generate a core dump for post-mortem analysis: + // std::process::abort();
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
Cargo.lockis excluded by!**/*.lock
📒 Files selected for processing (3)
js/hang/src/publish/element.tsrs/moq-native/Cargo.tomlrs/moq-native/src/log.rs
💤 Files with no reviewable changes (1)
- js/hang/src/publish/element.ts
🧰 Additional context used
📓 Path-based instructions (2)
rs/**/Cargo.toml
📄 CodeRabbit inference engine (CLAUDE.md)
For Rust development, use the workspace configuration in
rs/Cargo.toml
Files:
rs/moq-native/Cargo.toml
**/*.rs
📄 CodeRabbit inference engine (CLAUDE.md)
In Rust crates, tests should be integrated within source files using inline test modules
Files:
rs/moq-native/src/log.rs
🧠 Learnings (1)
📚 Learning: 2025-12-10T04:00:14.871Z
Learnt from: CR
Repo: moq-dev/moq PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-10T04:00:14.871Z
Learning: Applies to rs/**/Cargo.toml : For Rust development, use the workspace configuration in `rs/Cargo.toml`
Applied to files:
rs/moq-native/Cargo.toml
🔇 Additional comments (6)
rs/moq-native/Cargo.toml (3)
18-18: LGTM! Feature flag properly configured.The tokio-console feature correctly uses the
dep:prefix to enable the optional console-subscriber dependency.
23-23: Version 0.5 is already the latest release of console-subscriber (0.5.0, published October 2025) with no known security vulnerabilities. No action required.
28-28: No action required. Version 0.12 is the current stable release of parking_lot, and there are no known vulnerabilities. The transitive dependency lock_api is at version 0.4.14, which is well above the security fix threshold (0.4.2) for historical CVEs.Likely an incorrect or invalid review comment.
rs/moq-native/src/log.rs (3)
5-8: LGTM! Imports correctly support layered subscriber architecture.The new imports enable the composable layer pattern for combining fmt and console subscribers.
38-40: LGTM! Enhanced log directives improve runtime observability.The additional directives for tokio and runtime crates provide useful debugging information while maintaining appropriate log levels.
42-58: LGTM! Layered subscriber architecture properly implemented.The conditional compilation correctly enables console-subscriber only when the feature is active, while maintaining backwards compatibility with the standard fmt layer.
- Add tokio-console feature for async task debugging - Compile with --features moq-native/tokio-console to enable - Spawns console-subscriber layer when feature is enabled - Add .cargo/config.toml with tokio_unstable flag for console support - Add justfile commands: relay-console and pub-console - Add parking_lot deadlock detector - Runs automatically in debug builds (cfg(debug_assertions)) - Checks for deadlocks every 1 second - Logs detailed deadlock information with backtraces - Improve logging configuration - Add tokio and runtime log directives - Migrate to layered tracing subscriber architecture - Update justfile for easier tokio-console usage - relay and pub commands set TOKIO_CONSOLE_BIND environment variable - Simplified web command to run only hang-demo - New relay-console and pub-console commands to connect tokio-console These features are disabled by default and have no impact on release builds or runtime performance unless explicitly enabled. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2c21704 to
66290c4
Compare
66290c4 to
b56ea93
Compare
Summary
tokio-consolefeature for async task debuggingparking_lotdeadlock detector (debug builds only)Details
tokio-console Support
--features moq-native/tokio-consoleDeadlock Detection
cfg(debug_assertions)Logging Improvements
Test Plan
cargo check --workspacecargo check --workspace --features moq-native/tokio-console🤖 Generated with Claude Code