You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] FW reported error: 104 - Other failure of module instance initialization request #4832
@RanderWang Can you provide more traces and specifically log transitions of the variable "be->dpcm[stream].users" and which stages this variable is updated (startup, hw_params, prepare, hw_free, shutdown).
In theory this refcount is used precisely to prevent transitions on shared BEs, e.g.
/* do not free hw if this BE is used by other FE */if (be->dpcm[stream].users>1)
continue;
My take is that there is probably something not quite right in soc-pcm.c, if there is a race condition we should fix the root cause. Changing how the node_id is cleared seems a bit like a hack to me.
@plbossart the problem is not be free. The node_id is set by BE component( SDW dai). When the first stream A is free, the FE dai widget is free by SOF, so the node_id is cleared, at this time the BE state is SND_SOC_DPCM_STATE_STOP. And the be_hw_params for second stream B want to call sdw_hw_params to set node_id, but it found the state is SND_SOC_DPCM_STATE_STOP, it will skip this BE hw_params, so the node_id will not be set.
I must admit I don't recall why we only added locking for the trigger cases. I don't know how we can protect the state of a BE which can be modified by separate FEs. Using the user counts and states is by construction racy, I can't think of a simple fix, unless I am gravely mistaken it looks like all the soc-pcm.c code needs to be revisited.
The path of least resistance for a quick fix would be to avoid clearing stuff and keeping the node_id constant for shared BEs.
@tiwai shares my analysis that the Linux BE locking isn't really up-to-snuff, we would need to come-up with a better mechanism to make sure FE transitions don't end-up corrupting the state of a shared BE.
This sort of change is tricky and will likely require multiple weeks and lots of testing before we get it right.
Activity
fredoh9 commentedon Aug 29, 2023
Found in ADLP_SKU0B00_SDCA also from today's daily test.
Intel internal daily test link:
planresultdetail/30853?model=ADLP_SKU0B00_SDCA-cavs2_5-ipc4&testcase=check-suspend-resume-with-playback-5
fredoh9 commentedon Sep 1, 2023
Not reproduced for 3 days
keqiaozhang commentedon Sep 5, 2023
This issue happened again:
planresultdetail/31237?model=MTLP_SDW_AIOC-ace1_0-ipc4&testcase=check-suspend-resume-with-playback-5
planresultdetail/31270?model=MTLP_RVP_SDW-ace1_0-ipc4&testcase=check-signal-stop-start-playback-50
fredoh9 commentedon Sep 8, 2023
happen again
planresultdetail/31496?model=MTLP_RVP_SDW-ace1_0-ipc4&testcase=check-signal-stop-start-playback-50
mengdonglin commentedon Sep 14, 2023
We haven't observed this issue in v2.7 stress test.
RanderWang commentedon Sep 25, 2023
Tried a few days test but can't reproduce it
lgirdwood commentedon Sep 29, 2023
@fredoh9 any recent sightings at your end ?
fredoh9 commentedon Sep 29, 2023
I haven't seen the same issue for a week+.
lgirdwood commentedon Oct 2, 2023
ok, pls close if not seen again by end of week.
fredoh9 commentedon Oct 2, 2023
Found today again with MTLP_SDW_AIOC
Intel Internal result: planresultdetail/32587?model=MTLP_SDW_AIOC-ace1_0-ipc4&testcase=check-suspend-resume-with-playback-5
27 remaining items
RanderWang commentedon Jan 30, 2024
Sure, it is also a hack to me. What I think is to set it by topology or rework our SOF but I have other high priority tasks to do.
RanderWang commentedon Jan 30, 2024
@plbossart the problem is not be free. The node_id is set by BE component( SDW dai). When the first stream A is free, the FE dai widget is free by SOF, so the node_id is cleared, at this time the BE state is SND_SOC_DPCM_STATE_STOP. And the be_hw_params for second stream B want to call sdw_hw_params to set node_id, but it found the state is SND_SOC_DPCM_STATE_STOP, it will skip this BE hw_params, so the node_id will not be set.
The bug is very random and I don't reproduce it today.
RanderWang commentedon Jan 30, 2024
My plan was to keep FE dai widget alive in SOF since it was used by two steams, but we need to do much work to do it
plbossart commentedon Jan 30, 2024
I must admit I don't recall why we only added locking for the trigger cases. I don't know how we can protect the state of a BE which can be modified by separate FEs. Using the user counts and states is by construction racy, I can't think of a simple fix, unless I am gravely mistaken it looks like all the soc-pcm.c code needs to be revisited.
The path of least resistance for a quick fix would be to avoid clearing stuff and keeping the node_id constant for shared BEs.
plbossart commentedon Jan 31, 2024
@tiwai shares my analysis that the Linux BE locking isn't really up-to-snuff, we would need to come-up with a better mechanism to make sure FE transitions don't end-up corrupting the state of a shared BE.
This sort of change is tricky and will likely require multiple weeks and lots of testing before we get it right.
marc-hb commentedon Jan 31, 2024
It looks like this a kernel issue, not firmware. Should be transferred to https://github.com/thesofproject/linux ?
ranj063 commentedon Feb 21, 2024
@marc-hb yes this is a kernel issue and I have a good feeling that the linux PR #4829 would also fix this issue
marc-hb commentedon Feb 21, 2024
Transferring this issue since Github does nice, automagic redirections that don't break URLs.
marc-hb commentedon Feb 21, 2024
There was a permission cleanup recently and I lost write access to https://github.com/thesofproject/linux/issues which is probably why I can't do this transfer.
EDIT: fixed.
plbossart commentedon Apr 24, 2024
I've really lost the plot on this issue @marc-hb @fredoh9, do we still see this in any CI/daily tests now?
marc-hb commentedon Apr 24, 2024
I haven't seen this in recent times. I guess some unrelated change just made the race described by Rander above less likely.
fredoh9 commentedon Apr 25, 2024
I haven't seen this problem lately.
I lost my test result database to confirm.
plbossart commentedon May 3, 2024
closing, let's reopen if that occurs again