Skip to content

Conversation

@fredoh9
Copy link
Contributor

@fredoh9 fredoh9 commented Jul 16, 2020

When scan errors in kernel log in sof-kernel-log-check.sh, current code filter "sof-audio" first then check for error. This will limit scanning logs and not scalable. Below $project_key is nothing but "sof-audio".

err_str="error|failed|timed out|panic|oops"
project_key="sof-audio"

if [ "$ignore_str" ]; then
    err=$(eval $cmd|grep 'Call Trace' -A5 -B3)$(eval $cmd | grep $project_key | grep -E "$err_str"|grep -vE "$ignore_str")
else
    err=$(eval $cmd|grep 'Call Trace' -A5 -B3)$(eval $cmd | grep $project_key | grep -E "$err_str")
fi

We should remove this limitation. If we see unrelated error, we can add it to ignoring error list. This is first step toward this approach. I ran first test on APL, CML Helios, ICL RVP. If no objection is raised, I will scan logs for all supported platforms and update ignore_str.

@fredoh9 fredoh9 requested a review from plbossart July 16, 2020 23:19
Copy link
Collaborator

@marc-hb marc-hb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for doing this.

Copy link
Collaborator

@marc-hb marc-hb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The shellcheck warnings seem to all make sense.

@marc-hb
Copy link
Collaborator

marc-hb commented Jul 17, 2020

err_str="error|failed|timed out|panic|oops"

Later we should drop such "screen scraping" and use something more robust like journalctl --dmesg --priority err with no false positive (for instance a debug message with one of these keywords) and no false negative (e.g. ERR:). I'm not suggesting to do that right now but probably good to keep in mind while you're doing this PR.

@fredoh9 fredoh9 force-pushed the fix/dmesg_log_filter branch from f5d184d to d5282c7 Compare July 20, 2020 21:42
@fredoh9
Copy link
Contributor Author

fredoh9 commented Jul 20, 2020

err_str="error|failed|timed out|panic|oops"

Later we should drop such "screen scraping" and use something more robust like journalctl --dmesg --priority err with no false positive (for instance a debug message with one of these keywords) and no false negative (e.g. ERR:). I'm not suggesting to do that right now but probably good to keep in mind while you're doing this PR.

This is good idea, I will create an issue to follow up.

fredoh9 added 3 commits July 20, 2020 14:45
Scan all dmesg without filtering any word. Unrelevant errors should be
ignored by adding error phases to 'ignore_str'.

Signed-off-by: Fred Oh <fred.oh@linux.intel.com>
Realtek codecs thrown an error on startup, need to ignore this error
for now.
kernel: [  759.001903] rt700 sdw:1:25d:700:0: Parity error detected

Signed-off-by: Fred Oh <fred.oh@linux.intel.com>
Known usb issue in CML Helios platform. This is nothing to do with
SOF project.

Signed-off-by: Fred Oh <fred.oh@linux.intel.com>
@fredoh9 fredoh9 changed the title [RFC] remove sof-audio before scanning dmesg for error Remove sof-audio before scanning dmesg for error and Ignore known issues Jul 20, 2020
Copy link
Collaborator

@marc-hb marc-hb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc: @xiulipan - this would be a perfect use case for sof-test CI.

Copy link

@aiChaoSONG aiChaoSONG left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix. LGTM

@aiChaoSONG aiChaoSONG merged commit 23f9c7a into thesofproject:master Jul 27, 2020
@marc-hb marc-hb changed the title Remove sof-audio before scanning dmesg for error and Ignore known issues Include errors outside sof-audio before scanning dmesg for errors, ignore only specific known issues Jul 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants