-
Notifications
You must be signed in to change notification settings - Fork 321
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
app: zephyr: add CONFIG_ASSERT debug overlay #6530
app: zephyr: add CONFIG_ASSERT debug overlay #6530
Conversation
Glad its working for you! Let me know if there's any ideas for improvement around this, happy to add them. |
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.
Not that my +1 counts here, but yes, this makes sense for debugging
You count :) |
app/debug_overlay.conf
Outdated
@@ -1 +1,6 @@ | |||
CONFIG_DEBUG=y | |||
CONFIG_ASSERT=y | |||
CONFIG_STACK_SENTINEL=y | |||
CONFIG_SYS_HEAP_VALIDATE=y |
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.
for HEAP_VALIDATE, sof does not call it directly, no sure zephyr will call it or not.
My feeling is that this does not like stack, low rate to have problems for heap.
I mean this maybe treated as option.
Stack overflow is must.
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.
@btian1 This has found issues in the past and it triggers an assert if corruption is hit.
@kv2019i seeing red on CI will rerun. |
SOFCI TEST |
1 similar comment
SOFCI TEST |
Let me try once more. I couldn't make sense out of the failure. The tests failed because non-existing FW file, suggesting a build failure, but this overlay is not supposed to be used in CI runs. @keqiaozhang @greg-intel any insights? Let's not merge until this is clarified. |
Moving back to draft. Our CI uses CONFIG_DEBUG to turn on features like the IPC flood test. So we really can't put feature like these that do add overhead across the board, to the builds. |
@kv2019i some failing tests around pause resume, wonder if timing has changed here ? |
@wszypelt merge/build fails to "Unhandled Exception: System.BadImageFormatException" in IPC4 smoketest. Is this a failure in test runner, or actual failing case? I can't seem to find any errors related to test execution. @aborisovich you did a recent check with asserts enabled, right? As for SOF test with Linux driver, I can't believe we hit an assert again:
This is not the same as previously fixed in #6900. This has been passing many times in last few weeks, so either this is a very recent regression (in other code), or has a low occurence rate. So back to draft status :( |
Enable CONFIG_ASSERT=y in SOF debug overlay. Also add a commented out list of additional useful Zephyr debugging tools to the overlay. These incur a higher runtime cost, so are left disabled by default. These are all debug tools that have been tested to work with SOF and found useful. Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
216841d
to
ac7c228
Compare
Looks like a test runner issue. |
Another update:
|
@aborisovich Is this ok to you, you still have "changes requested" on this PR? |
After rebase, tests are now good so we are finally ready to go. |
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.
Good to go
🥳 |
After a relatively painful git bisect I found that this has the unfortunate effect of making even the stripped ELF file non-reproducible :-(
|
I just remembered I fixed this with |
Good news and bad news. Good news: mystery solved. This affects only old toolchains like the 2017 and gcc v4 based xt-xcc currently used for TGL. https://reproducible-builds.org/docs/build-path/
Bad news: this will never be fixed for TGL, see issue #7114 why. |
This makes sure Zephyr's -fmacro-prefix-map is working and keeps the builds reproducible when using a recent enough toolchain. As found in the CONFIG_ASSERT PR thesofproject#6530 (comment) this is not true for old Xtensa toolchains. Signed-off-by: Marc Herbert <marc.herbert@intel.com>
This makes sure Zephyr's -fmacro-prefix-map is working and keeps the builds reproducible when using a recent enough toolchain. As found in the CONFIG_ASSERT PR #6530 (comment) this is not true for old Xtensa toolchains. Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Enable CONFIG_ASSERT=y in SOF debug overlay.
Also add a commented out list of additional useful Zephyr debugging
tools to the overlay. These incur a higher runtime cost, so are left
disabled by default. These are all debug tools that have been tested to
work with SOF and found useful.
Dependencies for merging (SOF):
Dependencies for merging (Zephyr):