ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Maarten Coene (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (IVY-1362) Memory leak and infinite loop in ModuleId.java
Date Sun, 19 Aug 2012 22:03:38 GMT

    [ https://issues.apache.org/jira/browse/IVY-1362?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13437595#comment-13437595
] 

Maarten Coene commented on IVY-1362:
------------------------------------

Thanks for verifying, it did my homework again and hopefully it is ok now?
                
> Memory leak and infinite loop in ModuleId.java
> ----------------------------------------------
>
>                 Key: IVY-1362
>                 URL: https://issues.apache.org/jira/browse/IVY-1362
>             Project: Ivy
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.2.0
>         Environment: Eclipse / IvyDE
>            Reporter: Marcell Hegedus
>            Assignee: Maarten Coene
>             Fix For: 2.3.0
>
>
> ModuleId tries save memory by interning objects. This ModuleId cache is not synchronized
and when it is mutated from concurrent threads it is possible that the WeakHashMap will contain
a loop. As described in the blog post: ["A Beautiful Race Condition"|http://mailinator.blogspot.hu/2009/06/beautiful-race-condition.html]
> The same issue and a memory leak was fixed in IVY-791.
> {code:title=Stacktrace of a hanging thread}
> java.lang.Thread.State: RUNNABLE
> 	at java.util.WeakHashMap.get(Unknown Source)
> 	at org.apache.ivy.core.module.id.ModuleId.intern(ModuleId.java:63)
> 	at org.apache.ivy.core.module.id.ModuleId.newInstance(ModuleId.java:48)
> 	at org.apache.ivy.core.module.id.ModuleRevisionId.newInstance(ModuleRevisionId.java:100)
> 	at org.apache.ivy.plugins.parser.m2.PomModuleDescriptorBuilder.addDependency(PomModuleDescriptorBuilder.java:285)
> 	at org.apache.ivy.plugins.parser.m2.PomModuleDescriptorParser.parseDescriptor(PomModuleDescriptorParser.java:262)
> 	at org.apache.ivy.plugins.parser.m2.PomModuleDescriptorParser.parseDescriptor(PomModuleDescriptorParser.java:108)
> 	at org.apache.ivy.core.cache.DefaultRepositoryCacheManager$MyModuleDescriptorProvider.provideModule(DefaultRepositoryCacheManager.java:659)
> 	at org.apache.ivy.core.cache.ModuleDescriptorMemoryCache.getStale(ModuleDescriptorMemoryCache.java:68)
> 	at org.apache.ivy.core.cache.DefaultRepositoryCacheManager.getStaledMd(DefaultRepositoryCacheManager.java:676)
> 	at org.apache.ivy.core.cache.DefaultRepositoryCacheManager.cacheModuleDescriptor(DefaultRepositoryCacheManager.java:993)
> 	at org.apache.ivy.plugins.resolver.BasicResolver.parse(BasicResolver.java:546)
> 	at org.apache.ivy.plugins.resolver.BasicResolver.getDependency(BasicResolver.java:266)
> 	at org.apache.ivy.plugins.resolver.IBiblioResolver.getDependency(IBiblioResolver.java:503)
> 	at org.apache.ivy.plugins.resolver.ChainResolver.getDependency(ChainResolver.java:104)
> 	at org.apache.ivy.plugins.resolver.ChainResolver.getDependency(ChainResolver.java:104)
> 	at org.apache.ivy.plugins.resolver.ChainResolver.getDependency(ChainResolver.java:104)
> 	at org.apache.ivy.core.resolve.IvyNode.loadData(IvyNode.java:169)
> 	at org.apache.ivy.core.resolve.VisitNode.loadData(VisitNode.java:287)
> 	at org.apache.ivy.core.resolve.ResolveEngine.fetchDependencies(ResolveEngine.java:696)
> 	at org.apache.ivy.core.resolve.ResolveEngine.doFetchDependencies(ResolveEngine.java:781)
> 	at org.apache.ivy.core.resolve.ResolveEngine.fetchDependencies(ResolveEngine.java:704)
> 	at org.apache.ivy.core.resolve.ResolveEngine.doFetchDependencies(ResolveEngine.java:769)
> 	at org.apache.ivy.core.resolve.ResolveEngine.fetchDependencies(ResolveEngine.java:704)
> 	at org.apache.ivy.core.resolve.ResolveEngine.doFetchDependencies(ResolveEngine.java:769)
> 	at org.apache.ivy.core.resolve.ResolveEngine.fetchDependencies(ResolveEngine.java:704)
> 	at org.apache.ivy.core.resolve.ResolveEngine.doFetchDependencies(ResolveEngine.java:781)
> 	at org.apache.ivy.core.resolve.ResolveEngine.fetchDependencies(ResolveEngine.java:704)
> 	at org.apache.ivy.core.resolve.ResolveEngine.doFetchDependencies(ResolveEngine.java:781)
> 	at org.apache.ivy.core.resolve.ResolveEngine.fetchDependencies(ResolveEngine.java:704)
> 	at org.apache.ivy.core.resolve.ResolveEngine.getDependencies(ResolveEngine.java:576)
> 	at org.apache.ivy.core.resolve.ResolveEngine.resolve(ResolveEngine.java:237)
> 	at org.apache.ivy.Ivy.resolve(Ivy.java:512)
> 	at org.apache.ivyde.eclipse.cpcontainer.IvyResolveJobThread.resolve(IvyResolveJobThread.java:224)
> 	at org.apache.ivyde.eclipse.cpcontainer.IvyResolveJobThread.run(IvyResolveJobThread.java:127)
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message