Skip to content

Early log panic does not print logs on shell #12873

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

Closed
nordic-krch opened this issue Jan 30, 2019 · 1 comment
Closed

Early log panic does not print logs on shell #12873

nordic-krch opened this issue Jan 30, 2019 · 1 comment
Assignees
Labels
area: Logging bug The issue is a bug, or the PR is fixing a bug priority: medium Medium impact/importance bug

Comments

@nordic-krch
Copy link
Collaborator

Describe the bug
When log_panic is triggered early,before log thread starts, no logs can be printed because shell acting as logger backend is not yet initialized.

To Reproduce
Modify samples/subsys/shell/shell_module. Add to main():

LOG_INF("test");
k_panic();

Observe on uart that panic report is printed but test log message isn't.

Expected behavior
All logs before log_panic() should be printed.

Impact
Early failures are hard to debug.

Additional context
If issue is difficult to solve a workaround would be to disable shell and enable standard UART log to debug early stage issue (see #12851).

@nordic-krch nordic-krch added the bug The issue is a bug, or the PR is fixing a bug label Jan 30, 2019
@nashif nashif added area: Logging priority: medium Medium impact/importance bug labels Jan 30, 2019
@nordic-krch
Copy link
Collaborator Author

As i don't see possible way to fix it, decided that i'll document how to handle early crash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Logging bug The issue is a bug, or the PR is fixing a bug priority: medium Medium impact/importance bug
Projects
None yet
Development

No branches or pull requests

2 participants