RestComm / Restcomm-Connect

The Open Source Cloud Communications Platform
http://www.restcomm.com/
GNU Affero General Public License v3.0
244 stars 215 forks source link

Properly cleanup VoiceInterpreter and Conference actors when Conference is in inconsistent state #951

Open gvagenas opened 8 years ago

gvagenas commented 8 years ago

We should properly cleanup Conference room that reach inconsistent state and thus cannot add or remove any participant.

Exception:

java.lang.NullPointerException: org.mobicents.servlet.restcomm.fsm.TransitionFailedException: java.lang.NullPointerException
       at org.mobicents.servlet.restcomm.fsm.FiniteStateMachine.transition(FiniteStateMachine.java:89) [restcomm.commons-RaaS-7.5.0.101.jar:]
       at org.mobicents.servlet.restcomm.interpreter.VoiceInterpreter.onReceive(VoiceInterpreter.java:663) [restcomm.interpreter-RaaS-7.5.0.101.jar:]
       at akka.actor.UntypedActor$$anonfun$receive$1.applyOrElse(UntypedActor.scala:159) [akka-actor_2.10-2.1.2.jar:]
       at akka.actor.ActorCell.receiveMessage(ActorCell.scala:425) [akka-actor_2.10-2.1.2.jar:]
       at akka.actor.ActorCell.invoke(ActorCell.scala:386) [akka-actor_2.10-2.1.2.jar:]
       at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:230) [akka-actor_2.10-2.1.2.jar:]
       at akka.dispatch.Mailbox.run(Mailbox.scala:212) [akka-actor_2.10-2.1.2.jar:]
       at akka.dispatch.ForkJoinExecutorConfigurator$MailboxExecutionTask.exec(AbstractDispatcher.scala:506) [akka-actor_2.10-2.1.2.jar:]
       at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:262) [scala-library-2.10.1.jar:]
       at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:975) [scala-library-2.10.1.jar:]
       at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1478) [scala-library-2.10.1.jar:]
       at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:104) [scala-library-2.10.1.jar:]
Caused by: java.lang.NullPointerException
       at org.mobicents.servlet.restcomm.interpreter.VoiceInterpreter$JoiningConference.execute(VoiceInterpreter.java:2014) [restcomm.interpreter-RaaS-7.5.0.101.jar:]
       at org.mobicents.servlet.restcomm.fsm.FiniteStateMachine.transition(FiniteStateMachine.java:87) [restcomm.commons-RaaS-7.5.0.101.jar:]
       ... 11 more

In that case VoiceInterpreter and Conference room should be cleaned.

Related to #949

gvagenas commented 8 years ago

The patch at commit https://github.com/RestComm/Restcomm-Connect/commit/09ad2e018e9746a8cedae35e04392aec53033c6d will protect VoiceInterpreter from the issue but since I cannot reproduce the issue and test it I will not merge the patch to master for now.