-
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
lib: net_buf: Generates lots of warnings during Bluetooth initialization #80167
Comments
CC: @JordanYates |
More accurately this was introduced by #71697, and any such usage should have been cleaned up as part of that PR. |
@JordanYates, I think the change of the message level from debug to warning, triggered all these messages on the console. |
Yes, but it's the usage of blocking APIs on the system workqueue that is the problem, not the log level of the message. |
If I understood correctly, @jori-nordic used "defensive" programming, by changing the timeout to K_NO_WAIT when sys work queue was used. So problem was "patched" and user can have surprising results since timeout is changed, in certain situation, behind the scene. I think enabling debug level for the module could help then to identify, at runtime, all the situation where the timeout is changed and so fix the problem properly. This second phase can be very time consuming and so I guess can be addressed in a future PR, but changing the log message level from debug to warning would imply to have these fixes before next release, which I believe is unpractical. So, my proposal, is to switch back to debug level the message. Does this make sense to you? |
The problem with the original change is that it breaks a pretty fundamental assumption that
This is not a problem with the log level, If
No, that only hides the problem. I would agree to only printing the level at |
Indeed, this is quite frustrating, and I submitted this point a while ago (#72699). To my surprise, what you call a "fundamental assumption" was not respected also prior to @jori-nordic changes. See note on net_buf_alloc documentation. |
Describe the bug
Several warnings are generated on the console during Bluetooth initialization with the message as follow:
<wrn> net_buf: Timeout discarded. No blocking in syswq
.I discovered this using the platform
nrf52840dk/nrf52840
with peripheral_hr, even if the problem is not specific to this application.Apparently this has been introduced by 88ee2be
To Reproduce
west build -b nrf52840dk/nrf52840 samples/bluetooth/peripheral_hr
west flash
Expected behavior
Normally, I would expect no warning for a regular Bluetooth initialization.
Impact
Annoyance and feeling that something is not right.
Logs and console output
Environment:
The text was updated successfully, but these errors were encountered: