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

Randomly ConcurrentModificationException #2540

Closed
jilen opened this issue May 22, 2023 · 1 comment · Fixed by #2542
Closed

Randomly ConcurrentModificationException #2540

jilen opened this issue May 22, 2023 · 1 comment · Fixed by #2542
Milestone

Comments

@jilen
Copy link
Contributor

jilen commented May 22, 2023

Version : 0.11.0-M9
Sometimes ConcurrentModificationException will be thrown while runing mill -j N __.compile

Exception in thread "main" java.lang.reflect.InvocationTargetException
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:119)
	at java.base/java.lang.reflect.Method.invoke(Method.java:578)
	at mill.main.client.IsolatedMillMainLoader.runMain(IsolatedMillMainLoader.java:58)
	at mill.main.client.MillClientMain.main(MillClientMain.java:64)
Caused by: java.util.ConcurrentModificationException: mutation occurred during iteration
	at scala.collection.mutable.MutationTracker$.checkMutations(MutationTracker.scala:43)
	at scala.collection.mutable.CheckedIndexedSeqView$CheckedIterator.hasNext(CheckedIndexedSeqView.scala:47)
	at scala.collection.immutable.List.prependedAll(List.scala:155)
	at scala.collection.immutable.List$.from(List.scala:684)
	at scala.collection.immutable.List$.from(List.scala:681)
	at scala.collection.SeqFactory$Delegate.from(Factory.scala:306)
	at scala.collection.immutable.Seq$.from(Seq.scala:42)
	at scala.collection.IterableOnceOps.toSeq(IterableOnce.scala:1300)
	at scala.collection.IterableOnceOps.toSeq$(IterableOnce.scala:1300)
	at scala.collection.AbstractIterable.toSeq(Iterable.scala:933)
	at mill.eval.EvaluatorImpl.evaluate0(EvaluatorImpl.scala:170)
	at mill.eval.EvaluatorImpl.$anonfun$evaluate$1(EvaluatorImpl.scala:78)
	at scala.util.DynamicVariable.withValue(DynamicVariable.scala:59)
	at mill.eval.EvaluatorImpl.evaluate(EvaluatorImpl.scala:69)
	at mill.main.RunScript$.evaluateNamed(RunScript.scala:39)
	at mill.main.RunScript$.$anonfun$evaluateTasksNamed$2(RunScript.scala:27)
	at scala.util.Either.map(Either.scala:382)
	at mill.main.RunScript$.evaluateTasksNamed(RunScript.scala:26)
	at mill.runner.MillBuildBootstrap$.evaluateWithWatches(MillBuildBootstrap.scala:325)
	at mill.runner.MillBuildBootstrap.processFinalTargets(MillBuildBootstrap.scala:246)
	at mill.runner.MillBuildBootstrap.evaluateRec(MillBuildBootstrap.scala:144)
	at mill.runner.MillBuildBootstrap.evaluate(MillBuildBootstrap.scala:44)
	at mill.runner.MillMain$.$anonfun$main0$5(MillMain.scala:222)
	at mill.runner.Watching$.watchLoop(Watching.scala:27)
	at mill.runner.MillMain$.$anonfun$main0$1(MillMain.scala:210)
	at scala.util.DynamicVariable.withValue(DynamicVariable.scala:59)
	at scala.Console$.withErr(Console.scala:193)
	at mill.api.SystemStreams$.$anonfun$withStreams$2(SystemStreams.scala:56)
	at scala.util.DynamicVariable.withValue(DynamicVariable.scala:59)
	at scala.Console$.withOut(Console.scala:164)
	at mill.api.SystemStreams$.$anonfun$withStreams$1(SystemStreams.scala:55)
	at scala.util.DynamicVariable.withValue(DynamicVariable.scala:59)
	at scala.Console$.withIn(Console.scala:227)
	at mill.api.SystemStreams$.withStreams(SystemStreams.scala:54)
	at mill.runner.MillMain$.main0(MillMain.scala:80)
	at mill.runner.MillMain$.main(MillMain.scala:58)
	at mill.runner.MillMain.main(MillMain.scala)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
@lefou
Copy link
Member

lefou commented May 22, 2023

@jilen Thank you for testing Mill milestones and reporting issues!

lihaoyi added a commit that referenced this issue May 24, 2023
1. `Terminal` goes in its own file
2. Split out `EvaluatorCore` (which contains only evaluation-related
stuff) from `EvaluatorImpl` (which contains some user-facing helpers)
3. Split out `GroupEvaluator` from `EvaluatorCore`
4. Split out `Plan`, `ThreadNumberer`, `JsonArrayLogger`
5. Unify implementation of `mill-profile.json` and
`mill-par-profile.json` (renamed `mill-chrome-profile.json`), so they
both perform streaming as-evaluation-progresses logging in a thread-safe
manner (should fix #2540)
6. Add `dependencies` to `mill-profile.json`, making it more useful
since you can now trace up and down the build graph without having to
run `mill inspect` (which would wipe out the `mill-profile.json` you
were just looking at!)
@lefou lefou added this to the 0.11.0-M10 milestone May 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants