geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Amichai Rothman (JIRA)" <j...@apache.org>
Subject [jira] [Created] (GERONIMO-6425) deadlock involving Karaf Shell and Blueprint Extender
Date Tue, 18 Dec 2012 11:36:13 GMT
Amichai Rothman created GERONIMO-6425:
-----------------------------------------

             Summary: deadlock involving Karaf Shell and Blueprint Extender
                 Key: GERONIMO-6425
                 URL: https://issues.apache.org/jira/browse/GERONIMO-6425
             Project: Geronimo
          Issue Type: Bug
      Security Level: public (Regular issues)
          Components: console
    Affects Versions: 3.0.0
         Environment: Kubuntu 12.10, Oracle Java 1.7.0_10 x64, Geronimo 3.0.0
            Reporter: Amichai Rothman


I stumbled upon this deadlock while redeploying some bundles to hotbundles directory. geronimo
foreground process seemed to be stuck, so I sent it a SIGQUIT and got the stack trace which
detected the deadlock below. The two stack trace lines from our own project contain trivial
System.out.println/format calls.



Found one Java-level deadlock:=============================

"Karaf Shell Console Thread":  waiting to lock monitor 0x00007f6030d738b8 (object 0x00000000f099fbf0,
a java.io.PrintStream),  which is held by "Blueprint Extender: 2"

"Blueprint Extender: 2":  waiting to lock monitor 0x00007f5fdc0012b0 (object 0x00000000f5ce8698,
a java.lang.Object),  which is held by "Blueprint Extender: 3"

"Blueprint Extender: 3":  waiting to lock monitor 0x00007f6030d738b8 (object 0x00000000f099fbf0,
a java.io.PrintStream),  which is held by "Blueprint Extender: 2"

Java stack information for the threads listed above:===================================================

"Karaf Shell Console Thread":
        at java.io.PrintStream.write(PrintStream.java:447)
        - waiting to lock <0x00000000f099fbf0> (a java.io.PrintStream)
        at java.io.FilterOutputStream.write(FilterOutputStream.java:77)
        at java.io.FilterOutputStream.write(FilterOutputStream.java:125)
        at java.io.PrintStream.write(PrintStream.java:480)
        - locked <0x00000000f05ccd78> (a java.io.PrintStream)
        at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:221)
        at sun.nio.cs.StreamEncoder.implFlushBuffer(StreamEncoder.java:291)
        at sun.nio.cs.StreamEncoder.implFlush(StreamEncoder.java:295)
        at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:141)
        - locked <0x00000000f03df468> (a java.io.OutputStreamWriter)
        at java.io.OutputStreamWriter.flush(OutputStreamWriter.java:229)
        at java.io.BufferedWriter.flush(BufferedWriter.java:254)
        - locked <0x00000000f03df468> (a java.io.OutputStreamWriter)
        at java.io.PrintWriter.flush(PrintWriter.java:320)
        - locked <0x00000000f03df438> (a java.io.BufferedWriter)
        at jline.console.ConsoleReader.flush(ConsoleReader.java:631)
        at jline.console.ConsoleReader.readLine(ConsoleReader.java:1244)
        at jline.console.ConsoleReader.readLine(ConsoleReader.java:1080)
        at org.apache.karaf.shell.console.jline.Console.run(Console.java:217)
        at java.lang.Thread.run(Thread.java:722)

"Blueprint Extender: 2":
        at org.apache.aries.blueprint.container.ServiceRecipe.internalGetService(ServiceRecipe.java:247)
        - waiting to lock <0x00000000f5ce8698> (a java.lang.Object)
        at org.apache.aries.blueprint.container.ServiceRecipe.getService(ServiceRecipe.java:327)
        at org.apache.aries.blueprint.container.ServiceRecipe$TriggerServiceFactory.getService(ServiceRecipe.java:430)
        at org.eclipse.osgi.internal.serviceregistry.ServiceUse$1.run(ServiceUse.java:138)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.eclipse.osgi.internal.serviceregistry.ServiceUse.getService(ServiceUse.java:136)
        at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.getService(ServiceRegistrationImpl.java:468)
        - locked <0x00000000f5ce8ef8> (a org.eclipse.osgi.internal.serviceregistry.ServiceUse)
        at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.getService(ServiceRegistry.java:467)
        at org.eclipse.osgi.framework.internal.core.BundleContextImpl.getService(BundleContextImpl.java:594)
        at org.apache.aries.blueprint.container.BlueprintContainerImpl.getService(BlueprintContainerImpl.java:416)
        at org.apache.aries.blueprint.container.ReferenceListRecipe$ServiceDispatcher.call(ReferenceListRecipe.java:199)
        - locked <0x00000000f5cf9a30> (a org.apache.aries.blueprint.container.ReferenceListRecipe$ServiceDispatcher)
        at org.apache.aries.proxy.impl.ProxyHandler$1.invoke(ProxyHandler.java:50)
        at org.apache.aries.proxy.impl.DefaultWrapper.invoke(DefaultWrapper.java:31)
        at org.apache.aries.proxy.impl.ProxyHandler.invoke(ProxyHandler.java:78)
        at $Proxy115.toString(Unknown Source)
        at java.util.Formatter$FormatSpecifier.printString(Formatter.java:2838)
        at java.util.Formatter$FormatSpecifier.print(Formatter.java:2718)
        at java.util.Formatter.format(Formatter.java:2488)
        at java.io.PrintStream.format(PrintStream.java:970)
        - locked <0x00000000f099fbf0> (a java.io.PrintStream)
        at org.apache.felix.gogo.runtime.threadio.ThreadPrintStream.format(ThreadPrintStream.java:220)
        at com.example.project.common.framework.ServiceProxy.bind(ServiceProxy.java:129)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        at org.apache.aries.blueprint.utils.ReflectionUtils.invoke(ReflectionUtils.java:226)
        at org.apache.aries.blueprint.container.AbstractServiceReferenceRecipe$Listener.invokeMethods(AbstractServiceReferenceRecipe.java:465)
        at org.apache.aries.blueprint.container.AbstractServiceReferenceRecipe$Listener.bind(AbstractServiceReferenceRecipe.java:430)
        at org.apache.aries.blueprint.container.AbstractServiceReferenceRecipe.bind(AbstractServiceReferenceRecipe.java:327)
        at org.apache.aries.blueprint.container.ReferenceListRecipe.track(ReferenceListRecipe.java:130)
        - locked <0x00000000f5ce96e0> (a java.lang.Object)
        at org.apache.aries.blueprint.container.ReferenceListRecipe.retrack(ReferenceListRecipe.java:88)
        at org.apache.aries.blueprint.container.AbstractServiceReferenceRecipe.updateListeners(AbstractServiceReferenceRecipe.java:319)
        at org.apache.aries.blueprint.container.ReferenceListRecipe.internalCreate(ReferenceListRecipe.java:74)
        at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:64)
        - locked <0x00000000f5cf7490> (a java.lang.Object)
        at org.apache.aries.blueprint.di.RefRecipe.internalCreate(RefRecipe.java:60)
        at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:64)
        - locked <0x00000000f5cf7490> (a java.lang.Object)
        at org.apache.aries.blueprint.container.BeanRecipe.setProperty(BeanRecipe.java:799)
        at org.apache.aries.blueprint.container.BeanRecipe.setProperties(BeanRecipe.java:773)
        at org.apache.aries.blueprint.container.BeanRecipe.setProperties(BeanRecipe.java:754)
        at org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:720)
        at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:64)
        - locked <0x00000000f5cf7490> (a java.lang.Object)
        at org.apache.aries.blueprint.di.RefRecipe.internalCreate(RefRecipe.java:60)
        at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:64)
        - locked <0x00000000f5cf7490> (a java.lang.Object)
        at org.apache.aries.blueprint.container.BeanRecipe.setProperty(BeanRecipe.java:799)
        at org.apache.aries.blueprint.container.BeanRecipe.setProperties(BeanRecipe.java:773)
        at org.apache.aries.blueprint.container.BeanRecipe.setProperties(BeanRecipe.java:754)
        at org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:720)
        at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:64)
        - locked <0x00000000f5cf7490> (a java.lang.Object)
        at org.apache.aries.blueprint.container.BlueprintRepository.createInstances(BlueprintRepository.java:219)
        - locked <0x00000000f5cf7490> (a java.lang.Object)
        at org.apache.aries.blueprint.container.BlueprintRepository.createAll(BlueprintRepository.java:147)
        at org.apache.aries.blueprint.container.BlueprintContainerImpl.instantiateEagerComponents(BlueprintContainerImpl.java:640)
        at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:331)
        at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:227)
        - locked <0x00000000f5cf7ca8> (a java.util.concurrent.atomic.AtomicBoolean)
        - locked <0x00000000f5cf7c98> (a java.util.concurrent.atomic.AtomicBoolean)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
        at java.util.concurrent.FutureTask.run(FutureTask.java:166)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
        at java.lang.Thread.run(Thread.java:722)

"Blueprint Extender: 3":
        at java.io.PrintStream.println(PrintStream.java:806)
        - waiting to lock <0x00000000f099fbf0> (a java.io.PrintStream)
        at org.apache.felix.gogo.runtime.threadio.ThreadPrintStream.println(ThreadPrintStream.java:200)
        at com.example.project.common.framework.BasicServiceImpl.init(BasicServiceImpl.java:33)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        at org.apache.aries.blueprint.utils.ReflectionUtils.invoke(ReflectionUtils.java:226)
        at org.apache.aries.blueprint.container.BeanRecipe.invoke(BeanRecipe.java:824)
        at org.apache.aries.blueprint.container.BeanRecipe.runBeanProcInit(BeanRecipe.java:636)
        at org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:724)
        at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:64)
        - locked <0x00000000f5ce8698> (a java.lang.Object)
        at org.apache.aries.blueprint.container.BlueprintRepository.createInstances(BlueprintRepository.java:219)
        - locked <0x00000000f5ce8698> (a java.lang.Object)
        at org.apache.aries.blueprint.container.BlueprintRepository.createAll(BlueprintRepository.java:147)
        at org.apache.aries.blueprint.container.BlueprintContainerImpl.instantiateEagerComponents(BlueprintContainerImpl.java:640)
        at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:331)
        at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:227)
        - locked <0x00000000f5ce8a98> (a java.util.concurrent.atomic.AtomicBoolean)
        - locked <0x00000000f5ce8a88> (a java.util.concurrent.atomic.AtomicBoolean)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
        at java.util.concurrent.FutureTask.run(FutureTask.java:166)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
        at java.lang.Thread.run(Thread.java:722)Found 1 deadlock.


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message