Skip to content

Printk processed by logger overwrites each other #11495

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
Qbicz opened this issue Nov 19, 2018 · 2 comments · Fixed by #11598
Closed

Printk processed by logger overwrites each other #11495

Qbicz opened this issue Nov 19, 2018 · 2 comments · Fixed by #11598
Assignees
Labels
area: Logging bug The issue is a bug, or the PR is fixing a bug priority: low Low impact/importance bug

Comments

@Qbicz
Copy link
Collaborator

Qbicz commented Nov 19, 2018

Describe the bug
Enabled processing of printk messages by logger: LOG_PRINTK=y, with RTT backend, two subsequent printk calls without line break. Effect: second message is printed from beginning of the line and overwrites the first printed message.

To Reproduce
Steps to reproduce the behavior:

  1. LOG_PRINTK=y
  2. Use RTT backend to log
  3. Whole log config:
CONFIG_LOG=y
CONFIG_LOG_DEFAULT_LEVEL=2
CONFIG_LOG_BACKEND_RTT_MODE_DROP=y
CONFIG_LOG_MODE_NO_OVERFLOW=y
CONFIG_LOG_PRINTK=y
CONFIG_LOG_PRINTK_MAX_STRING_LENGTH=256
CONFIG_LOG_PROCESS_THREAD_PRIO=10
CONFIG_LOG_BUFFER_SIZE=4096
CONFIG_LOG_BACKEND_RTT_MESSAGE_SIZE=256
CONFIG_LOG_BACKEND_SHOW_COLOR=n
CONFIG_LOG_BACKEND_FORMAT_TIMESTAMP=n

CONFIG_CONSOLE=y
CONFIG_USE_SEGGER_RTT=y
CONFIG_SEGGER_RTT_BUFFER_SIZE_UP=4096
CONFIG_RTT_CONSOLE=y
CONFIG_UART_CONSOLE=n
  1. printk("1: %s ", "first_printk"); printk("2: %d ", 7); printk("\n");
  2. 2: 7rst_printk

Expected behavior
Printouts should come one after another.

Impact
Incorrect printing of logs, medium priority problem.

Environment (please complete the following information):

  • OS: Ubuntu 16.04 LTS
  • Toolchain: Zephyr SDK 0.9.5
  • Commit SHA or Version used: 9c14767
  • HW: nRF52840
@Qbicz Qbicz changed the title Printk overwriting each other when processed Printk processed by logger overwrites each other Nov 19, 2018
@Qbicz
Copy link
Collaborator Author

Qbicz commented Nov 19, 2018

FYI @nordic-krch @pdunaj

@galak galak added bug The issue is a bug, or the PR is fixing a bug priority: low Low impact/importance bug labels Nov 20, 2018
@pdunaj
Copy link
Collaborator

pdunaj commented Nov 23, 2018

It is possible that this bug is not yet completely fixed. Please check the comment in the PR.

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: low Low impact/importance bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants