[ https://issues.apache.org/jira/browse/BEANUTILS-509?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17213447#comment-17213447 ]
sunil edited comment on BEANUTILS-509 at 10/13/20, 10:17 PM: ------------------------------------------------------------- Hi, We had hit the similar issue during below invocation: {code:java} try { bean = new WrapDynaBean(aInChildClass.newInstance()); } catch (InstantiationException e) { getLogger().error(e.getMessage()); }{code} {code:java} priority:5 - threadId:0x00007fc6c0a4b000 - nativeId:0x270 - nativeId (decimal):624 - state:RUNNABLE stackTrace: java.lang.Thread.State: RUNNABLE at java.util.WeakHashMap.get(WeakHashMap.java:403) at org.apache.commons.beanutils.WrapDynaClass.createDynaClass(WrapDynaClass.java:425) at org.apache.commons.beanutils.WrapDynaClass.createDynaClass(WrapDynaClass.java:404) at org.apache.commons.beanutils.WrapDynaBean.getDynaClass(WrapDynaBean.java:230) at org.apache.commons.beanutils.WrapDynaBean.<init>(WrapDynaBean.java:79) at org.apache.commons.beanutils.WrapDynaBean.<init>(WrapDynaBean.java:61){code} Is there a workaround for now on this ? We are using version: {code:java} <version>1.9.2</version>{code} [~akshaygehi] Can you please let know how to pass the cache instance? should we just create one instance of it and use ? Thank You in advance. was (Author: suvp_nokia): Hi, We had hit the similar issue during below invocation: {code:java} try { bean = new WrapDynaBean(aInChildClass.newInstance()); } catch (InstantiationException e) { getLogger().error(e.getMessage()); }{code} {code:java} priority:5 - threadId:0x00007fc6c0a4b000 - nativeId:0x270 - nativeId (decimal):624 - state:RUNNABLE stackTrace: java.lang.Thread.State: RUNNABLE at java.util.WeakHashMap.get(WeakHashMap.java:403) at org.apache.commons.beanutils.WrapDynaClass.createDynaClass(WrapDynaClass.java:425) at org.apache.commons.beanutils.WrapDynaClass.createDynaClass(WrapDynaClass.java:404) at org.apache.commons.beanutils.WrapDynaBean.getDynaClass(WrapDynaBean.java:230) at org.apache.commons.beanutils.WrapDynaBean.<init>(WrapDynaBean.java:79) at org.apache.commons.beanutils.WrapDynaBean.<init>(WrapDynaBean.java:61){code} Is there a workaround for now on this ? We are using version: {code:java} <version>1.9.2</version>{code} Thank You in advance. > 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 > > Time Spent: 10m > Remaining Estimate: 0h > > 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 (v8.3.4#803005)