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

[internal error] Parser exception: Collection was modified; enumeration operation may not execute #5292

Open
keyboardDrummer opened this issue Apr 3, 2024 · 3 comments
Assignees
Labels
kind: language development speed Slows down development of Dafny the language, flaky tests priority: next Will consider working on this after in progress work is done

Comments

@keyboardDrummer
Copy link
Member

https://github.com/dafny-lang/dafny/actions/runs/8520037939/job/23335354897?pr=5284

There was a concurrent collection modification exception, but sadly only part of the exception is shown in the log:

[xUnit.net 00:03:27.83]         --- End of stack trace from previous location ---
  Failed Microsoft.Dafny.LanguageServer.IntegrationTest.Various.ConcurrentInteractionsTest.VerificationErrorDetectedAfterCanceledSave [188 ms]
  Error Message:
   Assert.Equal() Failure
          ↓ (pos 0)
Expected: assertion might not hold
Actual:   [internal error] Parser exception: Collec···
          ↑ (pos 0)
  Stack Trace:
@keyboardDrummer keyboardDrummer added the kind: language development speed Slows down development of Dafny the language, flaky tests label Apr 3, 2024
@keyboardDrummer keyboardDrummer added the priority: next Will consider working on this after in progress work is done label Apr 29, 2024
@keyboardDrummer keyboardDrummer self-assigned this Apr 29, 2024
@keyboardDrummer
Copy link
Member Author

More logging PR, to show the entire stacktrace: #5387

@keyboardDrummer
Copy link
Member Author

@keyboardDrummer keyboardDrummer changed the title Unstable VerificationErrorDetectedAfterCanceledSave [internal error] Parser exception: Collection was modified; enumeration operation may not execute Aug 16, 2024
@keyboardDrummer
Copy link
Member Author

Now we have the stacktrace, so maybe we can fix it:

   at System.Collections.Generic.Dictionary`2.Enumerator.MoveNext()
   at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer)
   at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector)
   at Microsoft.Dafny.DafnyOptions..ctor(DafnyOptions src, Boolean useNullWriters) in /Users/runner/work/dafny/dafny/dafny/Source/DafnyCore/DafnyOptions.cs:line 447
   at Microsoft.Dafny.Parser..ctor(DafnyOptions options, Scanner scanner, Errors errors, CancellationToken cancellationToken) in /Users/runner/work/dafny/dafny/dafny/Source/DafnyCore/AST/Grammar/ParserNonGeneratedPart.cs:line 24
   at Microsoft.Dafny.ProgramParser.SetupParser(String s, Uri uri, ErrorReporter errorReporter, CancellationToken cancellationToken) in /Users/runner/work/dafny/dafny/dafny/Source/DafnyCore/AST/Grammar/ProgramParser.cs:line 307
   at Microsoft.Dafny.ProgramParser.ParseFile(DafnyOptions options, String content, Uri uri, CancellationToken cancellationToken) in /Users/runner/work/dafny/dafny/dafny/Source/DafnyCore/AST/Grammar/ProgramParser.cs:line 281
   at Microsoft.Dafny.ProgramParser.ParseFile(DafnyOptions options, Func`1 getReader, Uri uri, CancellationToken cancellationToken) in /Users/runner/work/dafny/dafny/dafny/Source/DafnyCore/AST/Grammar/ProgramParser.cs:line 270
   at Microsoft.Dafny.LanguageServer.Language.CachingParser.ParseFile(DafnyOptions options, Func`1 getReader, Uri uri, CancellationToken cancellationToken) in /Users/runner/work/dafny/dafny/dafny/Source/DafnyLanguageServer/Language/CachingParser.cs:line 42
   at Microsoft.Dafny.ProgramParser.ParseFileWithErrorHandling(DafnyOptions options, Func`1 getContent, IToken origin, Uri uri, CancellationToken cancellationToken) in /Users/runner/work/dafny/dafny/dafny/Source/DafnyCore/AST/Grammar/ProgramParser.cs:line 115
  Stack Trace:
     at XunitAssertMessages.AssertM.WithMessage(String message, Action action)
   at XunitAssertMessages.AssertM.Equal(String expected, String actual, String userMessage)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: language development speed Slows down development of Dafny the language, flaky tests priority: next Will consider working on this after in progress work is done
Projects
None yet
Development

No branches or pull requests

1 participant