-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Hard fault if CONFIG_LOG2_MODE_DEFERRED
is enabled
#41517
Comments
CONFIG_LOG2_MODE_DEFERRED
is enabled
May be I got different error, but in similar situation with floating point I increase |
@ycsin Any chance you can provide the west command to build for debug and reproduction purposes? |
I use
|
A small update following this: I had It's a bit blurry now and I decided to continue with the legacy LOG for the time being |
Issue reported in shell was fixed by #38960. I will take a look at RTT case. |
@ycsin can you paste the configuration you were using? Was shell used on RTT as well? In that case you shouldn't need to enable rtt backend(it will go through rttshell) but still it should work. First report (stack overflow) was happening at startup. When second fault occurs? Legacy LOG will be deprecated at some point so it would be good to resolve issues like that. |
Thanks for all the support!
I'm not sure about the backends, I generally don't mess with the default configurations unless something doesn't work as expected. I'm not really sure what is RTT, I'm just trying out the My usual
Anything else is implied by some other Kconfigs that I might not know that they have some dependencies with LOG/SHELL. I'll post more details when I come back to this issue later, maybe after I rebased and improved my custom application to a stable state. For the configurations, would the |
@ycsin did you manage to check it? |
@nordic-krch sorry, not yet. I just got the 2.7 LTS branch ready for my application today, this issue was filed for 2.7.0 RC3. I'll probably wait for @manoj153's test result first before I test it again. |
Done my test #42207 |
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. |
Describe the bug
I'm trying to enable LOG2 to log floating point by setting
CONFIG_LOG2_MODE_DEFERRED
inprj.conf
but I bump into a hard fault.Impact
Unable to use LOG2
Logs and console output
This is the callstack when I debug the device with a probe:
The debugger can't seem to display the content of the
stack
, it says something like "optimized out" for some reason:What I know is that the stack sentinel detected a stack overflow and triggered a hardfault, which goes to my
fatal_error_handler
, which invokeLOG_PANIC()
:and the
LOG_PANIC()
attempts to print the logs, but triggered another assert as all this are invoked from the stack sentinel's trigger hard faultwhich triggers
k_panic
which will trigger a hard fault and calls my hard fault error handler again which calls the
LOG_PANIC
, and I think it will just go on and on?My system workqueue stack size is 4096 bytes. My main stack size was 1024 bytes, I increased that to 2048 bytes but the error remained the same, I modified my
main()
like so to reduce the scope:Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: