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

[2.x] ConcurrentModificationException in SbtParser #7873

Open
xuwei-k opened this issue Nov 6, 2024 · 2 comments · May be fixed by scala/scala3#22180
Open

[2.x] ConcurrentModificationException in SbtParser #7873

xuwei-k opened this issue Nov 6, 2024 · 2 comments · May be fixed by scala/scala3#22180
Labels
Milestone

Comments

@xuwei-k
Copy link
Member

xuwei-k commented Nov 6, 2024

steps

sbt 2.0.0-M2

flaky some sbt plugin scripted test

problem

https://github.com/wartremover/wartremover-contrib/actions/runs/11697441192/job/32576176336#step:5:812

Error:  Exception in thread "sbt-parser-init-thread" java.lang.ExceptionInInitializerError
Error:  	at sbt.internal.parser.SbtParserInit$$anon$1.run(SbtParser.scala:179)
Error:  Caused by: java.util.ConcurrentModificationException
Error:  	at java.util.Hashtable$Enumerator.next(Hashtable.java:1408)
Error:  	at scala.collection.convert.JavaCollectionWrappers$JPropertiesWrapper$$anon$6.next(JavaCollectionWrappers.scala:622)
Error:  	at scala.collection.convert.JavaCollectionWrappers$JPropertiesWrapper$$anon$6.next(JavaCollectionWrappers.scala:618)
Error:  	at scala.collection.IterableOnceOps.find(IterableOnce.scala:634)
Error:  	at scala.collection.IterableOnceOps.find$(IterableOnce.scala:631)
Error:  	at scala.collection.AbstractIterator.find(Iterator.scala:1300)
Error:  	at dotty.tools.dotc.config.PathResolver$Environment$.searchForBootClasspath(PathResolver.scala:40)
Error:  	at dotty.tools.dotc.config.PathResolver$Environment$.javaBootClassPath(PathResolver.scala:49)
Error:  	at dotty.tools.dotc.config.PathResolver$Defaults$.javaBootClassPath(PathResolver.scala:75)
Error:  	at dotty.tools.dotc.config.CommonScalaSettings.$init$(ScalaSettings.scala:97)
Error:  	at dotty.tools.dotc.config.ScalaSettings.<init>(ScalaSettings.scala:15)
Error:  	at dotty.tools.dotc.core.Contexts$ContextBase.<init>(Contexts.scala:857)
Error:  	at dotty.tools.dotc.Driver.initCtx(Driver.scala:61)
Error:  	at sbt.internal.parser.SbtParser$ParseDriver.<init>(SbtParser.scala:138)
Error:  	at sbt.internal.parser.SbtParser$.<clinit>(SbtParser.scala:135)

expectation

notes

Maybe not thread safe 🤔

https://github.com/sbt/sbt/blob/v2.0.0-M2/buildfile/src/main/scala/sbt/internal/parser/SbtParser.scala#L138

@xuwei-k xuwei-k added the Bug label Nov 6, 2024
@jtjeferreira
Copy link
Contributor

I also faced this issue, when working on sbt/sbt-native-packager#1647 / eed3si9n/sbt-native-packager#1 . Rerunning the job "fixed" it.

I no longer can find the link to the github action log...

@eed3si9n
Copy link
Member

Here's a PR for this - #7938

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