Uploaded image for project: 'Flume'
  1. Flume
  2. FLUME-3117

Application can be dead loop when call System.exit() in methodconfigure

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.7.0
    • 1.8.1, 1.9.0
    • Sinks+Sources
    • None

    Description

      When call System.exit(-1) in method configure of a source , application will run into dead loop and persistently print "Waiting for file watcher to terminate".

      "agent-shutdown-hook" #11 prio=5 os_prio=0 tid=0x00007f1d68018800 nid=0x7f6f waiting on condition [0x00007f1d9b163000]
         java.lang.Thread.State: TIMED_WAITING (parking)
      	at sun.misc.Unsafe.park(Native Method)
      	- parking to wait for  <0x00000000fb816f30> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
      	at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
      	at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078)
      	at java.util.concurrent.ThreadPoolExecutor.awaitTermination(ThreadPoolExecutor.java:1465)
      	at java.util.concurrent.Executors$DelegatedExecutorService.awaitTermination(Executors.java:675)
      	at org.apache.flume.node.PollingPropertiesFileConfigurationProvider.stop(PollingPropertiesFileConfigurationProvider.java:88)
      	at org.apache.flume.lifecycle.LifecycleSupervisor.stop(LifecycleSupervisor.java:104)
      	- locked <0x00000000fb5e1fa8> (a org.apache.flume.lifecycle.LifecycleSupervisor)
      	at org.apache.flume.node.Application.stop(Application.java:92)
      	- locked <0x00000000fb5d2418> (a org.apache.flume.node.Application)
      	at org.apache.flume.node.Application$1.run(Application.java:343)
      
         Locked ownable synchronizers:
      	- None
      
      "conf-file-poller-0" #13 prio=5 os_prio=0 tid=0x00007f1d64009800 nid=0x7f6d in Object.wait() [0x00007f1d9b364000]
         java.lang.Thread.State: WAITING (on object monitor)
      	at java.lang.Object.wait(Native Method)
      	- waiting on <0x00000000fb6f9230> (a org.apache.flume.node.Application$1)
      	at java.lang.Thread.join(Thread.java:1249)
      	- locked <0x00000000fb6f9230> (a org.apache.flume.node.Application$1)
      	at java.lang.Thread.join(Thread.java:1323)
      	at java.lang.ApplicationShutdownHooks.runHooks(ApplicationShutdownHooks.java:106)
      	at java.lang.ApplicationShutdownHooks$1.run(ApplicationShutdownHooks.java:46)
      	at java.lang.Shutdown.runHooks(Shutdown.java:123)
      	at java.lang.Shutdown.sequence(Shutdown.java:167)
      	at java.lang.Shutdown.exit(Shutdown.java:212)
      	- locked <0x00000000fb3b86a8> (a java.lang.Class for java.lang.Shutdown)
      	at java.lang.Runtime.exit(Runtime.java:109)
      	at java.lang.System.exit(System.java:971)
      	at study.flume_exit.ExitSource.configure(ExitSource.java:28)
      	at org.apache.flume.conf.Configurables.configure(Configurables.java:41)
      	at org.apache.flume.node.AbstractConfigurationProvider.loadSources(AbstractConfigurationProvider.java:326)
      	at org.apache.flume.node.AbstractConfigurationProvider.getConfiguration(AbstractConfigurationProvider.java:101)
      	at org.apache.flume.node.PollingPropertiesFileConfigurationProvider$FileWatcherRunnable.run(PollingPropertiesFileConfigurationProvider.java:141)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
      	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
      	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at java.lang.Thread.run(Thread.java:745)
      
         Locked ownable synchronizers:
      	- <0x00000000fb829588> (a java.util.concurrent.ThreadPoolExecutor$Worker)
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              chamcyl Eli
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: