-
Notifications
You must be signed in to change notification settings - Fork 349
Description
Crash at SRC tear down phase when run as DP component on different core that rest of the pipeline
To Reproduce
Get an MTL (probably any ipc4 nocodec platform would do) device and configure it for nocodec operation. Build topologies from #10009 and copy freshly built sof-mtl-nocodec-dp-core-test.tplg to sof-mtl-nocodec.tplg's place on DUT.
Boot or reload SOF driver. When SOF driver has loaded take the SOF logs with mtrace-reader.py and run:
aplay -Dhw:0,2 -f S32_LE -c 2 -r 44100 -d 10 -t raw /dev/random & arecord -Dhw:0,2 -f S16_LE -c 2 -r 32000 -d 10 /dev/null
Reproduction Rate
So far 100%. But this only happens if the SRC is put on a different core than the rest of the pipeline.
Expected behavior
DSP crashes (panic called), and the code does not continue. I have no stack trace, but according to my studies the failure happens here:
Line 590 in b193c48
| if (!ptr_range_found) |
Panic is called here due to the failure:
Line 262 in b193c48
| k_panic(); |
And the likely call ending up here:
Line 528 in b193c48
| void rfree(void *ptr) |
The free_src() was recently called, but I have been able to see a print placed at the end of free_src() suggesting that the problematic rfree() call is not done in the module code, but on some higher level.
Impact
This effectively prevents running components (in DP domain) on separate core from rest of the pipeline.
Environment
- Branch name and commit hash of the 2 repositories: sof (firmware/topology) and linux (kernel driver).
- Kernel: {dee62092621e3cca2080a962cfaec2af1627712d} or later (Should have ASoC: sof: ipc4-topology: Add support to sched_domain attribute linux#5382)
- SOF: {5a1d8df} for FW, topology needs Topology2: Add nocodec DP core 1 test topologies for MTL, LNL, and PTL #10009
- Name of the topology file
- Topology: {sof-mtl-nocodec-dp-core-test.tplg}
- Name of the platform(s) on which the bug is observed.
- Platform: {MTL}
Screenshots or console output
'''
[ 615.237115] ipc: ipc_cmd: rx : 0x12000000|0x0
[ 615.237341] dma: sof_dma_put: dma_put(), dma = 0x400c9770, sref = 0
[ 615.238336] ipc: ipc_cmd: rx : 0x12010000|0x0
[ 615.238623] src: src_free: comp:1 0x9 src_free()
[ 615.238913] mem_allocator: virtual_heap_free: Unable to free 0xa0158000
'''
In kernel logs it looks like this
'''
May 19 13:35:47 9049fa08cb7e.jf.intel.com kernel: snd_sof:sof_ipc4_route_free: sof-audio-pci-intel-mtl 0000:00:1f.3: unbind modules mixin.5.1:0 -> mixout.6.1:0
May 19 13:35:47 9049fa08cb7e.jf.intel.com kernel: snd_sof:sof_ipc4_log_header: sof-audio-pci-intel-mtl 0000:00:1f.3: ipc tx : 0x46000003|0x4: MOD_UNBIND
May 19 13:35:47 9049fa08cb7e.jf.intel.com kernel: sof-audio-pci-intel-mtl 0000:00:1f.3: ipc timed out for 0x46000003|0x4
May 19 13:35:47 9049fa08cb7e.jf.intel.com kernel: sof-audio-pci-intel-mtl 0000:00:1f.3: IPC timeout
May 19 13:35:47 9049fa08cb7e.jf.intel.com kernel: sof-audio-pci-intel-mtl 0000:00:1f.3: failed to unbind modules mixin.5.1:0 -> mixout.6.1:0
May 19 13:35:47 9049fa08cb7e.jf.intel.com kernel: snd_sof:sof_ipc4_log_header: sof-audio-pci-intel-mtl 0000:00:1f.3: ipc tx : 0x12020000|0x0: GLB_DELETE_PIPELINE
May 19 13:35:48 9049fa08cb7e.jf.intel.com kernel: sof-audio-pci-intel-mtl 0000:00:1f.3: ipc timed out for 0x12020000|0x0
May 19 13:35:48 9049fa08cb7e.jf.intel.com kernel: sof-audio-pci-intel-mtl 0000:00:1f.3: IPC timeout
May 19 13:35:48 9049fa08cb7e.jf.intel.com kernel: sof-audio-pci-intel-mtl 0000:00:1f.3: failed to free pipeline widget pipeline.5
May 19 13:35:48 9049fa08cb7e.jf.intel.com kernel: snd_sof:sof_ipc4_log_header: sof-audio-pci-intel-mtl 0000:00:1f.3: ipc tx : 0x47000000|0x0: MOD_SET_DX [data size: 8]
May 19 13:35:48 9049fa08cb7e.jf.intel.com kernel: sof-audio-pci-intel-mtl 0000:00:1f.3: ipc timed out for 0x47000000|0x0
May 19 13:35:48 9049fa08cb7e.jf.intel.com kernel: sof-audio-pci-intel-mtl 0000:00:1f.3: IPC timeout
May 19 13:35:48 9049fa08cb7e.jf.intel.com kernel: sof-audio-pci-intel-mtl 0000:00:1f.3: failed to disable target core: 1 for pipeline pipeline.5
'''