roc icon indicating copy to clipboard operation
roc copied to clipboard

test failure: `glue_cli_run::advanced_recursive_union` `bad status`

Open Anton-4 opened this issue 3 years ago • 6 comments

I encountered the following failure on main inside nix:

running 13 tests
test glue_cli_run::all_fixtures_have_tests ... ok
test glue_cli_run::basic_recursive_union ... ok
test glue_cli_run::nested_record ... ok
test glue_cli_run::basic_record ... ok
test glue_cli_run::single_tag_union ... ok
test glue_cli_run::enumeration ... ok
test glue_cli_run::union_without_padding ... ok
test glue_cli_run::nullable_unwrapped ... ok
test glue_cli_run::nonnullable_unwrapped ... ok
test glue_cli_run::nullable_wrapped ... ok
test glue_cli_run::union_with_padding ... ok
test glue_cli_run::list_recursive_union ... ok
test glue_cli_run::advanced_recursive_union ... FAILED

failures:

---- glue_cli_run::advanced_recursive_union stdout ----
thread 'glue_cli_run::advanced_recursive_union' panicked at 'bad status Out { stdout: "🔨 Rebuilding host...\nrbt was: Rbt { default: Job::Job(R1 { command: Command::Command(R2 { tool: Tool::SystemTool(R4 { name: \"test\", num: 42 }) }), inputFiles: [\"foo\"] }) }\n", stderr: "", status: ExitStatus(unix_wait_status(139)) }', crates/glue/tests/test_glue_cli.rs:222:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace


failures:
    glue_cli_run::advanced_recursive_union

test result: FAILED. 12 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 6.48s

To reproduce:

nix develop
cargo test --release --locked

tagging @rtfeldman

~~The reason this error slipped by CI is likely that we do not use a merge queue yet. I hope to set this up soon.~~ EDIT This error does not happen on CI. btw unix_wait_status(139) is a segmentation fault.

Anton-4 avatar Aug 15 '22 10:08 Anton-4

I'm bisecting to get a specific commit.

Anton-4 avatar Aug 15 '22 12:08 Anton-4

bisected to 1ad59c6c459d44b6a33834b42a9be6457eed12fb "Replace usages of ManuallyDrop::take with ::into_inner"

Anton-4 avatar Aug 15 '22 13:08 Anton-4

Interesting! I'll take a look. Thanks for tracking it down!

rtfeldman avatar Aug 15 '22 16:08 rtfeldman

In the case that you can not reproduce it, can you let me know where I can find the binary that test produces? It's possible that it is similar to what we have going on in #3769.

Anton-4 avatar Aug 15 '22 16:08 Anton-4

Yeah I can't reproduce it on M1 Mac inside nix develop 🤔

You should be able to reproduce it outside the test environment with:

cargo run -- glue crates/glue/tests/fixtures/advanced-recursive-union/platform.roc crates/glue/tests/fixtures/advanced-recursive-union/src/test_glue.rs
cargo run -- build crates/glue/tests/fixtures/advanced-recursive-union/app.roc

This will generate an executable binary at crates/glue/tests/fixtures/advanced-recursive-union/app

rtfeldman avatar Aug 15 '22 19:08 rtfeldman

Thanks, I'll take a look when I can.

Anton-4 avatar Aug 16 '22 09:08 Anton-4

I'm hitting this on main in my Fedora 36 + Nix environment:

failures:

---- glue_cli_run::advanced_recursive_union stdout ----
thread 'glue_cli_run::advanced_recursive_union' panicked at 'bad status Out { stdout: "🔨 Rebuilding host...\nrbt was: Rbt { default: Job::Job(R1 { command: Command::Command(R2 { tool: Tool::SystemTool(R4 { name: \"test\", num: 42 }) }), inputFiles: [\"foo\"] }) }\n", stderr: "", status: ExitStatus(unix_wait_status(139)) }', crates/glue/tests/test_glue_cli.rs:228:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace


failures:
    glue_cli_run::advanced_recursive_union

test result: FAILED. 14 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 11.56s

error: test failed, to rerun pass '-p roc_glue --test test_glue_cli'

kili-ilo avatar Sep 01 '22 09:09 kili-ilo

This no longer occurs on my NixOS machine and fedora VM.

Anton-4 avatar Sep 21 '22 14:09 Anton-4

Yes, same here!

kili-ilo avatar Sep 25 '22 07:09 kili-ilo