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

Commit related to null pointer exception detection causing UART issues #34222

Closed
torsteingrindvik opened this issue Apr 12, 2021 · 3 comments
Closed
Assignees
Labels
bug The issue is a bug, or the PR is fixing a bug priority: medium Medium impact/importance bug Stale

Comments

@torsteingrindvik
Copy link
Contributor

torsteingrindvik commented Apr 12, 2021

Describe the bug

I have been seeing issues related to UART lately.
The current master (8bee027ec4) has the following problem:

  • UART works right after flashing
  • If the board is reset (nrfjprog -r), no output is shown

I have only found this to be true in tests, not in samples.
I found that the bug happens when ZTEST is used.

I have bisected the current master (bad) vs. the v2.5.0/fe7c2ef tag/commit (good), and found the likely causal commit to be: 1b22f6b8c8.
This commit ("enable null-pointer exception detection in the tests") introduces CONFIG_CORTEX_M_DEBUG_NULL_POINTER_EXCEPTION.
If the below steps to reproduce are repeated but with CONFIG_CORTEX_M_DEBUG_NULL_POINTER_EXCEPTION_DETECTION_NONE=y (since we are not allowed to set the former manually), the problem goes away (UART appears even when restarting).

To Reproduce

I found a simple test which includes printing stuff to UART.
(This test uses debug.conf instead of the implicit prj.conf, so it must be explicitly passed)

  1. cd tests/misc/test_build
  2. west build -b nrf52840dk_nrf52840 --pristine -- -DOVERLAY_CONFIG=debug.conf
  3. Notice the continous UART output
  4. nrfjprog -r
  5. Notice the lack of any UART output

Expected behavior
UART output also when board is reset.

Impact
Is likely a cause for some of the CI issues in nRF Connect SDK downstream sdk-nrf seen the last several weeks (for tests relying on UART).

Environment (please complete the following information):

  • OS: Linux
  • Toolchain: gnuarmemb, 9 q4
@torsteingrindvik torsteingrindvik added the bug The issue is a bug, or the PR is fixing a bug label Apr 12, 2021
@jfischer-no
Copy link
Collaborator

related to #33381

@galak galak added the priority: medium Medium impact/importance bug label Apr 13, 2021
@galak
Copy link
Collaborator

galak commented Apr 13, 2021

I think we should disable this be default. Users keep running into this and I think their expectation of being able to debug should take precedence.

@github-actions
Copy link

github-actions bot commented Aug 1, 2021

This issue has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this issue will automatically be closed in 14 days. Note, that you can always re-open a closed issue at any time.

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

No branches or pull requests

4 participants