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

[BUG] Testbench in cavs2.5-001-drop-stable is caught randomly by valgrind to do Invalid read of size 8 #9431

Open
singalsu opened this issue Sep 3, 2024 · 2 comments
Assignees
Labels
bug Something isn't working as expected

Comments

@singalsu
Copy link
Collaborator

singalsu commented Sep 3, 2024

Describe the bug
The testbench step in SOF CI sometimes fails with pull requests not related to test.

To Reproduce
The CI launches scripts/host-testbench.sh test.

Reproduction Rate
Rare. maybe 1/100 or less.

Expected behavior
A passed test, especially when the PR should not have any impact to test.

Impact
annoyance

Environment

  1. Branch name and commit hash of the 2 repositories: sof (firmware/topology) and linux (kernel driver).
    • Kernel: {SHA}
    • SOF: {SHA}
  2. Name of the topology file
    • Topology: {FILE}
  3. Name of the platform(s) on which the bug is observed.
    • Platform: {PLATFORM}

Screenshots or console output

Run ./scripts/host-testbench.sh
==========================================================
test volume with ./volume_run.sh 16 16 48000 zeros_in.raw volume_out.raw
volume test passed!
volume_out size check passed!
==========================================================
test src with ./src_run.sh 32 32 44100 48000 zeros_in.raw src_out.raw
src test passed!
src_out size check passed!
==========================================================
test eqiir with ./eqiir_run.sh 16 16 48000 zeros_in.raw eqiir_out.raw
eqiir test failed!
Command:         ../../testbench/build_testbench/install/bin/testbench
Argument:         -r 48000 -R 48000 -c 2 -n 2 -b S16_LE -t ../../build_tools/test/topology/test-playback-ssp5-mclk-0-I2S-eq-iir-s16le-s16le-48k-24576k-codec.tplg  -i zeros_in.raw -o eqiir_out.raw
LD_LIBRARY_PATH=../../testbench/build_testbench/sof_ep/install/lib:../../testbench/build_testbench/sof_parser/install/lib
==20153== Memcheck, a memory error detector
==20153== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==20153== Using Valgrind-3.15.0 and LibVEX; rerun with -h for copyright info
==20153== Command: ../../testbench/build_testbench/install/bin/testbench -r 48000 -R 48000 -c 2 -n 2 -b S16_LE -t ../../build_tools/test/topology/test-playback-ssp5-mclk-0-I2S-eq-iir-s16le-s16le-48k-24576k-codec.tplg -i zeros_in.raw -o eqiir_out.raw
==20153== 
(ipc-common.c:239) ipc_init()
(ll_schedule.c:310) ll_scheduler_init()
(edf_schedule.c:115) edf_scheduler_init()
(helper.c:149) get_drv(), found driver type 1, uuid (nil)U
(helper.c:309) comp new (nil)U type 1 id 1.0
==20153== Thread 2:
==20153== Invalid read of size 8
==20153==    at 0x486AA79: get_drv (helper.c:130)
==20153==    by 0x486AA79: comp_new (helper.c:299)
==20153==    by 0x486B9EF: ipc_comp_new (helper.c:656)
==20153==    by 0x48B0022: load_process (process.c:507)
==20153==    by 0x48AEB55: load_widget (widget.c:146)
==20153==    by 0x1101B7: parse_topology (topology.c:472)
==20153==    by 0x10C5F7: test_pipeline_load (testbench.c:659)
==20153==    by 0x10C5F7: pipline_test (testbench.c:765)
==20153==    by 0x48C0608: start_thread (pthread_create.c:477)
==20153==    by 0x49FA352: clone (clone.S:95)
==20153==  Address 0x0 is not stack'd, malloc'd or (recently) free'd

Please also include the relevant sections from the firmware log and kernel log in the report (and attach the full logs for complete reference). Kernel log is taken from dmesg and firmware log from sof-logger. See https://thesofproject.github.io/latest/developer_guides/debugability/logger/index.html

@singalsu singalsu added the bug Something isn't working as expected label Sep 3, 2024
@singalsu singalsu self-assigned this Sep 3, 2024
@singalsu
Copy link
Collaborator Author

singalsu commented Sep 3, 2024

A potential fix is to apply to cavs2.5 branch the patches for current static build testbench version that is simplified from version in elder SOF version. It has not been caught to fail with valgrind.

@singalsu
Copy link
Collaborator Author

singalsu commented Sep 3, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working as expected
Projects
None yet
Development

No branches or pull requests

1 participant