-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
Logging: Assert with LOG_IMMEDIATE #19245
Comments
similar to #19238 |
I'm having trouble reproducing this, as running this sample requires a working bluez installation, and I get the above build error in bluez git master when I try to build it for my Ubuntu 18.04 machine (the distro bluez packages do not provide btproxy). Do you have a working ref or tag in upstream bluez that builds? At any rate, I just enabled immediate mode logging for tests, I'm not as deeply familiar with its internal implementation as some others (cc @nordic-krch ) @Vudentz can you give #19322 a try? It changes the default for tests from logging with immediate mode, to a thin wrapper on top of printk. Even if that goes in I would leave this open though. An immediate workaround would be to set CONFIG_TEST_LOGGING_DEFAULTS=n in the various prj.conf in tests/bluetooth/shell. |
I looks like setting immediate logging for tests (and minimal logging in future #19322) has consequences:
@andrewboie what was the reason for switching to immediate mode? |
Because otherwise the log buffers overflow if anything more than a few messages are printed at a time. This is especially noticeable for any test which generates a fatal error (try tests/kernel/fatal) Seriously, the defaults right now are unusable. We could spend forever trying to trade-off between not losing any messages and how much buffer space we can get away with...not interested in going down this rabbit hole
Just fix these issues if they come up IMO. Got anything specific other than this one bluetooth test? This one slipped through because CI never actually runs it due to it requiring a special environment to run in QEMU
@nordic-krch The logging defaults suppress DBG messages (or they should) so what's the problem here?? Let's not overstate the case! The alternative is that I revert all the changes which cause fatal error handling to integrate with the logger, and delete CONFIG_TEST_LOGGING_DEFAULTS. We can go back to disabling LOG everywhere, but wouldn't we like to get rid of all the use of printk in the kernel and just standardize on one API for emitting diagnostic messages? |
@nordic-krch what's the status of this bug? |
I believe it is fixed but have no bluetooth tools to run it. @Vudentz can you check? |
Thanks @nordic-krch . In that case we rely on @Vudentz to provide some feedback; please, do so we might be able to close this Medium Priority issue for Zephyr v2.1. |
@Vudentz could you please re-check if this issue still exists? It's marked as medium so it'd be good to close it if it's already fixed upstream. |
I just tested this now:
Seems to work fine, so closing the issue for now. |
uart:~$ bt init
ASSERTION FAIL [out_ctx->control_block->offset <= out_ctx->size] @ ZEPHYR_BASE/subsys/logging/log_output.c:101
Build tests/bluetooth/shell
Looks like this got introduced by 2192499 since it is only reproducible with LOG_IMMEDIATE which is now selected by TEST_LOGGING_DEFAULTS.
The text was updated successfully, but these errors were encountered: