Uploaded image for project: 'Aurora'
  1. Aurora
  2. AURORA-801

deadlock in scheduler startup

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • None
    • 0.6.0
    • Scheduler
    • None
    • Aurora Q4 Sprint 1

    Description

      The recently-added update code adds a deadlock to the scheduler whenever there are concurrent SchedulerActive and TasksDeleted events on the EventBus.

      Relevant bits from /threads

      Name: AsyncProcessor-0
      State: BLOCKED
      Daemon: true
      ID: 2461
          org.apache.aurora.scheduler.updater.JobUpdateEventSubscriber.tasksDeleted(JobUpdateEventSubscriber.java:64)
          sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
          sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          java.lang.reflect.Method.invoke(Method.java:606)
          com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
          com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
          com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
          com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
          com.google.common.eventbus.EventBus.post(EventBus.java:275)
          org.apache.aurora.scheduler.events.PubsubEventModule$2.post(PubsubEventModule.java:68)
          org.apache.aurora.scheduler.state.StateManagerImpl.updateTaskAndExternalState(StateManagerImpl.java:443)
          org.apache.aurora.scheduler.state.StateManagerImpl.access$100(StateManagerImpl.java:80)
          org.apache.aurora.scheduler.state.StateManagerImpl$8.execute(StateManagerImpl.java:460)
          org.apache.aurora.scheduler.storage.Storage$MutateWork$NoResult.apply(Storage.java:132)
          org.apache.aurora.scheduler.storage.Storage$MutateWork$NoResult$Quiet.apply(Storage.java:149)
          org.apache.aurora.scheduler.storage.log.LogStorage$7.apply(LogStorage.java:559)
          org.apache.aurora.scheduler.storage.log.LogStorage$7.apply(LogStorage.java:556)
          org.apache.aurora.scheduler.storage.mem.MemStorage.doWork(MemStorage.java:175)
          org.apache.aurora.scheduler.storage.mem.MemStorage.access$400(MemStorage.java:59)
          org.apache.aurora.scheduler.storage.mem.MemStorage$4.apply(MemStorage.java:200)
          org.apache.aurora.scheduler.storage.mem.MemStorage$4.apply(MemStorage.java:197)
          org.apache.aurora.scheduler.storage.db.DbStorage.write(DbStorage.java:150)
          org.apache.aurora.scheduler.storage.db.DbStorage$$EnhancerByGuice$$51136dc.CGLIB$write$0(<generated>)
          org.apache.aurora.scheduler.storage.db.DbStorage$$EnhancerByGuice$$51136dc$$FastClassByGuice$$8e80cfa0.invoke(<generated>)
          com.google.inject.internal.cglib.proxy.$MethodProxy.invokeSuper(MethodProxy.java:228)
          com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:72)
          org.mybatis.guice.transactional.TransactionalMethodInterceptor.invoke(TransactionalMethodInterceptor.java:101)
          com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:72)
          com.google.inject.internal.InterceptorStackCallback.intercept(InterceptorStackCallback.java:52)
          org.apache.aurora.scheduler.storage.db.DbStorage$$EnhancerByGuice$$51136dc.write(<generated>)
          org.apache.aurora.scheduler.storage.mem.MemStorage.write(MemStorage.java:197)
          org.apache.aurora.scheduler.storage.log.LogStorage.write(LogStorage.java:556)
          org.apache.aurora.scheduler.storage.CallOrderEnforcingStorage.write(CallOrderEnforcingStorage.java:130)
          org.apache.aurora.scheduler.state.StateManagerImpl.deleteTasks(StateManagerImpl.java:451)
          org.apache.aurora.scheduler.async.HistoryPruner.deleteTasks(HistoryPruner.java:126)
          org.apache.aurora.scheduler.async.HistoryPruner.access$500(HistoryPruner.java:51)
          org.apache.aurora.scheduler.async.HistoryPruner$3.run(HistoryPruner.java:164)
          java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
          java.util.concurrent.FutureTask.run(FutureTask.java:262)
          java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)
          java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)
          java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
          java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
          java.lang.Thread.run(Thread.java:745)
      
      Name: Lifecycle-0
      State: BLOCKED
      Daemon: true
      ID: 2462
          org.apache.aurora.scheduler.storage.log.LogStorage.write(LogStorage.java:544)
          org.apache.aurora.scheduler.storage.CallOrderEnforcingStorage.write(CallOrderEnforcingStorage.java:130)
          org.apache.aurora.scheduler.updater.JobUpdateControllerImpl.systemResume(JobUpdateControllerImpl.java:195)
          org.apache.aurora.scheduler.updater.JobUpdateEventSubscriber.schedulerActive(JobUpdateEventSubscriber.java:83)
          sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
          sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          java.lang.reflect.Method.invoke(Method.java:606)
          com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
          com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
          com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
          com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
          com.google.common.eventbus.EventBus.post(EventBus.java:275)
          org.apache.aurora.scheduler.events.PubsubEventModule$2.post(PubsubEventModule.java:68)
          org.apache.aurora.scheduler.SchedulerLifecycle$7$2.run(SchedulerLifecycle.java:336)
          java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
          java.util.concurrent.FutureTask.run(FutureTask.java:262)
          java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)
          java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)
          java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
          java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
          java.lang.Thread.run(Thread.java:745)
      
      

      Attachments

        Issue Links

          Activity

            People

              kevints Kevin Sweeney
              kevints Kevin Sweeney
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Agile

                  Completed Sprint:
                  Aurora Q4 Sprint 1 ended 20/Oct/14
                  View on Board

                  Slack

                    Issue deployment