[JIRA] Created: (LBCORE-78) Compression with TimeBasedRollingPolicy leaks a thread which blocks the application to shutdown + leads to severe memory leak in webapps

Compression with TimeBasedRollingPolicy leaks a thread which blocks the application to shutdown + leads to severe memory leak in webapps ---------------------------------------------------------------------------------------------------------------------------------------- Key: LBCORE-78 URL: http://jira.qos.ch/browse/LBCORE-78 Project: logback-core Issue Type: Bug Components: Rolling Affects Versions: 0.9.13 Environment: 1.5,1.6 JDK Reporter: Szel Zoltan Assignee: Logback dev list Priority: Blocker Hi, the TimeBasedRollingPolicy uses the AsynchronousCompressor class to perform the compression in a background thread. In the AsyncCompressor every compress creates a ThreadPool with one thread which is never stopped. After compression the thread will wait on a queue to be fed with new task which will never happen again and there is now chance to stop the thread manually, because the reference to the ExecutorService is lost. Because the thread is not stoped and it is not a deamon thread, the JVM can not shutdown. In web env this bug causes the leak of the application's classloader. A simple solution is to create a simple thread to perform the compression instead of using an ExecutorService. Regards, Zoltan Szel -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira

[ http://jira.qos.ch/browse/LBCORE-78?page=com.atlassian.jira.plugin.system.is... ] Szel Zoltan commented on LBCORE-78: ----------------------------------- Just a bit correction
In web env this bug causes the leak of the application's classloader. This is not true, the thread will leak the boot classloader only.
Regards, Zoltan Szel
Compression with TimeBasedRollingPolicy leaks a thread which blocks the application to shutdown + leads to severe memory leak in webapps ----------------------------------------------------------------------------------------------------------------------------------------
Key: LBCORE-78 URL: http://jira.qos.ch/browse/LBCORE-78 Project: logback-core Issue Type: Bug Components: Rolling Affects Versions: 0.9.13 Environment: 1.5,1.6 JDK Reporter: Szel Zoltan Assignee: Logback dev list Priority: Blocker
Hi, the TimeBasedRollingPolicy uses the AsynchronousCompressor class to perform the compression in a background thread. In the AsyncCompressor every compress creates a ThreadPool with one thread which is never stopped. After compression the thread will wait on a queue to be fed with new task which will never happen again and there is now chance to stop the thread manually, because the reference to the ExecutorService is lost. Because the thread is not stoped and it is not a deamon thread, the JVM can not shutdown. In web env this bug causes the leak of the application's classloader. A simple solution is to create a simple thread to perform the compression instead of using an ExecutorService. Regards, Zoltan Szel
-- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira

[ http://jira.qos.ch/browse/LBCORE-78?page=com.atlassian.jira.plugin.system.is... ] Ceki Gulcu resolved LBCORE-78. ------------------------------ Fix Version/s: 0.9.14 Resolution: Fixed Hello Szel, Thank you for this bug report. The problem has been fixed in revision 2076.
Compression with TimeBasedRollingPolicy leaks a thread which blocks the application to shutdown + leads to severe memory leak in webapps ----------------------------------------------------------------------------------------------------------------------------------------
Key: LBCORE-78 URL: http://jira.qos.ch/browse/LBCORE-78 Project: logback-core Issue Type: Bug Components: Rolling Affects Versions: 0.9.13 Environment: 1.5,1.6 JDK Reporter: Szel Zoltan Assignee: Ceki Gulcu Priority: Blocker Fix For: 0.9.14
Hi, the TimeBasedRollingPolicy uses the AsynchronousCompressor class to perform the compression in a background thread. In the AsyncCompressor every compress creates a ThreadPool with one thread which is never stopped. After compression the thread will wait on a queue to be fed with new task which will never happen again and there is now chance to stop the thread manually, because the reference to the ExecutorService is lost. Because the thread is not stoped and it is not a deamon thread, the JVM can not shutdown. In web env this bug causes the leak of the application's classloader. A simple solution is to create a simple thread to perform the compression instead of using an ExecutorService. Regards, Zoltan Szel
-- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
participants (2)
-
Ceki Gulcu (JIRA)
-
Szel Zoltan (JIRA)