Help with nested signal context warnings
Norman Feske
norman.feske at genode-labs.com
Wed Feb 17 16:39:14 CET 2021
Hi Colin,
On 17.02.21 15:19, Colin Parker wrote:
> Related to my original inquiry, I read that the log function
> "relies on a fair bit of framework infrastructure such as
> synchronization primitives," and I became curious if calling "log" as a
> debugging message from within an IO signal handler is possibly the
> source of my problem?
No. It's safe to use the 'log' function from an I/O signal handler.
> I am still doubtful that it is the true cause - I
> think that it's more likely that the shorter signal handler with no
> logging simply doesn't have time to trigger the bad behavior very often
> - but I became concerned that if indeed "log" is a problem if called
> during a signal handler, then my entire debugging strategy needs to be
> revisited.
I agree. The use of 'log' skews the performance quite a bit. You may
consider the 'trace' mechanism instead, which greatly reduces the side
effects by logging the output to a thread-local trace buffer. In
particular, you may inspect the use of the trace_logger component. You
can find an example scenario at os/recipes/pkg/test-trace_logger/.
Cheers
Norman
--
Dr.-Ing. Norman Feske
Genode Labs
https://www.genode-labs.com · https://genode.org
Genode Labs GmbH · Amtsgericht Dresden · HRB 28424 · Sitz Dresden
Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth
More information about the users
mailing list