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

App crashes on nargo test --show-output #1982

Closed
harshnambiar opened this issue Jul 20, 2023 · 8 comments
Closed

App crashes on nargo test --show-output #1982

harshnambiar opened this issue Jul 20, 2023 · 8 comments
Assignees
Labels
bug Something isn't working

Comments

@harshnambiar
Copy link

Aim

I tried to run the tests on the phy_vector folder in this repository. But it crashes.

Expected Behavior

The crash should not happen

Bug

The generic "app crashed, this is a bug and might have been resolved in a later release" error message shows up

To Reproduce

  1. Clone above repository
  2. cd phy_vector
  3. nano main.nr
  4. Add these two lines at lines 46 and 47:
    let mm = vsum.j.num;
    std::println(mm);
  5. nargo test --show-output

Installation Method

Binary

Nargo Version

0.7.1

Additional Context

No response

Would you like to submit a PR for this Issue?

No

Support Needs

No response

@harshnambiar harshnambiar added the bug Something isn't working label Jul 20, 2023
@github-project-automation github-project-automation bot moved this to 📋 Backlog in Noir Jul 20, 2023
@ghost
Copy link

ghost commented Jul 20, 2023

log:

Running 4 test functions...
Testing test_sum_vector...
0x1e
ok
Testing test_vector_product_vector...
The application panicked (crashed).
Message:  assertion failed: `(left != right)`
  left: `NodeId(Index { index: 408, generation: 0 })`,
 right: `NodeId(Index { index: 408, generation: 0 })`
Location: crates/noirc_evaluator/src/ssa/optimizations.rs:303

This is a bug. We may have already fixed this in newer versions of Nargo so try searching for similar issues at https://github.com/noir-lang/noir/issues/.
If there isn't an open issue for this bug, consider opening one at https://github.com/noir-lang/noir/issues/new?labels=bug&template=bug_report.yml

@jfecher
Copy link
Contributor

jfecher commented Jul 20, 2023

Looks like this is fixed on master. I can't replicate it with the current SSA or --experimental-ssa flags. Can you confirm this @f01dab1e or @harshnambiar?

@ghost
Copy link

ghost commented Jul 20, 2023

Not always encountering the error (https://gist.github.com/f01dab1e/c05a8b78702a3af452593f71c8756f43), but with the --experimental-ssa flag, it appears the panic is avoided.

@jfecher
Copy link
Contributor

jfecher commented Jul 20, 2023

Unfortunate. I suppose whatever is making these tests nondeterministic in #1986 is also causing this to only sometimes crash.

@jfecher
Copy link
Contributor

jfecher commented Jul 20, 2023

Alright, I had to run it 10 times but I did replicate the panic

@jfecher
Copy link
Contributor

jfecher commented Jul 20, 2023

If the panic doesn't occur with --experimental-ssa, then I'm closing this issue since we'll be making that the default soon anyway, and the old ssa code will be removed. Until then we're not making any changes to the old ssa code.

@jfecher jfecher closed this as completed Jul 20, 2023
@github-project-automation github-project-automation bot moved this from 📋 Backlog to ✅ Done in Noir Jul 20, 2023
@jfecher
Copy link
Contributor

jfecher commented Jul 20, 2023

Reopening this issue. Since the fix for this relies on using --experimental-ssa I think it is better to leave this issue open until the experimental SSA is enabled by default in Noir. I'll link it to the tracking issue for experimental ssa and we can close both when it is merged.

@jfecher
Copy link
Contributor

jfecher commented Jul 26, 2023

The experimental-ssa is now the default as of 0.9.0, so this is fixed 😄

@jfecher jfecher closed this as completed Jul 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

No branches or pull requests

4 participants