IllegalStateException in akka.dispatch.BatchingExecutor$Batch.run

198 views
Skip to first unread message

Maxim Valyanskiy

unread,
Nov 17, 2014, 8:57:00 AM11/17/14
to akka...@googlegroups.com
Hello!

I'm running Akka application that sometimes logs ISE in BatchingExecutor$Batch.run. I can't find any application class in it stack trace, all classes in it are Akka internal. Is it a problem (bug) in application or in Akka? How to find the cause of it?

Here it the complete stack trace:

[incident-daemon-system-akka.actor.default-dispatcher-233] ERROR akka.dispatch.Dispatcher - exception in sameThreadExecutionContext (a.d.Dispatcher)
java.lang.IllegalStateException: exception in sameThreadExecutionContext
        at akka.dispatch.ExecutionContexts$sameThreadExecutionContext$.reportFailure(Future.scala:76)
        at scala.concurrent.impl.CallbackRunnable.executeWithValue(Promise.scala:40)
        at scala.concurrent.impl.Promise$DefaultPromise.tryComplete(Promise.scala:248)
        at scala.concurrent.Promise$class.complete(Promise.scala:55)
        at scala.concurrent.impl.Promise$DefaultPromise.complete(Promise.scala:153)
        at scala.concurrent.Future$$anonfun$map$1.apply(Future.scala:235)
        at scala.concurrent.Future$$anonfun$map$1.apply(Future.scala:235)
        at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:32)
        at akka.dispatch.BatchingExecutor$Batch$$anonfun$run$1.processBatch$1(BatchingExecutor.scala:67)
        at akka.dispatch.BatchingExecutor$Batch$$anonfun$run$1.apply$mcV$sp(BatchingExecutor.scala:82)
        at akka.dispatch.BatchingExecutor$Batch$$anonfun$run$1.apply(BatchingExecutor.scala:59)
        at akka.dispatch.BatchingExecutor$Batch$$anonfun$run$1.apply(BatchingExecutor.scala:59)
        at scala.concurrent.BlockContext$.withBlockContext(BlockContext.scala:72)
        at akka.dispatch.BatchingExecutor$Batch.run(BatchingExecutor.scala:58)
        at akka.dispatch.TaskInvocation.run(AbstractDispatcher.scala:41)
        at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:393)
        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)
Caused by: java.lang.IllegalArgumentException: requirement failed
        at scala.Predef$.require(Predef.scala:207)
        at akka.dispatch.BatchingExecutor$Batch.run(BatchingExecutor.scala:55)
        at akka.dispatch.ExecutionContexts$sameThreadExecutionContext$.unbatchedExecute(Future.scala:74)
        at akka.dispatch.BatchingExecutor$Batch$$anonfun$run$1.processBatch$1(BatchingExecutor.scala:76)
        at akka.dispatch.BatchingExecutor$Batch$$anonfun$run$1.apply$mcV$sp(BatchingExecutor.scala:82)
        at akka.dispatch.BatchingExecutor$Batch$$anonfun$run$1.apply(BatchingExecutor.scala:59)
        at akka.dispatch.BatchingExecutor$Batch$$anonfun$run$1.apply(BatchingExecutor.scala:59)
        at scala.concurrent.BlockContext$.withBlockContext(BlockContext.scala:72)
        at akka.dispatch.BatchingExecutor$Batch.run(BatchingExecutor.scala:58)
        at akka.dispatch.ExecutionContexts$sameThreadExecutionContext$.unbatchedExecute(Future.scala:74)
        at akka.dispatch.BatchingExecutor$class.execute(BatchingExecutor.scala:110)
        at akka.dispatch.ExecutionContexts$sameThreadExecutionContext$.execute(Future.scala:73)
        ... 19 common frames omitted

Maxim

Konrad 'ktoso' Malawski

unread,
Nov 17, 2014, 9:04:30 AM11/17/14
to akka...@googlegroups.com, Maxim Valyanskiy
Hi Maxim,
We fixed a very similar bug in akka-streams 0.11, but it does not seem that’s the exact place that your stacktrace is coming from…
Here’s the issue we fixed in 0.11 => https://github.com/akka/akka/issues/16263

Would you mind giving more background on what you’ve been using and when this appeared?
Are you using akka streams?
Which version of akka etc are you using?

Thanks for the additional info, let’s try looking into it.

-- 
Konrad 'ktoso' Malawski
hAkker @ typesafe

√iktor Ҡlang

unread,
Nov 17, 2014, 9:20:58 AM11/17/14
to Akka User List, Maxim Valyanskiy
Also, could you have your logger output the full stack trace?

--
>>>>>>>>>> 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 http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.



--
Cheers,

Maxim Valyanskiy

unread,
Nov 17, 2014, 9:25:15 AM11/17/14
to akka...@googlegroups.com, max.va...@gmail.com
Hello!

Our application provides REST interface to database storage. User uploads data via HTTP interface, we store it to JDBC and then do some additional logic that processes uploaded data. HTTP interface is implemented via Spray 1.3.2; Akka version 2.3.6 (but I have seen this problem in previous 2.3.x). We do not use akka-streams.

We create and then stop an some number of actors per upload; also we use transformation operations on Future in context dispatcher.

We see this exception when client continuously uploads large number of objects (about a million). I do not know the way to reproduce this bug (other that posting a lot of data and waiting before the problem occurs).

Maxim

понедельник, 17 ноября 2014 г., 17:04:30 UTC+3 пользователь Konrad Malawski написал:

Konrad Malawski

unread,
Nov 17, 2014, 12:18:07 PM11/17/14
to Akka User List, max.va...@gmail.com
Thanks for the description Maxim, would you mind opening an issue on our issue tracker using the data you've collected so far (the stacktrace and your descrition here)?
Sounds like there may be something on our side we should look deeper into.

Thanks in advance!

--
>>>>>>>>>> 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 http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.



--
Cheers,
Konrad 'ktoso' Malawski
hAkker @ Typesafe


Maxim Valyanskiy

unread,
Nov 18, 2014, 7:02:32 AM11/18/14
to akka...@googlegroups.com, max.va...@gmail.com
Hello!

I created new issue https://github.com/akka/akka/issues/16327. I'm going to reproduce this problem later with logging settings that was suggested by Viktor and also update Akka to 2.3.7.

Maxim

понедельник, 17 ноября 2014 г., 20:18:07 UTC+3 пользователь Konrad Malawski написал:

Konrad Malawski

unread,
Nov 18, 2014, 7:07:10 AM11/18/14
to Akka User List, Maxim Valyanskiy
Thanks a lot for creating the issue Maxim! 
Let us know if you'd be able to find any more details that would help us find the root cause of the issue.

Thanks in advance
Reply all
Reply to author
Forward
0 new messages