[jira] Created: (SLING-1284) MemoryLeak: ThreadLocal variable is never cleared

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

[jira] Created: (SLING-1284) MemoryLeak: ThreadLocal variable is never cleared

Oliver Lietz (Jira)
MemoryLeak: ThreadLocal variable is never cleared
-------------------------------------------------

                 Key: SLING-1284
                 URL: https://issues.apache.org/jira/browse/SLING-1284
             Project: Sling
          Issue Type: Bug
    Affects Versions: Scripting JSP 2.0.8
            Reporter: Carsten Ziegeler
            Priority: Critical
             Fix For: Scripting JSP 2.0.10


The JspFactoryImpl by default uses a thread local for caching a page context pool. This thread local is never cleared creating a memory leak.
I think the easiest solution is to disable the pool - don't know if this has a real performance impact

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (SLING-1284) MemoryLeak: ThreadLocal variable is never cleared

Oliver Lietz (Jira)

    [ https://issues.apache.org/jira/browse/SLING-1284?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12799227#action_12799227 ]

Carsten Ziegeler commented on SLING-1284:
-----------------------------------------

I've disabled the pool completly in Revision: 898361

> MemoryLeak: ThreadLocal variable is never cleared
> -------------------------------------------------
>
>                 Key: SLING-1284
>                 URL: https://issues.apache.org/jira/browse/SLING-1284
>             Project: Sling
>          Issue Type: Bug
>    Affects Versions: Scripting JSP 2.0.8
>            Reporter: Carsten Ziegeler
>            Priority: Critical
>             Fix For: Scripting JSP 2.0.10
>
>
> The JspFactoryImpl by default uses a thread local for caching a page context pool. This thread local is never cleared creating a memory leak.
> I think the easiest solution is to disable the pool - don't know if this has a real performance impact

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (SLING-1284) MemoryLeak: ThreadLocal variable is never cleared

Oliver Lietz (Jira)
In reply to this post by Oliver Lietz (Jira)

    [ https://issues.apache.org/jira/browse/SLING-1284?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12799228#action_12799228 ]

Felix Meschberger commented on SLING-1284:
------------------------------------------

IIRC the JspScriptHandlerFactory contains some "hack" to disable the PageContextPool.

Nowadys, IMHO, such an object pool is of dubious use anyways and I think the complete PageContextPool code should be removed altogether (not just switched off).

> MemoryLeak: ThreadLocal variable is never cleared
> -------------------------------------------------
>
>                 Key: SLING-1284
>                 URL: https://issues.apache.org/jira/browse/SLING-1284
>             Project: Sling
>          Issue Type: Bug
>    Affects Versions: Scripting JSP 2.0.8
>            Reporter: Carsten Ziegeler
>            Priority: Critical
>             Fix For: Scripting JSP 2.0.10
>
>
> The JspFactoryImpl by default uses a thread local for caching a page context pool. This thread local is never cleared creating a memory leak.
> I think the easiest solution is to disable the pool - don't know if this has a real performance impact

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (SLING-1284) MemoryLeak: ThreadLocal variable is never cleared

Oliver Lietz (Jira)
In reply to this post by Oliver Lietz (Jira)

    [ https://issues.apache.org/jira/browse/SLING-1284?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12799233#action_12799233 ]

Carsten Ziegeler commented on SLING-1284:
-----------------------------------------

Hmm if the JspScriptHandlerFactory contains some hack, it doesn't work :)

I disabled the pool with a static final boolean, so this should remove the code by the compiler (Ihope)
I don't want to change to much in the jsp code to make an update of the jasper code easier

> MemoryLeak: ThreadLocal variable is never cleared
> -------------------------------------------------
>
>                 Key: SLING-1284
>                 URL: https://issues.apache.org/jira/browse/SLING-1284
>             Project: Sling
>          Issue Type: Bug
>    Affects Versions: Scripting JSP 2.0.8
>            Reporter: Carsten Ziegeler
>            Priority: Critical
>             Fix For: Scripting JSP 2.0.10
>
>
> The JspFactoryImpl by default uses a thread local for caching a page context pool. This thread local is never cleared creating a memory leak.
> I think the easiest solution is to disable the pool - don't know if this has a real performance impact

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (SLING-1284) MemoryLeak: ThreadLocal variable is never cleared

Oliver Lietz (Jira)
In reply to this post by Oliver Lietz (Jira)

    [ https://issues.apache.org/jira/browse/SLING-1284?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12799236#action_12799236 ]

Carsten Ziegeler commented on SLING-1284:
-----------------------------------------

Ok, I found the hack and removed it

> MemoryLeak: ThreadLocal variable is never cleared
> -------------------------------------------------
>
>                 Key: SLING-1284
>                 URL: https://issues.apache.org/jira/browse/SLING-1284
>             Project: Sling
>          Issue Type: Bug
>    Affects Versions: Scripting JSP 2.0.8
>            Reporter: Carsten Ziegeler
>            Priority: Critical
>             Fix For: Scripting JSP 2.0.10
>
>
> The JspFactoryImpl by default uses a thread local for caching a page context pool. This thread local is never cleared creating a memory leak.
> I think the easiest solution is to disable the pool - don't know if this has a real performance impact

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Resolved: (SLING-1284) MemoryLeak: ThreadLocal variable is never cleared

Oliver Lietz (Jira)
In reply to this post by Oliver Lietz (Jira)

     [ https://issues.apache.org/jira/browse/SLING-1284?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Carsten Ziegeler resolved SLING-1284.
-------------------------------------

    Resolution: Fixed
      Assignee: Carsten Ziegeler

I've removed the pooling code now completly in revision: 898374

> MemoryLeak: ThreadLocal variable is never cleared
> -------------------------------------------------
>
>                 Key: SLING-1284
>                 URL: https://issues.apache.org/jira/browse/SLING-1284
>             Project: Sling
>          Issue Type: Bug
>    Affects Versions: Scripting JSP 2.0.8
>            Reporter: Carsten Ziegeler
>            Assignee: Carsten Ziegeler
>            Priority: Critical
>             Fix For: Scripting JSP 2.0.10
>
>
> The JspFactoryImpl by default uses a thread local for caching a page context pool. This thread local is never cleared creating a memory leak.
> I think the easiest solution is to disable the pool - don't know if this has a real performance impact

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (SLING-1284) MemoryLeak: ThreadLocal variable is never cleared

Oliver Lietz (Jira)
In reply to this post by Oliver Lietz (Jira)

    [ https://issues.apache.org/jira/browse/SLING-1284?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12799242#action_12799242 ]

Felix Meschberger commented on SLING-1284:
------------------------------------------

Cool. Thanks.

> MemoryLeak: ThreadLocal variable is never cleared
> -------------------------------------------------
>
>                 Key: SLING-1284
>                 URL: https://issues.apache.org/jira/browse/SLING-1284
>             Project: Sling
>          Issue Type: Bug
>    Affects Versions: Scripting JSP 2.0.8
>            Reporter: Carsten Ziegeler
>            Assignee: Carsten Ziegeler
>            Priority: Critical
>             Fix For: Scripting JSP 2.0.10
>
>
> The JspFactoryImpl by default uses a thread local for caching a page context pool. This thread local is never cleared creating a memory leak.
> I think the easiest solution is to disable the pool - don't know if this has a real performance impact

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.