Skip to content

Stack overflow when updating from 1.5.1 to 1.5.3 #53

Closed
@abr-egn

Description

@abr-egn

A specific test has started failing with a stack overflow in the Rust mongodb driver when using async-std without any code change on our part; I've narrowed down that this happens when the dependency tree includes async-executor 1.5.3, but not when it's pinned to 1.5.1. This can be reproduced by running this test against a replica set topology:

$ cargo test --no-default-features --features tracing-unstable,async-std-runtime test::spec::retryable_writes::run_legacy
    Finished test [unoptimized + debuginfo] target(s) in 0.16s
     Running unittests src/lib.rs (target/debug/deps/mongodb-a10b17d95b5decb5)

running 1 test

thread 'test::spec::retryable_writes::run_legacy' has overflowed its stack
fatal runtime error: stack overflow
error: test failed, to rerun pass `--lib`

Caused by:
  process didn't exit successfully: `/Users/abraham.egnor/src/mongo-rust-driver/debug_stack-overflow-async-executor/target/debug/deps/mongodb-a10b17d95b5decb5 'test::spec::retryable_writes::run_legacy'` (signal: 6, SIGABRT: process abort signal)

Unfortunately, I haven't had much success constructing a minimal reproduction - I strongly suspect some badly-behaved unsafe code is at the root of this, since changes that affect memory layout (unrelated struct fields) have caused this behavior to unpredictably fail to occur. Let me know if there's more information I can provide that would be useful!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions