-
Notifications
You must be signed in to change notification settings - Fork 48
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
multiple-pause-resume.sh: Check for aplay/arecord pid when waiting #1126
multiple-pause-resume.sh: Check for aplay/arecord pid when waiting #1126
Conversation
It has been observed that the expect process has been terminated (pidof returns with no PID) but the child aplay is still running. This only happens with ChainDMA enabled PCMs where the time to stop the stream takes more than 100ms (from trigger stop to PCM close). With the right timing on such PCM the pidof expect will break the wait loop and we progress to the next iteration which - again with right timing and setup - might fail if the aplay is still in a process of closing and the next iteration includes the same PCM. Add the aplay and arecord commands to the pidof command to make sure that the iteration has been completed before starting a new one. We will still catch timeouts and in that case we should kill the stuck processes. Signed-off-by: Peter Ujfalusi <[email protected]>
400 iteration on local device:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Except for cleanups, we should stop using pkill and pgrep and use pid_list instead.
SOFCI TEST |
A fix for thesofproject/sof#8445 has been merged. @ujfalusi is this still needed? Naive question sorry. |
While now ChainDMA will stop faster (and pause) and we might not see the issue this patch is fixing, I'm fine to close it, but we should note that the |
SOFCI TEST This just failed and seems relevant? Everything else is green.
|
SOFCI TEST |
This looks simple and useful: merged. @ujfalusi can you please take a look at failure https://sof-ci.01.org/softestpr/PR1126/build682/devicetest/index.html?model=LNLM_RVP_NOCODEC&testcase=multiple-pause-resume-50 and the previous one above? Does it give the extra information that you were expecting? EDIT: here's a timeout example: https://sof-ci.01.org/softestpr/PR1224/build686/devicetest/index.html |
Both shows that after a set of timeout there is an expect and aplay running. I'm not sure what to make of the whole issue, but for sure we had a stall aplay process. What I'm not sure with the rewritten expect script is the impact of the The history of this change was that in certain cases the test reported an error on subsequent iteration, depending on few factors and that was hard to piece back together. |
It has been observed that the expect process has been terminated (pidof returns with no PID) but the child aplay is still running. This only happens with ChainDMA enabled PCMs where the time to stop the stream takes more than 100ms (from trigger stop to PCM close). With the right timing on such PCM the pidof expect will break the wait loop and we progress to the next iteration which - again with right timing and setup - might fail if the aplay is still in a process of closing and the next iteration includes the same PCM.
Add the aplay and arecord commands to the pidof command to make sure that the iteration has been completed before starting a new one. We will still catch timeouts and in that case we should kill the stuck processes.