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

Beacon block streamer test fails on macOS in debug mode #6647

Open
alecalve opened this issue Dec 2, 2024 · 2 comments
Open

Beacon block streamer test fails on macOS in debug mode #6647

alecalve opened this issue Dec 2, 2024 · 2 comments
Labels
macos Related to macOS or Apple Silicon optimization Something to make Lighthouse run more efficiently. test improvement Improve tests

Comments

@alecalve
Copy link

alecalve commented Dec 2, 2024

Description

This is happening on a MacBook pro.

Version

Lighthouse: v6.0.0
Cargo: cargo 1.82.0 (8f40fc59f 2024-08-21)
Rustup:

active toolchain
----------------

stable-aarch64-apple-darwin (default)
rustc 1.82.0 (f6e511eec 2024-10-15)

Present Behaviour

Initial setup:

git clone [email protected]:sigp/lighthouse.git lighthouse-repro
cd lighthouse-repro
git checkout v6.0.0

First failing test

Link to code

Command:

cargo test --package beacon_chain --lib -- data_availability_checker::overflow_lru_cache::test::overflow_cache_test_state_cache --show-output

Output:

    Finished `test` profile [unoptimized + debuginfo] target(s) in 0.91s
     Running unittests src/lib.rs (target/debug/deps/beacon_chain-d9a1d435f251ff26)

running 1 test

thread 'tokio-runtime-worker' has overflowed its stack
fatal runtime error: stack overflow
error: test failed, to rerun pass `-p beacon_chain --lib`

Second failing test

Link to code

Command:

cargo test --package beacon_chain --lib -- beacon_block_streamer --show-output

Output:

    Finished `test` profile [unoptimized + debuginfo] target(s) in 1.02s
     Running unittests src/lib.rs (target/debug/deps/beacon_chain-d9a1d435f251ff26)

running 1 test

thread 'tokio-runtime-worker' has overflowed its stack
fatal runtime error: stack overflow
error: test failed, to rerun pass `-p beacon_chain --lib`

Expected Behaviour

The tests should complete.

@michaelsproul
Copy link
Member

michaelsproul commented Dec 2, 2024

Duplicate of:

We are fighting a constant battle against stack overflows in debug mode, because the Rust compiler has a hard time optimising the nested function calls + futures in some of our deps (esp warp).

Running the tests in --release is the recommended approach, see make test-release which is what runs on CI.

@michaelsproul
Copy link
Member

Realised there's a second failing test there in the beacon_block_streamer, which is not identified in the other issue. I'll leave this one open to track that.

@michaelsproul michaelsproul added test improvement Improve tests optimization Something to make Lighthouse run more efficiently. labels Dec 2, 2024
@michaelsproul michaelsproul changed the title Some tests fail with stack overflow on 6.0.0 tag Beacon block streamer test fails on macOS in debug mode Dec 2, 2024
@michaelsproul michaelsproul added the macos Related to macOS or Apple Silicon label Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
macos Related to macOS or Apple Silicon optimization Something to make Lighthouse run more efficiently. test improvement Improve tests
Projects
None yet
Development

No branches or pull requests

2 participants