Fix empty _report fields and add comprehensive validation for kernel error parsing#24
Merged
Merged
Conversation
added 3 commits
August 20, 2025 18:50
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 <gustavo.padovan@collabora.com>
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 <gustavo.padovan@collabora.com>
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 <gustavo.padovan@collabora.com>
padovan
force-pushed
the
fix-missing-_report-field
branch
from
August 20, 2025 21:50
ba46366 to
0663cb7
Compare
Use the initial timestamp block and its contiguous call trace to find a safe fallback boundary when the kernel omits an end-trace marker. This prevents later watchdog, reboot, and DT output from being attached to the BUG report, and allows subsequent BUGs to be discovered. Add focused truncated-report coverage and correct the MediaTek fixture to account for all three bounded BUG reports. Incident: https://lore.kernel.org/all/178426434363.11836.10489080558310367907@kernelci.org/
Extend _report validation with forbidden-content and size checks for the MediaTek DT crash log. The assertions cover complete traces, abrupt reboot truncation, and a later BUG that was previously hidden by parser overrun. Incident: https://lore.kernel.org/all/178426434363.11836.10489080558310367907@kernelci.org/
KernelPanic always sets report_end from either the explicit end marker or the initial timestamped block. Remove the unreachable fallback so the panic path does not imply a third boundary mechanism. Incident: https://lore.kernel.org/all/178426434363.11836.10489080558310367907@kernelci.org/
nuclearcat
added a commit
to nuclearcat/kernelci-core
that referenced
this pull request
Jul 18, 2026
Install logspec through configurable URL and revision build arguments, defaulting to kernelci/logspec@370c994c. An explicit revision invalidates the Docker layer on upgrades and makes pipeline images reproducible. Expose KCI_VER_LOGSPEC in the image so deployments can verify the installed source revision. This revision includes the bounded BUG-report fix from kernelci/logspec#24 and the DTC parser updates. Signed-off-by: Denys Fedoryshchenko <denys.f@collabora.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.
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.