Skip to content
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

Crash (STATUS_ACCESS_VIOLATION) during simulation tests on Windows when tracing enabled #1037

Open
fujiapple852 opened this issue Mar 7, 2024 · 1 comment
Labels
bug Something isn't working test windows

Comments

@fujiapple852
Copy link
Owner

fujiapple852 commented Mar 7, 2024

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:

tracing::debug!(buf = format!("{:02x?}", buf[..bytes_read].iter().format(" ")));

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.

@fujiapple852 fujiapple852 added bug Something isn't working test windows labels Mar 7, 2024
@fujiapple852
Copy link
Owner Author

Copy of CI log for posterity: 11_sim-test (windows-stable).txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working test windows
Projects
None yet
Development

No branches or pull requests

1 participant