-
Notifications
You must be signed in to change notification settings - Fork 0
refactor: integrate kdumpling for session recording #24
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
Merged
sdimitro
merged 6 commits into
develop
from
claude/research-kdumpling-integration-jz2fN
Jan 30, 2026
Merged
refactor: integrate kdumpling for session recording #24
sdimitro
merged 6 commits into
develop
from
claude/research-kdumpling-integration-jz2fN
Jan 30, 2026
Conversation
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
Replace the custom .sdb bundle format with kdumpling-generated vmcore files for session recording and replay. This provides: - Standard ELF64 vmcore format compatible with drgn, crash, gdb - Simplified replay using drgn's native set_core_dump() - Virtual address support in memory segments - Custom ELF notes for SDB session metadata Key changes: - session.py: Use KdumpBuilder instead of custom SparseMemory/bundle - cli.py: Simplified setup_replay_target() using set_core_dump() - repl.py: Updated %session commands for new format - stacks.py: Removed replay-specific code paths (drgn unwinds natively) The recorded files use .vmcore.recorded extension and are standard vmcores that can be loaded by any tool supporting the format. https://claude.ai/code/session_017jLJzNMm6GwvhxsDFNzTKd
Rewrite tests to use the new kdumpling-based session recording API: - test_session.py: Test SparseMemory, TraceManager state, and constants - Remove tests for old bundle format (ZipFile, MemoryRecord, etc.) - Remove tests for deprecated APIs (record_symbol, record_thread_stack) - Add tests for new get_segments() merging behavior - Simplify to focus on recording state and sparse memory - test_session_tracing.py: Integration tests for vmcore recording - Test that recorded vmcores are valid ELF files - Test SDB custom note preservation - Test memory content preservation through record/replay - Test vmcoreinfo capture for drgn compatibility - Remove tests for pre-computed stack traces (native unwinding now) https://claude.ai/code/session_017jLJzNMm6GwvhxsDFNzTKd
Add user-configurable options for recorded vmcore output: - Format options: 'elf' (default) or 'kdump' (kdump compressed) - Compression options for kdump: none, zlib, lzo, snappy, zstd - Compression level: 1-9 (default 6) New REPL commands: - %session config - Show current config - %session config format <elf|kdump> - Set output format - %session config compression <type> - Set compression - %session config compression-level <1-9> - Set level Also fixes CI issues: - Fix yapf formatting throughout - Fix ruff unused imports/variables - Fix mypy type errors (pyelftools, threads.py) - Remove deprecated replay mode code from threads.py (native drgn unwinding now works with vmcores) https://claude.ai/code/session_017jLJzNMm6GwvhxsDFNzTKd
The CI workflows were failing because they only installed pytest/mypy directly without installing SDB's dependencies (kdumpling, pyelftools). Add `pip install .` to all jobs that need the SDB package: - pylint - pytest-unit - pytest-integration - mypy https://claude.ai/code/session_017jLJzNMm6GwvhxsDFNzTKd
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #24 +/- ##
===========================================
- Coverage 76.98% 76.13% -0.85%
===========================================
Files 69 69
Lines 4405 4036 -369
Branches 703 625 -78
===========================================
- Hits 3391 3073 -318
+ Misses 832 809 -23
+ Partials 182 154 -28 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
- Fix import order: kdumpling before drgn (C0411) - Add pylint disable for too-many-instance-attributes on TraceManager - Rename unused 'prog' argument to '_prog' in _save_vmcore - Add pylint disable for broad-exception-caught in extract_sdb_notes - Add pylint disable for too-many-return-statements in _handle_session_config - Add pylint disable for broad-exception-caught in cli.py setup_replay_target https://claude.ai/code/session_017jLJzNMm6GwvhxsDFNzTKd
- Add pylint disable for broad-exception-caught in test_vmcore_loadable_by_drgn - Add pylint disable for too-few-public-methods on TestMemorySegment https://claude.ai/code/session_017jLJzNMm6GwvhxsDFNzTKd
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.
Replace the custom .sdb bundle format with kdumpling-generated vmcore
files for session recording and replay. This provides:
Key changes:
The recorded files use .vmcore.recorded extension and are standard
vmcores that can be loaded by any tool supporting the format.
https://claude.ai/code/session_017jLJzNMm6GwvhxsDFNzTKd