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] sof-logger resisted pkill -INT, using -KILL #385

Closed
marc-hb opened this issue Sep 18, 2020 · 5 comments
Closed

[BUG] sof-logger resisted pkill -INT, using -KILL #385

marc-hb opened this issue Sep 18, 2020 · 5 comments
Assignees
Labels
area:logs Log and results collection, storage, etc. False Pass / green failure P2 Critical bugs or normal features type:bug Something doesn't work as expected

Comments

@marc-hb
Copy link
Collaborator

marc-hb commented Sep 18, 2020

#373 was merged because https://sof-ci.01.org/softestpr/PR373/build182/devicetest was all green. However almost all tests were failing because the sof-logger resisted kill -INT. To make it worse I misused exit_status=2 which has the special meaning Not Applicable which means no error and everything is green.

@marc-hb
Copy link
Collaborator Author

marc-hb commented Sep 18, 2020

Quick workaround submitted at #381

@marc-hb marc-hb self-assigned this Sep 18, 2020
marc-hb referenced this issue in marc-hb/sof-test Sep 18, 2020
Commit 61271a3 ("logger: stop discarding all error messages and fix
the cleanup code") made two mistakes:

1. It used the -INT signal which doesn't always work. This broke most
   tests.
2. It then misused exit_failure=2 where 2 means Not Applicable. This
  turned most broken tests to green.

Rushed commit a2669ff ("hijack.sh: don't fail yet when sof-logger
resists kill -INT") then downgraded all this to warning to get the tests
passing again. However it didn't deal with the real issue: stopping the
logger on the first try. Switching to TERM does it and will hopefully
close https://github.com/thesofproject/sof/issues/3433

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
@marc-hb
Copy link
Collaborator Author

marc-hb commented Sep 18, 2020

I cannot reproduce locally but I got an idea:

2020-09-17 20:56:25 UTC [REMOTE_ERROR] sof-logger resisted pkill -INT, using -KILL

I don't do anything REMOTE_ maybe that's why it's happening in CI and not locally.

From https://pubs.opengroup.org/onlinepubs/7908799/xsh/signal.h.html

SIGINT | i | Terminal interrupt signal.

I've never done the REMOTE_ thing, no idea how to do it. @xiulipan or @aiChaoSONG could you compare REMOTE_ vs local for me?

@marc-hb
Copy link
Collaborator Author

marc-hb commented Sep 18, 2020

I switched from -INT to -TERM and it works, please review: #382

I filed this in sof because I was afraid it was an issue with the logger but now I think it's just an sof-test issue.

@marc-hb marc-hb assigned xiulipan and aiChaoSONG and unassigned marc-hb Sep 18, 2020
@marc-hb marc-hb transferred this issue from thesofproject/sof Sep 18, 2020
@mengdonglin
Copy link
Contributor

Keep this issue open before we root cause if this is a bug of sof-logger or test case.

  • If this is an sof-logger issue, will close this issue and report a bug in SOF repo.
  • If this is a test case issue, we will use PR refine alsabat test script #401 and close this issue.

@mengdonglin mengdonglin added type:bug Something doesn't work as expected P2 Critical bugs or normal features labels Sep 28, 2020
@marc-hb
Copy link
Collaborator Author

marc-hb commented Sep 28, 2020

I believe this has been fixed by #382 hijack.sh: switch first attempt to stop the logger from -INT to -TERM, closing.

@marc-hb marc-hb added area:logs Log and results collection, storage, etc. False Pass / green failure labels Jul 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:logs Log and results collection, storage, etc. False Pass / green failure P2 Critical bugs or normal features type:bug Something doesn't work as expected
Projects
None yet
Development

No branches or pull requests

4 participants