Skip to content

Include errors outside sof-audio before scanning dmesg for errors, ignore only specific known issues - #290

Merged
aiChaoSONG merged 3 commits into
thesofproject:masterfrom
fredoh9:fix/dmesg_log_filter
Jul 27, 2020
Merged

Include errors outside sof-audio before scanning dmesg for errors, ignore only specific known issues#290
aiChaoSONG merged 3 commits into
thesofproject:masterfrom
fredoh9:fix/dmesg_log_filter

Conversation

@fredoh9

@fredoh9fredoh9 commented Jul 16, 2020

Copy link
Copy Markdown
Contributor

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.

@marc-hbmarc-hb left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for doing this.

Comment threadtools/sof-kernel-log-check.sh

@marc-hbmarc-hb left a comment

Copy link
Copy Markdown
Collaborator

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.

Comment threadtools/sof-kernel-log-check.sh
@marc-hb

Copy link
Copy Markdown
Collaborator

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
fredoh9force-pushed the fix/dmesg_log_filter branch from f5d184d to d5282c7CompareJuly 20, 2020 21:42
@fredoh9

Copy link
Copy Markdown
ContributorAuthor

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.

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>
@fredoh9fredoh9 changed the title [RFC] remove sof-audio before scanning dmesg for errorRemove sof-audio before scanning dmesg for error and Ignore known issuesJul 20, 2020

@marc-hbmarc-hb left a comment

Copy link
Copy Markdown
Collaborator

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.

@aiChaoSONGaiChaoSONG left a comment

Copy link
Copy Markdown

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:masterJul 27, 2020
@marc-hbmarc-hb changed the title Remove sof-audio before scanning dmesg for error and Ignore known issuesInclude errors outside sof-audio before scanning dmesg for errors, ignore only specific known issuesJul 27, 2020
Sign up for freeto 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

@fredoh9@marc-hb@aiChaoSONG