Skip to content
Commit dc33ee01 authored by Kohsuke Kawaguchi's avatar Kohsuke Kawaguchi
Browse files

Avoiding deadlock between ClassLoader lock and extension loading lock:

Java stack information for the threads listed above:
===================================================
"Finalizing set up":
	at hudson.ExtensionList.ensureLoaded(ExtensionList.java:228)
	- waiting to lock <0x00000007d6e841a0> (a hudson.ExtensionList$Lock)
	at hudson.ExtensionList.getComponents(ExtensionList.java:147)
	at hudson.DescriptorExtensionList.load(DescriptorExtensionList.java:181)
	at hudson.ExtensionList.ensureLoaded(ExtensionList.java:229)
	- locked <0x00000007d703e9b8> (a hudson.DescriptorExtensionList)
	at hudson.ExtensionList.size(ExtensionList.java:155)
	at java.util.AbstractCollection.isEmpty(AbstractCollection.java:69)
	at hudson.model.labels.LabelAtom.updateTransientActions(LabelAtom.java:106)
	at hudson.model.labels.LabelAtom.load(LabelAtom.java:188)
	at jenkins.model.Jenkins.getLabelAtom(Jenkins.java:1501)
	at jenkins.model.Jenkins.getSelfLabel(Jenkins.java:2295)
	at hudson.model.Node.getAssignedLabels(Node.java:240)
	at jenkins.model.Jenkins$15.run(Jenkins.java:2354)
	at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:146)
	at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:259)
	at jenkins.model.Jenkins$5.runTask(Jenkins.java:795)
	at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:187)
	at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:94)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	at java.lang.Thread.run(Thread.java:662)
"UpdateCenter.init":
	at java.lang.ClassLoader.loadClass(ClassLoader.java:291)
	- waiting to lock <0x000000078313d878> (a java.net.URLClassLoader)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:295)
	- locked <0x000000078318ace8> (a hudson.PluginManager$UberClassLoader)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
	at net.java.sezpoz.IndexItem.element(IndexItem.java:134)
	at hudson.ExtensionFinder$Sezpoz.scout(ExtensionFinder.java:204)
	at hudson.ClassicPluginStrategy.findComponents(ClassicPluginStrategy.java:275)
	at hudson.ExtensionList.load(ExtensionList.java:258)
	at hudson.ExtensionList.ensureLoaded(ExtensionList.java:229)
	- locked <0x00000007d6e841a0> (a hudson.ExtensionList$Lock)
	at hudson.ExtensionList.iterator(ExtensionList.java:136)
	at hudson.ClassicPluginStrategy.findComponents(ClassicPluginStrategy.java:274)
	at hudson.ExtensionList.load(ExtensionList.java:258)
	at hudson.ExtensionList.ensureLoaded(ExtensionList.java:229)
	- locked <0x00000007d6e841a0> (a hudson.ExtensionList$Lock)
	at hudson.ExtensionList.iterator(ExtensionList.java:136)
	at hudson.model.listeners.SaveableListener.fireOnChange(SaveableListener.java:77)
	at hudson.model.UpdateCenter.save(UpdateCenter.java:416)
	- locked <0x00000007d68f5ad0> (a hudson.model.UpdateCenter)
	at hudson.util.PersistedList.onModified(PersistedList.java:152)
	at hudson.util.PersistedList.add(PersistedList.java:69)
	at hudson.model.UpdateCenter.load(UpdateCenter.java:446)
	- locked <0x00000007d68f5ad0> (a hudson.model.UpdateCenter)
	at hudson.model.UpdateCenter.init(UpdateCenter.java:1255)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at hudson.init.InitializerFinder.invoke(InitializerFinder.java:110)
	at hudson.init.InitializerFinder$TaskImpl.run(InitializerFinder.java:174)
	at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:259)
	at jenkins.model.Jenkins$5.runTask(Jenkins.java:795)
	at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:187)
	at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:94)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	at java.lang.Thread.run(Thread.java:662)
"Executor #1 for master : executing test0 #1":
	at hudson.ExtensionList.ensureLoaded(ExtensionList.java:228)
	- waiting to lock <0x00000007d6e841a0> (a hudson.ExtensionList$Lock)
	at hudson.ExtensionList.getComponents(ExtensionList.java:147)
	at hudson.DescriptorExtensionList.load(DescriptorExtensionList.java:181)
	at hudson.ExtensionList.ensureLoaded(ExtensionList.java:229)
	- locked <0x00000007d73c3fb0> (a hudson.DescriptorExtensionList)
	at hudson.ExtensionList.iterator(ExtensionList.java:136)
	at hudson.model.User.load(User.java:146)
	- locked <0x00000007d73c35a0> (a hudson.model.User)
	at hudson.model.User.<init>(User.java:117)
	at hudson.model.User.get(User.java:298)
	- locked <0x00000007832cb6b0> (a java.util.TreeMap)
	at hudson.model.User.get(User.java:311)
	at hudson.model.User.current(User.java:323)
	at hudson.model.Executor.interrupt(Executor.java:125)
	at hudson.model.Executor.interrupt(Executor.java:114)
	at sun.misc.Resource.getBytes(Resource.java:133)
	at java.net.URLClassLoader.defineClass(URLClassLoader.java:257)
	at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
	- locked <0x000000078313d878> (a java.net.URLClassLoader)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
	at hudson.tasks.BuildTrigger.execute(BuildTrigger.java:198)
	at hudson.model.AbstractBuild$AbstractRunner.cleanUp(AbstractBuild.java:622)
	at hudson.model.Build$RunnerImpl.cleanUp(Build.java:173)
	at hudson.model.Run.run(Run.java:1420)
	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
	at hudson.model.ResourceController.execute(ResourceController.java:88)
	at hudson.model.Executor.run(Executor.java:229)
parent ba261c1f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment