You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Marcel Reutegger (JIRA)" <ji...@apache.org> on 2006/10/24 10:20:16 UTC

[jira] Created: (JCR-600) Repository does not release all resources on shutdown

Repository does not release all resources on shutdown
-----------------------------------------------------

                 Key: JCR-600
                 URL: http://issues.apache.org/jira/browse/JCR-600
             Project: Jackrabbit
          Issue Type: Bug
          Components: core
    Affects Versions: 1.0, 1.0.1, 1.1
            Reporter: Marcel Reutegger
         Assigned To: Marcel Reutegger
            Priority: Minor


When Jackrabbit is shutdown some java.util.Timer threads are still running in the background even though no tasks are scheduled. This prevents the GC from collecting the classes when Jackrabbit is redeployed within a web application.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (JCR-600) Repository does not release all resources on shutdown

Posted by "Torgeir Veimo (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/JCR-600?page=all ]

Torgeir Veimo updated JCR-600:
------------------------------

    Attachment: Screenshot_1.png

Loaded class count view of tomcat instance after multiple redeployments of webapp with modified jackrabbit core jar.

> Repository does not release all resources on shutdown
> -----------------------------------------------------
>
>                 Key: JCR-600
>                 URL: http://issues.apache.org/jira/browse/JCR-600
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.0, 1.0.1, 1.1
>            Reporter: Marcel Reutegger
>         Assigned To: Marcel Reutegger
>            Priority: Minor
>         Attachments: Screenshot_1.png, Screenshot_2.png
>
>
> When Jackrabbit is shutdown some java.util.Timer threads are still running in the background even though no tasks are scheduled. This prevents the GC from collecting the classes when Jackrabbit is redeployed within a web application.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (JCR-600) Repository does not release all resources on shutdown

Posted by "Jukka Zitting (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/JCR-600?page=comments#action_12444902 ] 
            
Jukka Zitting commented on JCR-600:
-----------------------------------

> What classes are these changes in? I'd like to packport to 1.1 if possible.

See http://svn.apache.org/viewvc?view=rev&revision=467292 for the changes. The link should also appear on the "All" and "Subversion Commits" tabs of this page in a short while as the SVN-Jira integration does it's magic.

> Repository does not release all resources on shutdown
> -----------------------------------------------------
>
>                 Key: JCR-600
>                 URL: http://issues.apache.org/jira/browse/JCR-600
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.0, 1.0.1, 1.1
>            Reporter: Marcel Reutegger
>         Assigned To: Marcel Reutegger
>            Priority: Minor
>
> When Jackrabbit is shutdown some java.util.Timer threads are still running in the background even though no tasks are scheduled. This prevents the GC from collecting the classes when Jackrabbit is redeployed within a web application.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (JCR-600) Repository does not release all resources on shutdown

Posted by "Torgeir Veimo (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/JCR-600?page=comments#action_12453875 ] 
            
Torgeir Veimo commented on JCR-600:
-----------------------------------

I tried with both a 1.1 with the patches attached, and a fresh svn snapshot from Nov 28th 06, and I still see permgen growing without bounds. The code I use is simply

public void contextInitialized(ServletContextEvent event) {
        // set up repository 
        try {
            String rootDirectory = (String) ConfigManager.getEnvironmentEntry("jackrabbit/directory");
            String configFile = (String) ConfigManager.getEnvironmentEntry("jackrabbit/configfile");

            if (configFile.indexOf("/WEB-INF/") == 0) {
                log.debug("loading repository config from web application context root: " + configFile);
                URL url = event.getServletContext().getResource(configFile);
                InputStream repositoryXml = event.getServletContext().getResourceAsStream(configFile);
                RepositoryConfig config = RepositoryConfig.create(repositoryXml, rootDirectory);
                repository = new TransientRepository(config);

            } else {
                repository = new TransientRepository(configFile, rootDirectory);
            }
            
            Session session = repository.login(new SystemCredentials());
            session.logout();
            
        } catch (Exception e) {
            log.error("unable to configure Jackrabbit repository; ", e);
        }
    }


> Repository does not release all resources on shutdown
> -----------------------------------------------------
>
>                 Key: JCR-600
>                 URL: http://issues.apache.org/jira/browse/JCR-600
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.0, 1.0.1, 1.1
>            Reporter: Marcel Reutegger
>         Assigned To: Marcel Reutegger
>            Priority: Minor
>             Fix For: 1.1.1
>
>         Attachments: Screenshot_1.png, Screenshot_2.png
>
>
> When Jackrabbit is shutdown some java.util.Timer threads are still running in the background even though no tasks are scheduled. This prevents the GC from collecting the classes when Jackrabbit is redeployed within a web application.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Reopened: (JCR-600) Repository does not release all resources on shutdown

Posted by "Marcel Reutegger (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/JCR-600?page=all ]

Marcel Reutegger reopened JCR-600:
----------------------------------

             
You are right. My test didn't involve a login. I simply re-deployed the jackrabbit-server.war.

There is still a commit log thread local which holds a strong reference to a jackrabbit class, preventing the GC from collecting the WebappClassLoader.

> Repository does not release all resources on shutdown
> -----------------------------------------------------
>
>                 Key: JCR-600
>                 URL: http://issues.apache.org/jira/browse/JCR-600
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.0, 1.0.1, 1.1
>            Reporter: Marcel Reutegger
>         Assigned To: Marcel Reutegger
>            Priority: Minor
>         Attachments: Screenshot_1.png, Screenshot_2.png
>
>
> When Jackrabbit is shutdown some java.util.Timer threads are still running in the background even though no tasks are scheduled. This prevents the GC from collecting the classes when Jackrabbit is redeployed within a web application.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (JCR-600) Repository does not release all resources on shutdown

Posted by "Torgeir Veimo (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/JCR-600?page=comments#action_12445875 ] 
            
Torgeir Veimo commented on JCR-600:
-----------------------------------

It still doesn't work. Are there other classes that needs modification in jackrabbit 1.1? I've seen that there are threads used in other classes as well, eg RepositoryImpl, TransientFileFactory, ObservationDispatcher and others.

> Repository does not release all resources on shutdown
> -----------------------------------------------------
>
>                 Key: JCR-600
>                 URL: http://issues.apache.org/jira/browse/JCR-600
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.0, 1.0.1, 1.1
>            Reporter: Marcel Reutegger
>         Assigned To: Marcel Reutegger
>            Priority: Minor
>             Fix For: 1.1.1
>
>         Attachments: Screenshot_1.png, Screenshot_2.png
>
>
> When Jackrabbit is shutdown some java.util.Timer threads are still running in the background even though no tasks are scheduled. This prevents the GC from collecting the classes when Jackrabbit is redeployed within a web application.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Resolved: (JCR-600) Repository does not release all resources on shutdown

Posted by "Marcel Reutegger (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/JCR-600?page=all ]

Marcel Reutegger resolved JCR-600.
----------------------------------

    Fix Version/s: 1.1.1
       Resolution: Fixed

Second attempt ;)

Fixed in revision: http://svn.apache.org/viewvc?view=rev&revision=469412

> Repository does not release all resources on shutdown
> -----------------------------------------------------
>
>                 Key: JCR-600
>                 URL: http://issues.apache.org/jira/browse/JCR-600
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.0, 1.0.1, 1.1
>            Reporter: Marcel Reutegger
>         Assigned To: Marcel Reutegger
>            Priority: Minor
>             Fix For: 1.1.1
>
>         Attachments: Screenshot_1.png, Screenshot_2.png
>
>
> When Jackrabbit is shutdown some java.util.Timer threads are still running in the background even though no tasks are scheduled. This prevents the GC from collecting the classes when Jackrabbit is redeployed within a web application.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (JCR-600) Repository does not release all resources on shutdown

Posted by "Marcel Reutegger (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/JCR-600?page=comments#action_12445904 ] 
            
Marcel Reutegger commented on JCR-600:
--------------------------------------

What operations do you perform before you re-deploy the web application?

It works for me when I do a login, read a couple of items and logout again.

> Repository does not release all resources on shutdown
> -----------------------------------------------------
>
>                 Key: JCR-600
>                 URL: http://issues.apache.org/jira/browse/JCR-600
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.0, 1.0.1, 1.1
>            Reporter: Marcel Reutegger
>         Assigned To: Marcel Reutegger
>            Priority: Minor
>             Fix For: 1.1.1
>
>         Attachments: Screenshot_1.png, Screenshot_2.png
>
>
> When Jackrabbit is shutdown some java.util.Timer threads are still running in the background even though no tasks are scheduled. This prevents the GC from collecting the classes when Jackrabbit is redeployed within a web application.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Resolved: (JCR-600) Repository does not release all resources on shutdown

Posted by "Marcel Reutegger (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/JCR-600?page=all ]

Marcel Reutegger resolved JCR-600.
----------------------------------

    Resolution: Fixed

Jackrabbit now uses a custom Timer class which wraps the java.util.Timer. When there are no tasks scheduled the wrapped java.util.Timer is canceled which effectively terminates the background thread.

Fixed in revision: 467292

> Repository does not release all resources on shutdown
> -----------------------------------------------------
>
>                 Key: JCR-600
>                 URL: http://issues.apache.org/jira/browse/JCR-600
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.0, 1.0.1, 1.1
>            Reporter: Marcel Reutegger
>         Assigned To: Marcel Reutegger
>            Priority: Minor
>
> When Jackrabbit is shutdown some java.util.Timer threads are still running in the background even though no tasks are scheduled. This prevents the GC from collecting the classes when Jackrabbit is redeployed within a web application.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (JCR-600) Repository does not release all resources on shutdown

Posted by "Torgeir Veimo (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/JCR-600?page=comments#action_12444898 ] 
            
Torgeir Veimo commented on JCR-600:
-----------------------------------

What classes are these changes in? I'd like to packport to 1.1 if possible.

> Repository does not release all resources on shutdown
> -----------------------------------------------------
>
>                 Key: JCR-600
>                 URL: http://issues.apache.org/jira/browse/JCR-600
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.0, 1.0.1, 1.1
>            Reporter: Marcel Reutegger
>         Assigned To: Marcel Reutegger
>            Priority: Minor
>
> When Jackrabbit is shutdown some java.util.Timer threads are still running in the background even though no tasks are scheduled. This prevents the GC from collecting the classes when Jackrabbit is redeployed within a web application.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (JCR-600) Repository does not release all resources on shutdown

Posted by "Torgeir Veimo (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/JCR-600?page=comments#action_12454371 ] 
            
Torgeir Veimo commented on JCR-600:
-----------------------------------

I've done a bit more testing and it does in-fact seem to work properly now, so I guess this issue can be resolved as fixed.

> Repository does not release all resources on shutdown
> -----------------------------------------------------
>
>                 Key: JCR-600
>                 URL: http://issues.apache.org/jira/browse/JCR-600
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.0, 1.0.1, 1.1
>            Reporter: Marcel Reutegger
>         Assigned To: Marcel Reutegger
>            Priority: Minor
>             Fix For: 1.1.1
>
>         Attachments: Screenshot_1.png, Screenshot_2.png
>
>
> When Jackrabbit is shutdown some java.util.Timer threads are still running in the background even though no tasks are scheduled. This prevents the GC from collecting the classes when Jackrabbit is redeployed within a web application.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (JCR-600) Repository does not release all resources on shutdown

Posted by "Torgeir Veimo (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/JCR-600?page=comments#action_12445367 ] 
            
Torgeir Veimo commented on JCR-600:
-----------------------------------

There's a problem attaching screenshots to this issue..

> Repository does not release all resources on shutdown
> -----------------------------------------------------
>
>                 Key: JCR-600
>                 URL: http://issues.apache.org/jira/browse/JCR-600
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.0, 1.0.1, 1.1
>            Reporter: Marcel Reutegger
>         Assigned To: Marcel Reutegger
>            Priority: Minor
>
> When Jackrabbit is shutdown some java.util.Timer threads are still running in the background even though no tasks are scheduled. This prevents the GC from collecting the classes when Jackrabbit is redeployed within a web application.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (JCR-600) Repository does not release all resources on shutdown

Posted by "Torgeir Veimo (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/JCR-600?page=comments#action_12445366 ] 
            
Torgeir Veimo commented on JCR-600:
-----------------------------------

I tried backporting to 1.1, but it doesn't seem to fix it. Are there other classes that keep on running?

> Repository does not release all resources on shutdown
> -----------------------------------------------------
>
>                 Key: JCR-600
>                 URL: http://issues.apache.org/jira/browse/JCR-600
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.0, 1.0.1, 1.1
>            Reporter: Marcel Reutegger
>         Assigned To: Marcel Reutegger
>            Priority: Minor
>
> When Jackrabbit is shutdown some java.util.Timer threads are still running in the background even though no tasks are scheduled. This prevents the GC from collecting the classes when Jackrabbit is redeployed within a web application.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (JCR-600) Repository does not release all resources on shutdown

Posted by "Torgeir Veimo (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/JCR-600?page=all ]

Torgeir Veimo updated JCR-600:
------------------------------

    Attachment: Screenshot_2.png

Ditto permgen view.

> Repository does not release all resources on shutdown
> -----------------------------------------------------
>
>                 Key: JCR-600
>                 URL: http://issues.apache.org/jira/browse/JCR-600
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.0, 1.0.1, 1.1
>            Reporter: Marcel Reutegger
>         Assigned To: Marcel Reutegger
>            Priority: Minor
>         Attachments: Screenshot_1.png, Screenshot_2.png
>
>
> When Jackrabbit is shutdown some java.util.Timer threads are still running in the background even though no tasks are scheduled. This prevents the GC from collecting the classes when Jackrabbit is redeployed within a web application.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira