Deadlock in hudson.model.Actionable.getActions() when using parallel builds with m2 project type

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Deadlock in hudson.model.Actionable.getActions() when using parallel builds with m2 project type

Ulli Hafner
Hi,

I'm getting a deadlock when my plug-ins are used in a m2 job and these
job has two parallel builds running.

Seems that my call to hudson.model.Actionable.getActions() in the method
MavenAggregatedReport.update() causes the dead lock. Is there a way to
improve the synchonized block in the
hudson.maven.MavenModuleSetBuild.notifyModuleBuild() method? Or is there
anything I can do here in my code to prevent the dead lock?

Thanks Ulli

[Full thread dump is in http://issues.hudson-ci.org/browse/HUDSON-6968]

"pool-5-thread-15" Id=74 Group=main BLOCKED on hudson.maven.MavenModuleSetBuild@2e9803 owned by "pool-5-thread-21" Id=80
        at hudson.model.Actionable.getActions(Actionable.java:60)
        -  blocked on hudson.maven.MavenModuleSetBuild@2e9803
        at hudson.maven.MavenModuleSet.addTransientActionsFromBuild(MavenModuleSet.java:216)
        at hudson.maven.MavenModuleSet.addTransientActionsFromBuild(MavenModuleSet.java:64)
        at hudson.maven.AbstractMavenProject.updateTransientActions(AbstractMavenProject.java:55)
        -  locked java.util.Vector@1359c0b
        at hudson.maven.MavenModuleSet.updateTransientActions(MavenModuleSet.java:199)
        at hudson.maven.MavenModuleSetBuild.notifyModuleBuild(MavenModuleSetBuild.java:360)
        -  locked hudson.maven.MavenModuleSetBuild@16c6746
        at hudson.maven.MavenBuild$ProxyImpl2.end(MavenBuild.java:419)
        at sun.reflect.GeneratedMethodAccessor120.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at hudson.model.Executor$1.call(Executor.java:378)
        at hudson.util.InterceptingProxy$1.invoke(InterceptingProxy.java:23)
        at $Proxy19.end(Unknown Source)
        at sun.reflect.GeneratedMethodAccessor119.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at hudson.remoting.RemoteInvocationHandler$RPCRequest.perform(RemoteInvocationHandler.java:274)
        at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:255)
        at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:215)
        at hudson.remoting.UserRequest.perform(UserRequest.java:114)
        at hudson.remoting.UserRequest.perform(UserRequest.java:48)
        at hudson.remoting.Request$2.run(Request.java:270)
        at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
        at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
        at java.util.concurrent.FutureTask.run(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)

        Number of locked synchronizers = 1
        - java.util.concurrent.locks.ReentrantLock$NonfairSync@97a214

pool-5-thread-21

"pool-5-thread-21" Id=80 Group=main BLOCKED on hudson.maven.MavenModuleSetBuild@16c6746 owned by "pool-5-thread-15" Id=74
        at hudson.model.Actionable.getActions(Actionable.java:60)
        -  blocked on hudson.maven.MavenModuleSetBuild@16c6746
        at hudson.model.Actionable.getAction(Actionable.java:104)
        at hudson.plugins.analysis.core.BuildHistory.getReferenceAction(BuildHistory.java:71)
        at hudson.plugins.analysis.core.BuildHistory.getReferenceAnnotations(BuildHistory.java:56)
        at hudson.plugins.analysis.core.BuildResult.initialize(BuildResult.java:236)
        at hudson.plugins.analysis.core.BuildResult.(BuildResult.java:200)
        at hudson.plugins.checkstyle.CheckStyleResult.(CheckStyleResult.java:33)
        at hudson.plugins.checkstyle.MavenCheckStyleResultAction.update(MavenCheckStyleResultAction.java:89)
        at hudson.maven.MavenModuleSetBuild.notifyModuleBuild(MavenModuleSetBuild.java:341)
        -  locked hudson.maven.MavenModuleSetBuild@2e9803
        at hudson.maven.MavenBuild$ProxyImpl2.end(MavenBuild.java:419)
        at sun.reflect.GeneratedMethodAccessor120.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at hudson.model.Executor$1.call(Executor.java:378)
        at hudson.util.InterceptingProxy$1.invoke(InterceptingProxy.java:23)
        at $Proxy19.end(Unknown Source)
        at sun.reflect.GeneratedMethodAccessor119.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at hudson.remoting.RemoteInvocationHandler$RPCRequest.perform(RemoteInvocationHandler.java:274)
        at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:255)
        at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:215)
        at hudson.remoting.UserRequest.perform(UserRequest.java:114)
        at hudson.remoting.UserRequest.perform(UserRequest.java:48)
        at hudson.remoting.Request$2.run(Request.java:270)
        at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
        at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
        at java.util.concurrent.FutureTask.run(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)

        Number of locked synchronizers = 1
        - java.util.concurrent.locks.ReentrantLock$NonfairSync@b483bf




---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]