akka-persistance issue

54 views
Skip to first unread message

Neel Sachdeva

unread,
Dec 31, 2015, 8:45:05 AM12/31/15
to Akka User List

Hi Guys,

I'm seeing this exception on server :



akka.actor.OneForOneStrategy - 
java.util.NoSuchElementException
        at java.util.LinkedList.removeFirst(LinkedList.java:270)
        at java.util.LinkedList.pop(LinkedList.java:801)
        at akka.persistence.Eventsourced$$anon$2.onWriteMessageComplete(Eventsourced.scala:632)
        at akka.persistence.Eventsourced$ProcessingState$$anonfun$2.applyOrElse(Eventsourced.scala:554)
        at scala.runtime.AbstractPartialFunction.apply(AbstractPartialFunction.scala:36)
        at akka.persistence.Eventsourced$$anon$2.stateReceive(Eventsourced.scala:628)
        at akka.persistence.Eventsourced$class.aroundReceive(Eventsourced.scala:158)
        at catalyst.actors.subr.Subr.aroundReceive(Subr.scala:242)
        at akka.actor.ActorCell.receiveMessage(ActorCell.scala:526)
        at akka.actor.ActorCell.invoke_aroundBody0(ActorCell.scala:495)
        at akka.actor.ActorCell$AjcClosure1.run(ActorCell.scala:1)
        at org.aspectj.runtime.reflect.JoinPointImpl.proceed(JoinPointImpl.java:149)
        at akka.kamon.instrumentation.ActorCellInstrumentation$$anonfun$aroundBehaviourInvoke$1.apply(ActorCellInstrumentation.scala:63)
        at kamon.trace.Tracer$.withContext(TracerModule.scala:53)
        at akka.kamon.instrumentation.ActorCellInstrumentation.aroundBehaviourInvoke(ActorCellInstrumentation.scala:62)
        at akka.actor.ActorCell.invoke(ActorCell.scala:488)
        at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:257)
        at akka.dispatch.Mailbox.run(Mailbox.scala:224)
        at akka.dispatch.Mailbox.exec(Mailbox.scala:234)
        at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
        at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
        at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
        at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
2015-12-22 14:01:16,876 DEBUG catalyst.actors.subr.Subr - restarting


Problem is being caused at line 632 here https://github.com/akka/akka/blob/master/akka-persistence/src/main/scala/akka/persistence/Eventsourced.scala
Any idea whats happening here ?

Patrik Nordwall

unread,
Jan 1, 2016, 10:39:57 AM1/1/16
to akka...@googlegroups.com
That is strange. Do you have a way to reproduce it?
/Patrik

--
>>>>>>>>>> Read the docs: http://akka.io/docs/
>>>>>>>>>> Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
---
You received this message because you are subscribed to the Google Groups "Akka User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+...@googlegroups.com.
To post to this group, send email to akka...@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.



--

Patrik Nordwall
Typesafe Reactive apps on the JVM
Twitter: @patriknw

Neel Sachdeva

unread,
Jan 4, 2016, 3:17:39 AM1/4/16
to Akka User List
Hi Patrik, 

Thank you for responding to it.

No, i don't have a way to reproduce it. It happened two times with us. 

---------------------------------------------------------------------------------
final def persist[A](event: A)(handler: A ⇒ Unit): Unit = {
    pendingStashingPersistInvocations += 1
    pendingInvocations addLast StashingHandlerInvocation(event, handler.asInstanceOf[Any ⇒ Unit])
    resequenceableEventBatch = PersistentRepr(event) :: resequenceableEventBatch
    useProcessorBatching = false
  }
----------------------------------------------------------------------------------

May be somehow this "pendingInvocations addLast StashingHandlerInvocation(event, handler.asInstanceOf[Any ⇒ Unit])"   didn't happen or not sure what was that. Still trying to see what could've caused it.

Cheers | NS

Patrik Nordwall

unread,
Jan 4, 2016, 6:16:05 AM1/4/16
to akka...@googlegroups.com
Can you share the code of your PersistentActor?
I would like to see if you are calling the methods of PersistentActor from another thread than the actor's receive thread, e.g. from Future callbacks.
Reply all
Reply to author
Forward
0 new messages