[
https://issues.apache.org/jira/browse/HIVE-13599?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Siddharth Seth updated HIVE-13599:
----------------------------------
Attachment: HIVE-13599.01.patch
The exception trace itself is not very damaging - this was a result of using an
incorrect method on the queue - remove which throws an Exception, instead of
poll which returns a null. The code following this assumed a null return.
However, there's definitely problems with the way the preemption queue was
being updated in various cases - as Prasanth pointed out - an incorrect type
was being used in one case. Also the isInPreemptionQueue status was not being
updated properly.
The patch fixes this, and adds a couple of unit tests to verify the state of
the preemption queue - including when finishable state changed notifications
are received.
> LLAP: Race condition when task scheduler pre-emption is enabled
> ---------------------------------------------------------------
>
> Key: HIVE-13599
> URL: https://issues.apache.org/jira/browse/HIVE-13599
> Project: Hive
> Issue Type: Bug
> Components: llap
> Affects Versions: 2.1.0
> Reporter: Prasanth Jayachandran
> Assignee: Siddharth Seth
> Priority: Critical
> Attachments: HIVE-13599.01.patch
>
>
> When running some tests with pre-emption enabled, got the following exception
> Looks like a race condition when removing items from pre-emption queue.
> {code}
> 16/04/23 23:32:00 [Wait-Queue-Scheduler-0[]] ERROR impl.TaskExecutorService :
> Wait queue scheduler worker exited with failure!
> java.util.NoSuchElementException
> at java.util.AbstractQueue.remove(AbstractQueue.java:117)
> ~[?:1.7.0_55]
> at
> org.apache.hadoop.hive.llap.daemon.impl.TaskExecutorService.removeAndGetFromPreemptionQueue(TaskExecutorService.java:568)
> ~[hive-llap-server-2.1.0-SNAPSHOT.jar:2.1.0-SNAPSHOT]
> at
> org.apache.hadoop.hive.llap.daemon.impl.TaskExecutorService.handleScheduleAttemptedRejection(TaskExecutorService.java:493)
> ~[hive-llap-server-2.1.0-SNAPSHOT.jar:2.1.0-SNAPSHOT]
> at
> org.apache.hadoop.hive.llap.daemon.impl.TaskExecutorService.access$1100(TaskExecutorService.java:81)
> ~[hive-llap-server-2.1.0-SNAPSHOT.jar:2.1.0-SNAPSHOT]
> at
> org.apache.hadoop.hive.llap.daemon.impl.TaskExecutorService$WaitQueueWorker.run(TaskExecutorService.java:285)
> ~[hive-llap-server-2.1.0-SNAPSHOT.jar:2.1.0-SNAPSHOT]
> at
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
> ~[?:1.7.0_55]
> at java.util.concurrent.FutureTask.run(FutureTask.java:262)
> [?:1.7.0_55]
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> [?:1.7.0_55]
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> [?:1.7.0_55]
> at java.lang.Thread.run(Thread.java:745) [?:1.7.0_55]
> 16/04/23 23:32:00 [Wait-Queue-Scheduler-0[]] INFO impl.LlapDaemon :
> UncaughtExceptionHandler invoked
> 16/04/23 23:32:00 [Wait-Queue-Scheduler-0[]] ERROR impl.LlapDaemon : Thread
> Thread[Wait-Queue-Scheduler-0,5,main] threw an Exception. Shutting down now...
> java.util.NoSuchElementException
> at java.util.AbstractQueue.remove(AbstractQueue.java:117)
> ~[?:1.7.0_55]
> at
> org.apache.hadoop.hive.llap.daemon.impl.TaskExecutorService.removeAndGetFromPreemptionQueue(TaskExecutorService.java:568)
> ~[hive-llap-server-2.1.0-SNAPSHOT.jar:2.1.0-SNAPSHOT]
> at
> org.apache.hadoop.hive.llap.daemon.impl.TaskExecutorService.handleScheduleAttemptedRejection(TaskExecutorService.java:493)
> ~[hive-llap-server-2.1.0-SNAPSHOT.jar:2.1.0-SNAPSHOT]
> at
> org.apache.hadoop.hive.llap.daemon.impl.TaskExecutorService.access$1100(TaskExecutorService.java:81)
> ~[hive-llap-server-2.1.0-SNAPSHOT.jar:2.1.0-SNAPSHOT]
> at
> org.apache.hadoop.hive.llap.daemon.impl.TaskExecutorService$WaitQueueWorker.run(TaskExecutorService.java:285)
> ~[hive-llap-server-2.1.0-SNAPSHOT.jar:2.1.0-SNAPSHOT]
> at
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
> ~[?:1.7.0_55]
> at java.util.concurrent.FutureTask.run(FutureTask.java:262)
> [?:1.7.0_55]
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> [?:1.7.0_55]
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> [?:1.7.0_55]
> at java.lang.Thread.run(Thread.java:745) [?:1.7.0_55]
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)