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

Error: Dafny encountered an internal error while waiting for this symbol to verify. #5295

Closed
benreynwar opened this issue Apr 3, 2024 · 3 comments · Fixed by #5320
Closed
Labels
during 1: program development Bad error message or documentation; IDE bug; crash compiling invalid program kind: bug Crashes, unsoundness, incorrect output, etc. If possible, add a `part:` label part: boogie Happens after passing the program to Boogie

Comments

@benreynwar
Copy link

benreynwar commented Apr 3, 2024

Dafny version

4.6.0

Code to produce this issue

I'm hitting in a reproducible error in a github action for my project.
I'm pretty new to dafny so I expect the real cause is that I'm doing something silly, but presumably it shouldn't be giving this error despite that.
Sorry for not creating a minimal example to show what the problem is. Feel free to ignore this issue. I'm mostly just submitting the issue because the error message told me too :).

https://github.com/benreynwar/SiLemma/actions/runs/8546419158/job/23416730258

The error message is:

Utils/SetExt.dfy(27,39):
Utils/SetExt.dfy(27,39): Error: Dafny encountered an internal error while waiting for this symbol to verify. Please report it at <https://github.com/dafny-lang/dafny/issues>.
 
   |
27 |     lemma {:vcs_split_on_every_assert} ThereIsAMinimum<T(!new)>(s: set<T>, R: (T, T)->bool)
   |                                        ^^^^^^^^^^^^^^^
Dafny program verifier finished with 105 verified, 0 errors
: Dafny encountered an internal error while waiting for this symbol to verify. Please report it at <https://github.com/dafny-lang/dafny/issues>.
 
   |
27 |     lemma {:vcs_split_on_every_assert} ThereIsAMinimum<T(!new)>(s: set<T>, R: (T, T)->bool)
   |                                        ^^^^^^^^^^^^^^^
Dafny program verifier finished with 105 verified, 0 errors

Command to run and resulting output

https://github.com/benreynwar/SiLemma/actions/runs/8546419158/job/23416730258

What happened?

Utils/SetExt.dfy(27,39): Error: Dafny encountered an internal error while waiting for this symbol to verify. Please report it at <https://github.com/dafny-lang/dafny/issues>.
 
   |
27 |     lemma {:vcs_split_on_every_assert} ThereIsAMinimum<T(!new)>(s: set<T>, R: (T, T)->bool)
   |                                        ^^^^^^^^^^^^^^^
Dafny program verifier finished with 105 verified, 0 errors

What type of operating system are you experiencing the problem on?

Linux

@benreynwar benreynwar added the kind: bug Crashes, unsoundness, incorrect output, etc. If possible, add a `part:` label label Apr 3, 2024
@benreynwar
Copy link
Author

Also this bug appeared after I added --verification-time-limit=30 to the command line arguments for dafny verify so it may be related to that. The verification for the previous commit was taking a long time so I cancelled a job. After adding this argument the job quickly failed with the internal error shown above.

@keyboardDrummer
Copy link
Member

keyboardDrummer commented Apr 4, 2024

Thanks for reporting. This is useful.

For the Dafny maintainer, a program such as:

lemma f() {
    var a:int := 0x0000_0010_DEAD_BEEF;
    var testbv:bv64 := a as bv64;
    var testval:int := testbv as int;

    assert testval == a; // "Timed out on: assertion violation"
}

Currently causes the Boogie verification to hang, ignoring any specified time out, and then the Dafny front-end detects the hang and reports the internal error.

We should fix the Boogie handling of the time out.

@keyboardDrummer keyboardDrummer added part: boogie Happens after passing the program to Boogie during 1: program development Bad error message or documentation; IDE bug; crash compiling invalid program labels Apr 4, 2024
@kjx
Copy link

kjx commented Apr 14, 2024

For what it's worth, I've had the same problem or at least seen the same symptoms.
I had fantasies of finishing something this week so don't really have time to minimise my example, /
but it is here - #5209

If it helps, I can confirm absolutely that I do not see this but at all in version 4.4.0+598c2c3ec6bf5c78a3c5c4f30b570f23cca417a9

keyboardDrummer added a commit that referenced this issue Apr 16, 2024
Fixes #5209
Fixes #5295

### Description
- When mentioning an internal error due to verification timing out,
throw an exception, so no successful verification message is emitted.
- Wait longer before concluding the Boogie back-end is ignoring the
verification timeout.
- Update MultiBackendTest so it allows overriding default options.

### How has this been tested?
Manually made code edits to simulate Boogie not returning, resulting in:

```
Exit code is 134 (Unhandled exception. System.Exception: Dafny encountered an internal error while waiting for C._ctor to verify.
   at DafnyDriver.Commands.CliCompilation.VerifyAllLazily(Nullable`1 randomSeed)+MoveNext() in /Users/rwillems/SourceCode/dafny/Source/DafnyDriver/CliCompilation.cs:line 253
   at DafnyDriver.Commands.CliCompilation.VerifyAllLazily(Nullable`1 randomSeed)+System.Threading.Tasks.Sources.IValueTaskSource<System.Boolean>.GetResult()
   at System.Linq.AsyncEnumerable.ToObservableObservable`1.<>c__DisplayClass2_0.<<Subscribe>g__Core|0>d.MoveNext() in /_/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ToObservable.cs:line 50
```

<small>By submitting this pull request, I confirm that my contribution
is made under the terms of the [MIT
license](https://github.com/dafny-lang/dafny/blob/master/LICENSE.txt).</small>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
during 1: program development Bad error message or documentation; IDE bug; crash compiling invalid program kind: bug Crashes, unsoundness, incorrect output, etc. If possible, add a `part:` label part: boogie Happens after passing the program to Boogie
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants