Skip to content
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

logs dropped with CONFIG_LOG_MIPI_SYST_USE_CATALOG=y #58476

Closed
kv2019i opened this issue May 31, 2023 · 3 comments · Fixed by #58719
Closed

logs dropped with CONFIG_LOG_MIPI_SYST_USE_CATALOG=y #58476

kv2019i opened this issue May 31, 2023 · 3 comments · Fixed by #58719
Assignees
Labels
area: Logging bug The issue is a bug, or the PR is fixing a bug platform: Intel ADSP Intel Audio platforms priority: high High impact/importance bug

Comments

@kv2019i
Copy link
Collaborator

kv2019i commented May 31, 2023

Describe the bug
MIPI Sys-T Cat logging is not working with current Zephyr mainline. Same application works with Zephyr 3.3.

To Reproduce
Steps to reproduce the behavior:

  1. build SOF with CONFIG_LOG_MIPI_SYST_USE_CATALOG=y
  2. run any SOF test case

Expected behavior
Logs are seen in backend.

Impact
Unable to use Sys-T logging.

Logs and console output
By adding debugging to
subsys/logging/log_output_syst.c

It can be seen logs reach the output handler, but are skipped as the fmt string does not fall into the catalogue section:

DEBUG: msg of 44 bytes
log pkg 9e0a3bc0 data 9e0a3bec
# print in is_in_log_strings_section()
log addr be066360 outside be07bdc4-be07d330
DEBUG: not in catelogue
DEBUG: msg of 44 bytes
log pkg 9e0a3c00 data 9e0a3c2c
log addr be066360 outside be07bdc4-be07d330
DEBUG: not in catelogue

Environment (please complete the following information):

  • OS: SOF/Zephyr on Intel ADSP (cavs25)
  • Toolchain: Zephyr SDK 0.16
  • Zephyr: 7d54586

Additional context
Follow-up from SOF bug thesofproject/sof#7703

@kv2019i kv2019i added the bug The issue is a bug, or the PR is fixing a bug label May 31, 2023
@kv2019i
Copy link
Collaborator Author

kv2019i commented May 31, 2023

Tested revert of bae0a5b , but did not help (suggest from @dcpleung ).

@kv2019i
Copy link
Collaborator Author

kv2019i commented May 31, 2023

I tried tests/subsys/logging/log_syst/ on this same platform and the test did not pass, but the results are a bit inconclusive. I will need to verify the subsys test on older Zephyr. but sharing the details still here as I know SOF is out-of-tree case.

@kv2019i
Copy link
Collaborator Author

kv2019i commented May 31, 2023

@dcpleung Update, I did a full biset (a bit slow as I had to find a working SOF commit pair for each bisect round) and ta-daa, the culprit is caea9dc . So it is the other commit merged in #56996 , I only tested reverting bae0a5b but not the other one. :(

UPDATE: So I now tested Zephyr f0a6205 with SOF f599f6131139d068fd74da13a8fcb18ef2ed6386

dcpleung added a commit to dcpleung/zephyr that referenced this issue Jun 1, 2023
Commit caea9dc
("logging: Use TYPE_SECTION macros for log strings") changed to
use TYPE_SECTION macros for log strings. However, the data type
was changed from char[] to (char *), resulting in the pointer
to log strings are being put in the log_strings_area section
instead of the actual strings. Fix this by reverting the data
type change back to before that commit but semantically uses
TYPE_SECTION_ITERABLE() by expanding it manually.

Fixes zephyrproject-rtos#58476

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
@nashif nashif added the priority: high High impact/importance bug label Jun 1, 2023
carlescufi pushed a commit that referenced this issue Jun 1, 2023
Commit caea9dc
("logging: Use TYPE_SECTION macros for log strings") changed to
use TYPE_SECTION macros for log strings. However, the data type
was changed from char[] to (char *), resulting in the pointer
to log strings are being put in the log_strings_area section
instead of the actual strings. Fix this by reverting the data
type change back to before that commit but semantically uses
TYPE_SECTION_ITERABLE() by expanding it manually.

Fixes #58476

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Logging bug The issue is a bug, or the PR is fixing a bug platform: Intel ADSP Intel Audio platforms priority: high High impact/importance bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants