Uh oh!
There was an error while loading. Please reload this page.
trace: enable trace after it is ready - #4636
Conversation
There was a problem hiding this comment.
So, calling dma_trace_init_complete will turn the tracing on BUT calling trace_init will not turn the tracing ON.
I feel that the normal sequence of enabling tracing should be:
dma_trace_init_complete()
trace_on()
I think is called DMA trace.
And for the other trace we shold do:
trace_init()
trace_on()
There was a problem hiding this comment.
good point, moving and unifying the trace_on() invoking to the end of primary_core_init() looks better to me.
lgirdwood
commented
Aug 17, 2021
@keyonjie seeing this in the CI for CMl Will rerun CI tests to rule out script or DUT. |
lgirdwood
commented
Aug 17, 2021
SOFCI TEST |
keyonjie
commented
Aug 18, 2021
@lgirdwood looks the failure on CML module unload/reload is valid, let me try to figure out it tomorrow. |
@lgirdwood looks good to me. When do you plan to create the v1.9 branch/tag? Good to merge once @keyonjie sorts out the CI failure. |
keyonjie
commented
Aug 18, 2021
@lgirdwood@dbaluta looks the CI failure is not related, just rebased and force push to trigger a re-test. |
lgirdwood
commented
Aug 18, 2021
@keyonjie looks like a null pointer deref race after latest CI reults. |
lgirdwood
commented
Aug 19, 2021
Sorry, now done (everyone is on holiday so my workload is high), we have the stable-v1.9 branch, there are a couple of fixes pending though prior to rc1. I've no issues if you need to do a rc1 tag if needed. The fixes Intel fixes will probably land next week (which I could tag as rc2). |
dbaluta
commented
Aug 23, 2021
Thanks, no need for tagging on our side. I will go with your pace for tagging and RCs. |
If the log tracing (e.g. tr_err()) is called before the trace itself is available, the FW will crash and FW boot fail happen. Enable the trace after it is ready, and don't try to perform tracing when it is unavailable. We have the empty version of trace_init/on(), so the extra "#ifdef" in primary_core_init() is superfluous. Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
lgirdwood
commented
Aug 24, 2021
marc-hb
commented
Aug 25, 2021
That's not my experience; I've seen tr_xxx() called thousands of times before the trace was initialized and this never caused any issue because the code was smart enough not to do anything in this case. See for instance PR #4334 What crashed exactly and where? Bug fixes should fix well identified bug sequences, not just "something crashes" |
marc-hb
commented
Aug 25, 2021
... and now the trace is crashing!! See #4676 report. Revert this ASAP? |
plbossart
commented
Aug 25, 2021
marc-hb
commented
Aug 25, 2021
Easy: merging bug fixes for bugs that have no description, no test and no reproduction steps. |
keyonjie
commented
Aug 26, 2021
I hit this during the memory allocation debugging, let me submit a PR to demonstrate it. |
keyonjie
commented
Aug 26, 2021
keyonjie
commented
Aug 26, 2021
I just recheck the CI result of the PR, we didn't capture failure on multiple platforms but it did observe the issue on ADLP_RVP_NOCODEC, maybe the "always failure" on _ZEPHYR platforms had reduced attentions from reviewers and it got slipped. |
marc-hb
commented
Aug 31, 2021
Another regression in #4699 |
lgirdwood
commented
Aug 31, 2021
marc-hb
commented
Aug 31, 2021
I don't know that yet, I'm just getting back into it. I was just connecting github dots above. |
keyonjie
commented
Sep 1, 2021
marc-hb
commented
Sep 1, 2021
I don't understand what this means. If you look at the sof-logger results in some random, recent PR you can see that the logger.etrace header is present on every platform: https://sof-ci.01.org/sofpr/PR4701/build10153/devicetest/ |
paulstelian97
commented
Sep 1, 2021
@marc-hb Mailbox trace being disabled by default means that etrace will not get the regular traces, although error traces might go through it anyway. That's the default behaviour I observe on my end. |
marc-hb
commented
Sep 1, 2021
Yes that's correct, I remember now. I had forgotten that very poor name in the Kconfig interface, if someone had said TRACEM instead I would have understood immediately :-) |
As reported in thesofproject#4759, thesofproject#4636 and a few others linked from there. Signed-off-by: Marc Herbert <marc.herbert@intel.com>
This shows that thesofproject#4636 did not fix any real-world issue. thesofproject#4636 changed some sof->trace logic, however sof->trace does not exist before trace_init() and calling tr_err() immediately after trace_init() works. Note DSP panics were detected immediately after thesofproject#4636 was merged, see reports in thesofproject#4676 Signed-off-by: Marc Herbert <marc.herbert@intel.com>
marc-hb
commented
Sep 14, 2021
Finally submitted a revert in #4760 |
As reported in thesofproject#4759, thesofproject#4636 and a few others linked from there. Signed-off-by: Marc Herbert <marc.herbert@intel.com> (cherry picked from commit 3ff1dc0)
If the log tracing (e.g. tr_err()) is called before the trace itself is
available, the FW will crash and FW boot fail happen.
Enable the trace after it is ready, and don't try to perform tracing
when it is unavailable.
Signed-off-by: Keyon Jie yang.jie@linux.intel.com