No description
Thank you, Jenkins and CallingThreadDispatcher, for without you both I would probably not have found this bug before the milestone release. So, what happened? Well, ActorModelSpec for the CallingThreadDispatcher tries to have an actor kill itself twice with InterruptedException (of all things!) and wants to verify that everything still works. Given the right timing (which was rare) the semantics of the CallingThreadDispatcher would mean that the actor would suspend itself (first failure), inform its supervisor (“/user”, not on CTD) and return to the spec. If the supervisor was too slow to finish the restart which includes a resume which will process all messages enqueued meanwhile from the test BEFORE the test enqueued the second failure, the failure would actually happen on the supervisor’s thread. Now InterruptedException is the ONLY exception which always gets passed up, and thus it is the only Exception which can ever occur genuinely within a top-level supervisor which will trigger its restart: if it’s an unhandled one, the actor system will stop, and if it’s a handled one from a child there will be no problem. So, having these very special circumstances combined just so, the “guardian” would restart, and after today’s changes that meant killing all its children. Boom. The fix is of course trivial, as always. And the bug is extremely obvious, once found. Cost me five hours. |
||
|---|---|---|
| akka-actor/src/main | ||
| akka-actor-tests/src | ||
| akka-camel/src | ||
| akka-camel-typed/src | ||
| akka-cluster/src | ||
| akka-docs | ||
| akka-durable-mailboxes | ||
| akka-kernel/src/main | ||
| akka-remote/src | ||
| akka-samples | ||
| akka-sbt-plugin/src/main/scala | ||
| akka-slf4j/src/main/scala/akka/event/slf4j | ||
| akka-spring/src | ||
| akka-stm/src | ||
| akka-testkit/src | ||
| akka-tutorials/akka-tutorial-first | ||
| config | ||
| project | ||
| scripts | ||
| src/main/ls | ||
| .gitignore | ||
| build.sbt | ||
| LICENSE | ||
| README.textile | ||
h1. Akka We believe that writing correct concurrent, fault-tolerant and scalable applications is too hard. Most of the time it's because we are using the wrong tools and the wrong level of abstraction. Akka is here to change that. Using the Actor Model together with Software Transactional Memory we raise the abstraction level and provide a better platform to build correct concurrent and scalable applications. For fault-tolerance we adopt the "Let it crash":http://letitcrash.com model which have been used with great success in the telecom industry to build applications that self-heal, systems that never stop. Actors also provide the abstraction for transparent distribution and the basis for truly scalable and fault-tolerant applications. Akka is Open Source and available under the Apache 2 License. Learn more at "http://akka.io":http://akka.io.