You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flume.apache.org by "Brock Noland (JIRA)" <ji...@apache.org> on 2013/01/17 01:30:14 UTC

[jira] [Commented] (FLUME-1854) Application class can deadlock if stopped immediately after start

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

Brock Noland commented on FLUME-1854:
-------------------------------------

Application.handleConfigurationEvent is synchronized so that it cannot be called by multiple threads. stop/start should also be synchronized so they cannot be called during startup or handling of a configuration event.
                
> Application class can deadlock if stopped immediately after start
> -----------------------------------------------------------------
>
>                 Key: FLUME-1854
>                 URL: https://issues.apache.org/jira/browse/FLUME-1854
>             Project: Flume
>          Issue Type: Bug
>            Reporter: Brock Noland
>            Assignee: Brock Noland
>
> Only appears to affect shutting down the agent when it's still being started.
> {noformat}
> "agent-shutdown-hook" prio=10 tid=0x00000000460b7800 nid=0x5c41 waiting on condition [0x0000000042484000]
>    java.lang.Thread.State: TIMED_WAITING (parking)
>         at sun.misc.Unsafe.park(Native Method)
>         - parking to wait for  <0x00000000f9ec4a08> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
>         at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:196)
>         at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2025)
>         at java.util.concurrent.ThreadPoolExecutor.awaitTermination(ThreadPoolExecutor.java:1253)
>         at java.util.concurrent.Executors$DelegatedExecutorService.awaitTermination(Executors.java:597)
>         at org.apache.flume.node.PollingPropertiesFileConfigurationProvider.stop(PollingPropertiesFileConfigurationProvider.java:87)
>         at org.apache.flume.lifecycle.LifecycleSupervisor.stop(LifecycleSupervisor.java:106)
>         - locked <0x00000000f9ed2258> (a org.apache.flume.lifecycle.LifecycleSupervisor)
>         at org.apache.flume.node.Application.stop(Application.java:92)
>         at org.apache.flume.node.Application$1.run(Application.java:302)
> "conf-file-poller-0" prio=10 tid=0x000000004610a000 nid=0x5c2b waiting for monitor entry [0x0000000042180000]
>    java.lang.Thread.State: BLOCKED (on object monitor)
>         at org.apache.flume.lifecycle.LifecycleSupervisor.supervise(LifecycleSupervisor.java:125)
>         - waiting to lock <0x00000000f9ed2258> (a org.apache.flume.lifecycle.LifecycleSupervisor)
>         at org.apache.flume.node.Application.startAllComponents(Application.java:146)
>         at org.apache.flume.node.Application.handleConfigurationEvent(Application.java:88)
>         - locked <0x00000000f9eccc88> (a org.apache.flume.node.Application)
>         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 com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:68)
>         at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
>         - locked <0x00000000f9ee5fa0> (a com.google.common.eventbus.SynchronizedEventHandler)
>         at com.google.common.eventbus.EventBus.dispatch(EventBus.java:313)
>         at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
>         at com.google.common.eventbus.EventBus.post(EventBus.java:264)
>         at org.apache.flume.node.PollingPropertiesFileConfigurationProvider$FileWatcherRunnable.run(PollingPropertiesFileConfigurationProvider.java:140)
>         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
>         at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
>         at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204)
>         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)
> {noformat}

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