|
From: Christoph J. <chr...@ma...> - 2019-12-02 13:00:22
|
Hi Philip, never seen something similar. AFAICT the DelegatingTask is only used when you pass a custom Executor into the SessionConnector. I would expect it to be in the stack trace if you used it. It looks like the task was tried to be cancelled but that did not work. Instead the task finished its work. I think the task is trying to be cancelled and gets interrupted due to the cancel(true) but it might very well be that we do not consider the InterruptedException in all pieces of the code. Don't know if that is the problem, though. From the JDK sources it looks like cancel() only returns false when the task has been completed or cancelled before calling cancel(). Cheers, Chris. On 02.12.19 10:50, philip wrote: > QuickFIX/J Documentation: http://www.quickfixj.org/documentation/ > QuickFIX/J Support: http://www.quickfixj.org/support/ > > > Hi folks, > > I've been investigating an issue where our process is stopped on the edge of a session boundary. > > In this scenario we get the following logging: > > 17:30:01 INFO (SessionConnector.java:265) [adminthread] - SessionTimer canceled > ... > 17:30:01 ERROR (InternalLayer.java:186) [QFJ Timer] - An error occurred while writing .... > ... > at InternalLayer.reset(InternalLayer.java:658) > ... > at quickfix.SessionState.reset(SessionState.java:382) > at quickfix.Session.resetState(Session.java:2516) > at quickfix.Session.reset(Session.java:823) > at quickfix.Session.next(Session.java:1795) > at quickfix.mina.SessionConnector$SessionTimerTask.run(SessionConnector.java:278) > at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) > at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) > at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) > at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) > at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) > at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) > at java.lang.Thread.run(Thread.java:745) > > > As you can see from the abbreviated stack trace, the Session reset appears (subject to logging) to be passed to our internal layer after the session timer is cancelled. > > Looking at the code for Session Connector > > protected void stopSessionTimer() { > if (sessionTimerFuture != null) { > if (sessionTimerFuture.cancel(true)) > log.info("SessionTimer canceled"); > } > } > > we are cancelling the timer. But does this actually prevent the current task from executing. The combination of DelegatingTask and BlockingSupportTask make it difficult to parse. > > Has anyone else seen similar issues? > > > _______________________________________________ > Quickfixj-users mailing list > Qui...@li... > https://lists.sourceforge.net/lists/listinfo/quickfixj-users -- Christoph John Software Engineering T +49 241 557080-28 chr...@ma... MACD GmbH Oppenhoffallee 103 52066 Aachen, Germany www.macd.com Amtsgericht Aachen: HRB 8151 Ust.-Id: DE 813021663 Geschäftsführer: George Macdonald |