commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary Gregory (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (BEANUTILS-509) WeakHashmap enters into infinite loop in WrapDynaClass.java
Date Sat, 13 Oct 2018 18:03:00 GMT

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

Gary Gregory commented on BEANUTILS-509:
----------------------------------------

Here is something handy, in the {{pom.xml}}, I updated the Surefire argline from 56 megabytes
to 256 MB:

{code:xml}
<surefire.argLine>-Xmx256M</surefire.argLine>
{code}

and now I get:

{noformat}
[INFO] Running org.apache.commons.beanutils2.bugs.Jira509TestCase
[ERROR] Tests run: 2, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 111.811 s <<<
FAILURE! - in org.apache.commons.beanutils2.bugs.Jira509TestCase
[ERROR] org.apache.commons.beanutils2.bugs.Jira509TestCase  Time elapsed: 111.076 s  <<<
ERROR!
java.lang.OutOfMemoryError: GC overhead limit exceeded
{noformat}

Clearly, suing a synchronized map here is wreaking some havoc...
 

> WeakHashmap enters into infinite loop in WrapDynaClass.java
> -----------------------------------------------------------
>
>                 Key: BEANUTILS-509
>                 URL: https://issues.apache.org/jira/browse/BEANUTILS-509
>             Project: Commons BeanUtils
>          Issue Type: Bug
>          Components: DynaBean
>    Affects Versions: 1.8.2
>            Reporter: sunil
>            Priority: Major
>         Attachments: 2018-10-13T11-43-27_961-jvmRun1.dump, 2018-10-13T11-43-27_961.dumpstream,
BEANUTILS-509.diff, WrapDynaCache.patch, WrapDynaCache_after_svn_commit.patch, console.log.backup
>
>
> We noticed that our application was using too much of CPU , all the 6 cores were used. 
> On capturing the thread dump we saw that large number of threads were in the running
state and in :
> at java.util.WeakHashMap.get(WeakHashMap.java:403)
>  at org.apache.commons.beanutils.WrapDynaClass.createDynaClass(WrapDynaClass.java:425)
>  
> So we are suspecting that the thread has entered into indefinite while loop and hogging
all the CPU resources.
> I have attached the thread dump for reference.  
>  
> what is the solution for this issue?



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message