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

failed: SupervisorSpec #32128

Closed
patriknw opened this issue Sep 22, 2023 · 4 comments
Closed

failed: SupervisorSpec #32128

patriknw opened this issue Sep 22, 2023 · 4 comments
Labels
failed Tickets that indicate a CI failure, likely a flakey test
Milestone

Comments

@patriknw
Copy link
Member

Strange, this is not looking good

https://github.com/akka/akka/actions/runs/6273505512/job/17037092542?pr=32127#step:5:1771

Uncaught error from thread [SupervisorSpec-akka.actor.default-dispatcher-6]: Update to non-static final field akka.actor.SupervisorSpec$$anon$1.context attempted from a different method (akka$actor$Actor$_setter_$context_$eq) than the initializer method <init> , shutting down JVM since 'akka.jvm-exit-on-fatal-error' is enabled for ActorSystem[SupervisorSpec]
java.lang.IllegalAccessError: Update to non-static final field akka.actor.SupervisorSpec$$anon$1.context attempted from a different method (akka$actor$Actor$_setter_$context_$eq) than the initializer method <init> 
	at akka.actor.SupervisorSpec$$anon$1.akka$actor$Actor$_setter_$context_$eq(SupervisorSpec.scala:222)
	at akka.actor.Actor.$init$(Actor.scala:495)
	at akka.actor.SupervisorSpec$$anon$1.<init>(SupervisorSpec.scala:222)
	at akka.actor.SupervisorSpec.childInstance$lzycompute$1(SupervisorSpec.scala:222)
	at akka.actor.SupervisorSpec.akka$actor$SupervisorSpec$$childInstance$1(SupervisorSpec.scala:222)
	at akka.actor.SupervisorSpec$$anon$2.$anonfun$child$1(SupervisorSpec.scala:242)
	at akka.actor.TypedCreatorFunctionConsumer.produce(IndirectActorProducer.scala:90)
	at akka.actor.Props.newActor(Props.scala:226)
	at akka.actor.ActorCell.newActor(ActorCell.scala:615)
	at akka.actor.ActorCell.create(ActorCell.scala:642)
	at akka.actor.ActorCell.invokeAll$1(ActorCell.scala:513)
	at akka.actor.ActorCell.systemInvoke(ActorCell.scala:535)
	at akka.dispatch.Mailbox.processAllSystemMessages(Mailbox.scala:295)
	at akka.dispatch.Mailbox.run(Mailbox.scala:230)
	at akka.dispatch.Mailbox.exec(Mailbox.scala:243)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
Error:  [SECURITY][09/22/2023 11:18:20.658] [SupervisorSpec-akka.actor.default-dispatcher-6] [akka.actor.ActorSystemImpl(SupervisorSpec)] Uncaught error from thread [SupervisorSpec-akka.actor.default-dispatcher-6]: Update to non-static final field akka.actor.SupervisorSpec$$anon$1.context attempted from a different method (akka$actor$Actor$_setter_$context_$eq) than the initializer method <init> , shutting down JVM since 'akka.jvm-exit-on-fatal-error' is enabled for ActorSystem[SupervisorSpec]
	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
java.lang.IllegalAccessError: Update to non-static final field akka.actor.SupervisorSpec$$anon$1.context attempted from a different method (akka$actor$Actor$_setter_$context_$eq) than the initializer method <init> 
	at akka.actor.SupervisorSpec$$anon$1.akka$actor$Actor$_setter_$context_$eq(SupervisorSpec.scala:222)
	at akka.actor.Actor.$init$(Actor.scala:495)
	at akka.actor.SupervisorSpec$$anon$1.<init>(SupervisorSpec.scala:222)
	at akka.actor.SupervisorSpec.childInstance$lzycompute$1(SupervisorSpec.scala:222)
	at akka.actor.SupervisorSpec.akka$actor$SupervisorSpec$$childInstance$1(SupervisorSpec.scala:222)
	at akka.actor.SupervisorSpec$$anon$2.$anonfun$child$1(SupervisorSpec.scala:242)
	at akka.actor.TypedCreatorFunctionConsumer.produce(IndirectActorProducer.scala:90)
	at akka.actor.Props.newActor(Props.scala:226)
	at akka.actor.ActorCell.newActor(ActorCell.scala:615)
	at akka.actor.ActorCell.create(ActorCell.scala:642)
	at akka.actor.ActorCell.invokeAll$1(ActorCell.scala:513)
	at akka.actor.ActorCell.systemInvoke(ActorCell.scala:535)
	at akka.dispatch.Mailbox.processAllSystemMessages(Mailbox.scala:295)
	at akka.dispatch.Mailbox.run(Mailbox.scala:230)
	at akka.dispatch.Mailbox.exec(Mailbox.scala:243)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
@patriknw patriknw added the failed Tickets that indicate a CI failure, likely a flakey test label Sep 22, 2023
@patriknw
Copy link
Member Author

ok, so it has to do with the jdk 11 target

@pvlugter
Copy link
Contributor

It's this Scala issue: scala/scala-dev#408. Follow-up for anonymous class covered by scala/bug#12340. In this case it's anonymous and lazy val. Could work around for now by not using anonymous child actor class:

class Child extends Actor {
  ...
}
lazy val childInstance = new Child

@pvlugter
Copy link
Contributor

Reported as Scala bug: scala/bug#12881

@patriknw
Copy link
Member Author

thanks

patriknw added a commit that referenced this issue Sep 27, 2023
patriknw added a commit that referenced this issue Sep 27, 2023
* remove java 8 home and other complicated things from the build
* move src from java-jdk9-only, scala-jdk-9, java-jdk-9
* compiler warnings
* migration guide
* fail fast if not JDK 11 or higher
* not anonymous actor class, #32128
@patriknw patriknw added this to the 2.9.0-M2 milestone Sep 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
failed Tickets that indicate a CI failure, likely a flakey test
Projects
None yet
Development

No branches or pull requests

2 participants