Skip to content

stack overflow when running overflow_cache_test_state_cache in debug #6120

Open
@jimmygchen

Description

@jimmygchen

Description

Getting this error when running cargo test from the root directory:

thread 'tokio-runtime-worker' has overflowed its stack

Reproduced with cargo nextest as well. It doesn't occur on CI, but on our laptops. i think it may be due to different platform max stack size defaults.

The failing test identified is overflow_cache_test_state_cache

Based on this comment, we might be able to get rid of this test once the state cache is removed in da checker:

// THIS TEST CAN BE DELETED ONCE TREE STATES IS MERGED AND WE RIP OUT THE STATE CACHE

The root cause of the stack overflow seems to be in the blob conversion here:

.map(|blob| ssz_blob_to_crypto_blob::<E>(blob))

Not sure if there's an easy way around it given that the KZG library accepts Blob containing an owned array. It would be nice if it accepts refs like the peerdas KZG lib, so it doesn't require making a copy of the bytes (which will likely be unfeasible when we increase the blob count)

Version

5.2.1+ (current unstable branch)

Metadata

Metadata

Assignees

No one assigned

    Labels

    cryptoAn issue/PR that touches cryptography code.macosRelated to macOS or Apple SiliconoptimizationSomething to make Lighthouse run more efficiently.test improvementImprove tests

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions