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

Szel Zoltan (JIRA) noreply-jira at qos.ch
Tue Dec 9 12:45:14 CET 2008


    [ http://jira.qos.ch/browse/LBCORE-78?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=10955#action_10955 ] 

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

        


More information about the logback-dev mailing list