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

[WINDOWS]: ndc-test crashes with stack overflow #81

Open
BenoitRanque opened this issue Jan 10, 2024 · 0 comments
Open

[WINDOWS]: ndc-test crashes with stack overflow #81

BenoitRanque opened this issue Jan 10, 2024 · 0 comments

Comments

@BenoitRanque
Copy link
Collaborator

Running ndc-test on windows crashes with a stack overflow.

Command:

cargo run --bin ndc-test -- test --endpoint http://localhost:8100 --snapshots-dir ../ndc-sdk-typescript/test-snapshots

Output:

├ Capabilities ...
│ ├ Fetching /capabilities ... OK
│ ├ Validating capabilities ... FAIL
├ Schema ...
│ ├ Fetching schema ... OK
│ ├ Validating schema ...
│ │ ├ object_types ... OK
│ │ ├ Collections ...
│ │ │ ├ articles ...
│ │ │ │ ├ Arguments ... OK
│ │ │ │ ├ Collection type ... OK
│ │ │ ├ authors ...
│ │ │ │ ├ Arguments ... OK
│ │ │ │ ├ Collection type ... OK
│ │ │ ├ articles_by_author ...
│ │ │ │ ├ Arguments ... OK
│ │ │ │ ├ Collection type ... OK
│ │ ├ Functions ...
│ │ │ ├ latest_article_id ...
│ │ │ │ ├ Result type ... OK
│ │ │ │ ├ Arguments ... OK
│ │ │ ├ Procedures ...
│ │ │ │ ├ upsert_article ...
│ │ │ │ │ ├ Result type ... OK
│ │ │ │ │ ├ Arguments ... OK
├ Query ...
│ ├ articles ...
│ │ ├ Simple queries ...

thread 'main' has overflowed its stack
error: process didn't exit successfully: `target\debug\ndc-test.exe test --endpoint http://localhost:8100 --snapshots-dir ../ndc-sdk-typescript/test-snapshots` (exit code: 0xc00000fd, STATUS_STACK_OVERFLOW)

This issue does not occur if tokio is forced to run in a single thread by annotating main with:

#[tokio::main(flavor = "current_thread")]
async fn main() {

Would not be surprised if this is an issue with some upstream library. Regardless, documenting the workaround here.
This is something we should test for if/when we package ndc-test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant