trippy
trippy copied to clipboard
Crash (`STATUS_ACCESS_VIOLATION`) during simulation tests on Windows when tracing enabled
On Windows, when tracing is enabled for the simulation tests, it occasionally crashes with exit code: 0xc0000005, STATUS_ACCESS_VIOLATION
.
First observed in CI here: https://github.com/fujiapple852/trippy/actions/runs/8032262619/job/21941474883
The error often (but not always) reports:
thread 'tokio-runtime-worker' has overflowed its stack
Note that the tracer is not async and does not use tokio
however in simulation testing trippy is run via a tokio
spawn_blocking()
call.
Issue reproduced on Windows VM and can be readily reproduced inside a debugger. Issues has been narrowed down to this line:
https://github.com/fujiapple852/trippy/blob/05af26a00ffb15bfd85de58048da53c2797fc6db/src/tracing/net/platform/windows.rs#L523
Removing this line (or disabling debug level tracing for trippy::tracing::net::platform
) prevents the crash.
Unclear if this is a bug in the tracing
library or whether the addition of this line triggers an existing memory corruption bug (i.e. by increase in the stack frame size).
Issue only observed during simulating testing and only when tracing is enabled.