-
Notifications
You must be signed in to change notification settings - Fork 322
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
[BUG] error trace debugfs entry (etrace) is always empty #3265
Comments
Either this is a regression (I have used it on i.MX8 initially before adding the DMA trace support -- heck, before adding the host DMA in the first place) or something is different between Intel and NXP platforms. Is there any known working commit a few months ago so you can start bisecting? |
We should really have a first message to check that the trace works. An empty trace is not-testable, it can mean the trace is not working or there is no error message. An 'Hello SOF" seems required for CI/daily tests to check the trace functionality, no? |
Issue not apparent when testing with the slim driver, maybe a kernel regression? |
I also noticed this last week but I thought it's just me being unable to use sof-logger properly. |
I hardly remember seeing error trace data in "etrace" ever. Looking through both kernel and firmware sources it seems like the kernel expects two memory window regions - SOF_IPC_REGION_DEBUG for debug and SOF_IPC_REGION_TRACE for errors, in the firmware e.g. on CAVS platforms they are initialised by |
Ack - "Hello SOF". @marc-hb do you fancy making this change, it should be a one liner for each platform in the FW ready function to add a trace_error call with the above string.. |
@lgirdwood I am OK with this! |
@lyakh To understand how the trace work, we need to know we have 2 kinds of trace:
To understand more about error trace, we need first to know where is the buffer. Following code take APL as example: sof/src/platform/apollolake/include/platform/lib/memory.h Lines 175 to 181 in cf74566
sof/src/platform/intel/cavs/include/cavs/lib/mailbox.h Lines 38 to 40 in cf74566
Function for trace written to mailbox: Lines 68 to 97 in cf74566
I am also look into this issue, it seems we have some error in trace implement. |
@xiulipan thanks for the explanation, that's also my impression, that the current implementation isn't right and I don't understand whether and when and how it ever worked in the past. |
@plbossart @lgirdwood Now all trace is refined to link with comp ctx and uuid, I found it is not that easy to just add one line Hello SOF directly into our code. |
I typically use IPC for such messages in my internal tests that don't have an obvious component. But any component that is obvious and already included/visible in the current context is good. |
@xiulipan thanks a lot for your information about traces. This is the kind of information we need to write it in sof-docs. |
@xiulipan nice, just as I said - we never actually copy the data to the mailbox, no idea how it has been tested with the slim driver... Wondering whether it ever worked and since when it broke down. |
The error trace debugfs entry (/sys/kernel/debug/sof/etrace) is always empty which lead to we can't get any error trace with sof-logger (sof-logger -l *.ldc), this is bad for debugging when DMA trace doesn't work because of FW hanged or crashed.
To Reproduce
Do anything can lead to FW reporting tr_err() or comp_err(), and check the "sof-logger -l *.ldc".
Reproduction Rate
100%
Expected behavior
We should see the error trace logs in sof-logger output.
Impact
This will make it difficult for FW debugging when FW is hang or crashed.
Environment
Any Intel platforms
The text was updated successfully, but these errors were encountered: