The problem resides in the code you redacted. On Fri, Oct 2, 2015 at 3:29 PM, Olddave <[email protected]> wrote:
> To specifically answer you questiomns. I use the default mailbox, I have > not seen an InterrputedException at all. I am switching between using > Futures and tell at various points as I work out the dynamic behaviour I > need, > > David > > On Friday, 2 October 2015 12:28:38 UTC+1, Akka Team wrote: >> >> Hi David, >> >> >> >> On Thu, Oct 1, 2015 at 10:44 AM, Olddave <[email protected]> wrote: >> >>> Hi, >>> >>> I have a subclass of an UntypedActor that I use a Future to access. It >>> works for hundreds of accesses then on the same nth message stalls at the >>> same line in a method inside the Actor each time. I get the following stack >>> trace, not an exception >>> >>> >>> Thread [actor-system-akka.actor.default-dispatcher-2] (Suspended) >>> ActorCell.invoke(Envelope) line: 490 >>> Dispatcher$$anon$1(Mailbox).processMailbox(int, long) line: 238 >>> Dispatcher$$anon$1(Mailbox).run() line: 220 >>> ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec() line: 397 >>> ForkJoinExecutorConfigurator$AkkaForkJoinTask(ForkJoinTask<V>).doExec() >>> line: 260 >>> ForkJoinPool$WorkQueue.runTask(ForkJoinTask<?>) line: 1339 >>> ForkJoinExecutorConfigurator$AkkaForkJoinPool(ForkJoinPool).runWorker( >>> ForkJoinPool$WorkQueue) line: 1979 >>> MonitorableThreadFactory$AkkaForkJoinWorkerThread(ForkJoinWorkerThread >>> ).run() line: 107 >>> >>> The relevant parts of the code are >>> >>> ... >>> private HashMap<Integer, List<String>> PA72UIds = new HashMap<Integer, >>> List<String>>(); >>> ... >>> ... >>> private UIdUsed getUIds(UIdsRequired msg) { >>> UIdUsed result = new UIdUsed(); >>> >>> >>> if (msg.getMpeBuild().getSource() == SOURCE.OMC) { >>> result.setuIds24(populateUIds(msg, PA24UIds, 1, OMCLookback)); >>> result.setuIds48(populateUIds(msg, PA48UIds, 2, OMCLookback)); >>> result.setuIds72(populateUIds(msg, PA72UIds, 3, OMCLookback)); >>> //2 >>> ... >>> ... >>> private List<String> populateUIds(UIdsRequired msg, >>> HashMap<Integer, List<String>> idHolder, int range, int lookback) { >>> >>> >>> int numReq = msg.getNumRequired(); >>> // We split the MPEr across the 5 scan sources equally then in >>> // proportion to product duration type >>> numReq = numReq/5; >>> List<String> avail = null; >>> List<String> remaining = null; >>> ArrayList<String> availUIds = new ArrayList<String>(0); >>> >>> >>> int i = 0; >>> while (availUIds.size() < numReq) { >>> // Look one slot closer, after i increments > 0 >>> int lookbackSlot = msg.getMpeBuild().getSlot() - lookback + i; >>> if (lookbackSlot >= 0) { >>> avail = idHolder.get(lookbackSlot); >>> if (avail != null && avail.size() >= numReq) { //3 >>> ... >>> ... >>> @Override >>> public void onReceive(Object msg) throws Exception { >>> if (msg instanceof UIdUsed) { >>> addToStore((UIdUsed) msg); >>> } else if (msg instanceof UIdsRequired) { >>> UIdUsed ids = getUIds((UIdsRequired) msg); //1 >>> ... >>> >>> >>> The call count of the Actor is 55 each time when the avail variable >>> causes this issue. You can see in the comments I added //1 calls getUIds, >>> in getUIds //2 calls populateUIds, the previous 2 calls you see both >>> succeed and hit the same line where I later get the error. Then at //3 I >>> get the stack trace you see above, it will stall there forever. >>> >>> I really have no clue how to debug this as there is no exception, it >>> just stops there and the timeout on the Future that sent the message >>> triggers. >>> >> >> This looks weird, but from this I cannot really see what the issue. What >> is clear that something very wrong happens in internal message processing. >> Is there something among your calls that can cause an InterrputedException? >> Are you using blocking calls? Are you using a non-default mailbox? >> >> Does anything in that code using assert? >> >> -Endre >> >> >>> >>> Can someone explain how you debug this type of issue? >>> >>> Thx >>> >>> David >>> >>> -- >>> >>>>>>>>>> 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 [email protected]. >>> To post to this group, send email to [email protected]. >>> Visit this group at http://groups.google.com/group/akka-user. >>> For more options, visit https://groups.google.com/d/optout. >>> >> >> >> >> -- >> Akka Team >> Typesafe - Reactive apps on the JVM >> Blog: letitcrash.com >> Twitter: @akkateam >> > -- > >>>>>>>>>> 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 [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/akka-user. > For more options, visit https://groups.google.com/d/optout. > -- Cheers, √ -- >>>>>>>>>> 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
