Kamon icon indicating copy to clipboard operation
Kamon copied to clipboard

NullPointerException in kamon-akka when no supervisorStrategy defined

Open cheekychops opened this issue 11 years ago • 3 comments

The following exception can be thrown when no supervisorStrategy is declared in an Actor:

java.lang.NullPointerException: null at akka.actor.dungeon.FaultHandling$class.handleChildTerminated(FaultHandling.scala:279) ~[akka-actor_2.11-2.3.12.jar:na] at akka.actor.ActorCell.handleChildTerminated(ActorCell.scala:369) ~[akka-actor_2.11-2.3.12.jar:na] at akka.actor.dungeon.DeathWatch$class.watchedActorTerminated(DeathWatch.scala:63) ~[akka-actor_2.11-2.3.12.jar:na] at akka.actor.ActorCell.watchedActorTerminated(ActorCell.scala:369) ~[akka-actor_2.11-2.3.12.jar:na] at akka.actor.ActorCell.invokeAll$1_aroundBody2(ActorCell.scala:455) ~[akka-actor_2.11-2.3.12.jar:na] at akka.actor.ActorCell$AjcClosure3.run(ActorCell.scala:1) ~[akka-actor_2.11-2.3.12.jar:na] at org.aspectj.runtime.reflect.JoinPointImpl.proceed(JoinPointImpl.java:149) ~[aspectjweaver-1.8.4.jar:1.8.4] at akka.kamon.instrumentation.ActorSystemMessageInstrumentation$$anonfun$aroundSystemMessageInvoke$1.apply(ActorSystemMessageInstrumentation.scala:34) ~[kamon-akka_2.11-0.5.1.jar:0.5.1] at kamon.trace.Tracer$.withContext(TracerModule.scala:53) ~[kamon-core_2.11-0.5.1.jar:0.5.1] at akka.kamon.instrumentation.ActorSystemMessageInstrumentation.aroundSystemMessageInvoke(ActorSystemMessageInstrumentation.scala:34) ~[kamon-akka_2.11-0.5.1.jar:0.5.1] at akka.actor.ActorCell.invokeAll$1(ActorCell.scala:1) ~[akka-actor_2.11-2.3.12.jar:na] at akka.actor.ActorCell.systemInvoke(ActorCell.scala:478) ~[akka-actor_2.11-2.3.12.jar:na] at akka.dispatch.Mailbox.processAllSystemMessages(Mailbox.scala:263) ~[akka-actor_2.11-2.3.12.jar:na] at akka.dispatch.Mailbox.run(Mailbox.scala:219) ~[akka-actor_2.11-2.3.12.jar:na] at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:397) ~[akka-actor_2.11-2.3.12.jar:na] at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260) ~[scala-library-2.11.7.jar:na] at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339) ~[scala-library-2.11.7.jar:na] at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979) ~[scala-library-2.11.7.jar:na] at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107) ~[scala-library-2.11.7.jar:na]

adding this line to the Actor is a workaround: override val supervisorStrategy = SupervisorStrategy.defaultStrategy

This problem was found on kamon 0.5.1 with scala 2.11.7 and akka 2.3.12

cheekychops avatar Sep 07 '15 14:09 cheekychops

and, what was the actor doing when this happened? do you know of any way to reproduce the issue?

ivantopo avatar Sep 07 '15 14:09 ivantopo

The exception seems to be logged each time one of the Actor's children stops

cheekychops avatar Sep 07 '15 14:09 cheekychops

Apologies, this turned out to be a local build issue, the problem went away after a full rebuild.

cheekychops avatar Sep 08 '15 07:09 cheekychops