Skip to content

Conversation

@padovan
Copy link
Collaborator

@padovan padovan commented Aug 20, 2025

This PR fixes a critical issue where _report fields in kernel BUG and panic reports were empty when logs lacked standard end trace markers, and adds comprehensive test coverage to prevent future regressions.

When parsing kernel logs using ./logspec.py --json-full, the _report fields for KernelBug and KernelPanic errors were coming up empty for logs without standard ---[ end trace markers. This meant valuable debugging information (call traces, hardware details, register dumps) was being lost even though the errors were successfully detected.

Fixed empty _report fields in KernelBug and KernelPanic parsers by adding fallback logic when end trace markers are missing.

Also added test coverage for the _report field in all linux_boot files.

@padovan padovan self-assigned this Aug 20, 2025
When kernel BUG or panic reports don't have standard '---[ end trace'
markers, the _report field remained empty even though the error was
parsed successfully.

This fix adds self._report = text[:report_end] in the fallback logic
for both KernelBug and KernelPanic classes when report_end is calculated
but no end marker is found.

Signed-off-by: Gustavo Padovan <[email protected]>
This test case covers BUG reports without end trace markers, which is
the scenario fixed by the previous commit for empty _report fields.

Signed-off-by: Gustavo Padovan <[email protected]>
Implement position-based validation testing for _report field content
across all linux_boot log files. This ensures the parser correctly
extracts detailed error information for various kernel error types,
preventing regressions in _report field extraction and ensures
consistent error debugging information across all supported log formats.

🤖 Generated with AI help.

Signed-off-by: Gustavo Padovan <[email protected]>
@padovan padovan force-pushed the fix-missing-_report-field branch from ba46366 to 0663cb7 Compare August 20, 2025 21:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant