Download Word - QuickFIX/J

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Document related concepts

Mark-to-market accounting wikipedia , lookup

Transcript
[QFJ-867] Thread handling after exiting QuickFIX Created: 06/Nov/15
Updated: 16/Nov/15
Status:
Project:
Component/s:
Affects
Version/s:
Fix Version/s:
Open
QuickFIX/J
Engine
1.6.1
Type:
Reporter:
Resolution:
Labels:
Environment:
Bug
Default
Priority:
Martin Vrábel
Unassigned
Assignee:
Unresolved
0
Votes:
QuickfixJ
Apache Tomcat 8 on Windows 10, Spring 4 web application
None
Description
Hi,
I stumbling over this thing over and over. When I stop my application I always get error
messages in output about spawning a new thread during execution of application but failing to
remove it when application stops:
```
06-Nov-2015 12:29:26.653 SEVERE [localhost-startStop-2]
org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web
application [ROOT] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value
[java.lang.ThreadLocal@682d21a6]) and a value of type
[quickfix.field.converter.UtcTimestampConverter] (value
[quickfix.field.converter.UtcTimestampConverter@7f03e077]) but failed to remove it when the
web application was stopped. Threads are going to be renewed over time to try and avoid a
probable memory leak.
06-Nov-2015 12:29:26.654 SEVERE [localhost-startStop-2]
org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web
application [ROOT] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value
[java.lang.ThreadLocal@682d21a6]) and a value of type
[quickfix.field.converter.UtcTimestampConverter] (value
[quickfix.field.converter.UtcTimestampConverter@6b6c6237]) but failed to remove it when the
web application was stopped. Threads are going to be renewed over time to try and avoid a
probable memory leak.
06-Nov-2015 12:29:26.654 SEVERE [localhost-startStop-2]
org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web
application [ROOT] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value
[java.lang.ThreadLocal@682d21a6]) and a value of type
[quickfix.field.converter.UtcTimestampConverter] (value
[quickfix.field.converter.UtcTimestampConverter@2aca975d]) but failed to remove it when the
web application was stopped. Threads are going to be renewed over time to try and avoid a
probable memory leak.
06-Nov-2015 12:29:26.654 SEVERE [localhost-startStop-2]
org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web
application [ROOT] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value
[java.lang.ThreadLocal@682d21a6]) and a value of type
[quickfix.field.converter.UtcTimestampConverter] (value
[quickfix.field.converter.UtcTimestampConverter@2bebb3b3]) but failed to remove it when the
web application was stopped. Threads are going to be renewed over time to try and avoid a
probable memory leak.
06-Nov-2015 12:29:26.655 SEVERE [localhost-startStop-2]
org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web
application [ROOT] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value
[java.lang.ThreadLocal@682d21a6]) and a value of type
[quickfix.field.converter.UtcTimestampConverter] (value
[quickfix.field.converter.UtcTimestampConverter@4b8bfee1]) but failed to remove it when the
web application was stopped. Threads are going to be renewed over time to try and avoid a
probable memory leak.
```
It has something to do with `UtcTimestampConverter` but I have no idea why is it happening. I
correctly shutdown all threads I manually start.
Comments
Comment by Christoph John [ 16/Nov/15 ]
Hmm, looks more like a false positive to me. But to be honest I never tried running QFJ in a
managed environment or appserver.
http://stackoverflow.com/questions/28105803/tomcat8-memory-leak says that the ThreadLocals
need to be removed but I think this is not done because it is expected that QFJ is ran in a standalone environment.
Comment by Martin Vrábel [ 16/Nov/15 ]
Would it be possible to call a method or something from outside of quickfix to manually
shutdown all spawned threads when exiting my webapp?
Comment by Christoph John [ 16/Nov/15 ]
From what I understand from the output it does not have to do anything with threads but
ThreadLocal variables that are still held. But AFAIK there is no built-in mechanism to clean
them up.
Generated at Thu May 11 01:58:28 UTC 2017 using JIRA 7.0.10#70120sha1:37e3d7a6fc4d580639533e7f7c232c925e554a6a.