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 17:49:00 GMT

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

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

For now, I can see that wrapping the weak map into a synchronized map may help but this causes
the build to fail, not because any unit tests fail, but because the Maven Surefire plugin
that runs the tests blows up:
{noformat}
[WARNING] Tests run: 1279, Failures: 0, Errors: 0, Skipped: 3
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 06:15 min
[INFO] Finished at: 2018-10-13T11:28:38-06:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.1:test
(default-test) on project commons-beanutils2: There are test failures.
[ERROR]
[ERROR] Please refer to C:\vcs\svn\apache\commons\trunks-proper\beanutils\target\surefire-reports
for the individual test results.
[ERROR] Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream.
[ERROR] ExecutionException The forked VM terminated without properly saying goodbye. VM crash
or System.exit called?
[ERROR] Command was cmd.exe /X /C ""C:\Program Files\Java\jdk1.8.0_181\jre\bin\java" -Xmx56M
-javaagent:C:\\Users\\ggregory\\.m2\\repository\\org\\jacoco\\org.jacoco.agent\\0.8.2\\org.jacoco.agent-0.8.2-runtime.jar=destfile=C:\\vcs\\svn\\apache\\commons\\trunks-proper\\beanutils\\target\\jacoco.exec
-jar C:\Users\ggregory\AppData\Local\Temp\surefire4491303226062350457\surefirebooter7341664506376672162.jar
C:\Users\ggregory\AppData\Local\Temp\surefire4491303226062350457 2018-10-13T11-22-41_548-jvmRun1
surefire7040480156590727732tmp surefire_356812217102022201471tmp"
[ERROR] Error occurred in starting fork, check output in log
[ERROR] Process Exit Code: 1
[ERROR] org.apache.maven.surefire.booter.SurefireBooterForkException: ExecutionException The
forked VM terminated without properly saying goodbye. VM crash or System.exit called?
[ERROR] Command was cmd.exe /X /C ""C:\Program Files\Java\jdk1.8.0_181\jre\bin\java" -Xmx56M
-javaagent:C:\\Users\\ggregory\\.m2\\repository\\org\\jacoco\\org.jacoco.agent\\0.8.2\\org.jacoco.agent-0.8.2-runtime.jar=destfile=C:\\vcs\\svn\\apache\\commons\\trunks-proper\\beanutils\\target\\jacoco.exec
-jar C:\Users\ggregory\AppData\Local\Temp\surefire4491303226062350457\surefirebooter7341664506376672162.jar
C:\Users\ggregory\AppData\Local\Temp\surefire4491303226062350457 2018-10-13T11-22-41_548-jvmRun1
surefire7040480156590727732tmp surefire_356812217102022201471tmp"
[ERROR] Error occurred in starting fork, check output in log
[ERROR] Process Exit Code: 1
[ERROR]         at org.apache.maven.plugin.surefire.booterclient.ForkStarter.awaitResultsDone(ForkStarter.java:510)
[ERROR]         at org.apache.maven.plugin.surefire.booterclient.ForkStarter.runSuitesForkPerTestSet(ForkStarter.java:457)
[ERROR]         at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:298)
[ERROR]         at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:246)
[ERROR]         at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:1183)
[ERROR]         at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:1011)
[ERROR]         at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:857)
[ERROR]         at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
[ERROR]         at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
[ERROR]         at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:154)
[ERROR]         at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:146)
[ERROR]         at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
[ERROR]         at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
[ERROR]         at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56)
[ERROR]         at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
[ERROR]         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305)
[ERROR]         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192)
[ERROR]         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105)
[ERROR]         at org.apache.maven.cli.MavenCli.execute(MavenCli.java:954)
[ERROR]         at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
[ERROR]         at org.apache.maven.cli.MavenCli.main(MavenCli.java:192)
[ERROR]         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERROR]         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[ERROR]         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[ERROR]         at java.lang.reflect.Method.invoke(Method.java:498)
[ERROR]         at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
[ERROR]         at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
[ERROR]         at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
[ERROR]         at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
[ERROR] Caused by: org.apache.maven.surefire.booter.SurefireBooterForkException: The forked
VM terminated without properly saying goodbye. VM crash or System.exit called?
[ERROR] Command was cmd.exe /X /C ""C:\Program Files\Java\jdk1.8.0_181\jre\bin\java" -Xmx56M
-javaagent:C:\\Users\\ggregory\\.m2\\repository\\org\\jacoco\\org.jacoco.agent\\0.8.2\\org.jacoco.agent-0.8.2-runtime.jar=destfile=C:\\vcs\\svn\\apache\\commons\\trunks-proper\\beanutils\\target\\jacoco.exec
-jar C:\Users\ggregory\AppData\Local\Temp\surefire4491303226062350457\surefirebooter7341664506376672162.jar
C:\Users\ggregory\AppData\Local\Temp\surefire4491303226062350457 2018-10-13T11-22-41_548-jvmRun1
surefire7040480156590727732tmp surefire_356812217102022201471tmp"
[ERROR] Error occurred in starting fork, check output in log
[ERROR] Process Exit Code: 1
[ERROR]         at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:669)
[ERROR]         at org.apache.maven.plugin.surefire.booterclient.ForkStarter.access$600(ForkStarter.java:115)
[ERROR]         at org.apache.maven.plugin.surefire.booterclient.ForkStarter$2.call(ForkStarter.java:444)
[ERROR]         at org.apache.maven.plugin.surefire.booterclient.ForkStarter$2.call(ForkStarter.java:420)
[ERROR]         at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[ERROR]         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[ERROR]         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[ERROR]         at java.lang.Thread.run(Thread.java:748)
[ERROR]
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following
articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
{noformat}
I am using 'mvn clean test' with:
{noformat}
Apache Maven 3.5.4 (1edded0938998edf8bf061f1ceb3cfdeccf443fe; 2018-06-17T12:33:14-06:00)
Maven home: C:\Java\apache-maven-3.5.4\bin\..
Java version: 1.8.0_181, vendor: Oracle Corporation, runtime: C:\Program Files\Java\jdk1.8.0_181\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
{noformat}
There is obviously something stuck, hanging or crashing.

[~akshaygehi] or anyone: Can you reproduce this?

My attached patch updates Surefire and Jacoco to their respective current versions, to no
avail.

Thank you,
Gary

> 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: 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