Open bogdanm opened 6 months ago
Forgot to add: the priority of this is very low as far as I'm concerned. I had immediate logging enabled in my project and this is why I noticed this issue, because otherwise the utility of immediate mode multidomain logging is very questionable. I just thought that I should mention this issue since I stumbled upon it.
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.
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.
This issue is seen only because you are using log immediate. When deferred mode is used (the one intended to be used with multidomain configuration) then z_log_init
is used by the logging thread and not by enable_logger
which just creates the thread. I will some configuration check to prevent that.
@bogdanm Are you trying to use multidomain logging in immediate mode?
This issue is seen only because you are using log immediate. When deferred mode is used (the one intended to be used with multidomain configuration) then
z_log_init
is used by the logging thread and not byenable_logger
which just creates the thread. I will some configuration check to prevent that.@bogdanm Are you trying to use multidomain logging in immediate mode?
That is indeed what I was trying to do, yes. I was not aware that multidomain logging was supposed to work only in deferred mode. In this case, maybe the real fix is a depends on LOG_MODE_DEFERRED
in Kconfig.
Configuration options:
With the configuration above,
link_ipc_service_init
(inlog_link_ipc_service.c
) is called byenable_logger
(log_core.c
) as follows (note the assert at the top):This happens because the initialization priority of the logger is 0 (
log_core.c
):But the initialization priority of the nRF5340 IPC mailbox driver is 40 (
mbox_nrfx_ipc.c
):So the hardware mailbox driver is not initialized when
link_ipc_service_init
is called.My Zephyr version: https://github.com/nrfconnect/sdk-zephyr/tree/v3.4.99-ncs1-1 (I'm using Nordic Connect SDK, but this appears to be a mainline Zephyr issue).