Uh oh!
There was an error while loading. Please reload this page.
hijack: roll back signal before func_exit_handler - #977
Conversation
if any function inside func_exit_handle calls exit indirectly, it will lead to infinity recursive calls. Roll back the signal in the beginning of the handler to avoid such cases. Signed-off-by: Yong-an Lu <yongan.lu@intel.com>
marc-hb
left a comment
There was a problem hiding this comment.
No, bash is not that stupid. Type this:
bash
func_exit_handler() { printf'in exit handler\n';exit; }
trap func_exit_handler EXIT
exit
=> no infinite loopAre you trying to call the handler directly? Don't do that. If you need to call the handler's code then insert one layer of indirection.
@marc-hb Maybe my understanding is incorrect, but in https://sof-ci.sh.intel.com/#/result/planresultdetail/17476?model=TGLU_RVP_NOCODEC_IPC4ZPH&testcase=check-playback-all-formats It looks like a recursive call on https://github.com/thesofproject/sof-test/pull/973/files#diff-bc7925bc6dfddedfd138183aeea9aafd0010bde80cb9d55b12701a2c0d0fc32fR697 |
miRoox
commented
Nov 9, 2022
BTW, in sh-tglu-rvp-nocodec-ci-02 the journal seems lost, @marc-hb do you have any solution? |
marc-hb
commented
Nov 9, 2022
Maybe it was called twice because of our weird SubTest thing. Anyway https://sof-ci.sh.intel.com/#/result/planresultdetail/17476?model=TGLU_RVP_NOCODEC_IPC4ZPH&testcase=check-playback-all-formats does not look like an infinite loop at all. |
marc-hb
commented
Nov 9, 2022
Can you reproduce a problem that is fixed by this PR? |
miRoox
commented
Nov 9, 2022
No, I'm still trying. |
miRoox
commented
Nov 9, 2022
I understand where the TIMEOUT came from: it's just because there is no "Test Result: FAIL!" at the end of the log. But there are still 2 mysteries:
|
This looks like a double reservation: It could also be the previous test that just crashed. |
marc-hb
commented
Nov 9, 2022
this function is called in many places. |
marc-hb
commented
Nov 9, 2022
This is worrying and not the first time. I recently found that Ubuntu 22 still uses |
if any function inside func_exit_handle calls exit indirectly, it will lead
to infinity recursive calls. Roll back the signal in the beginning of the
handler to avoid such cases.
Signed-off-by: Yong-an Lu yongan.lu@intel.com