drill-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DRILL-6295) PartitionerDecorator may close partitioners while CustomRunnable are active during query cancellation
Date Mon, 16 Apr 2018 21:41:00 GMT

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

ASF GitHub Bot commented on DRILL-6295:
---------------------------------------

Github user ilooner commented on a diff in the pull request:

    https://github.com/apache/drill/pull/1208#discussion_r181894189
  
    --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/partitionsender/PartitionerTemplate.java
---
    @@ -161,8 +161,11 @@ public OperatorStats getStats() {
        * @param schemaChanged  true if the schema has changed
        */
       @Override
    -  public void flushOutgoingBatches(boolean isLastBatch, boolean schemaChanged) throws
IOException {
    +  public void flushOutgoingBatches(boolean isLastBatch, boolean schemaChanged) throws
IOException, InterruptedException {
         for (OutgoingRecordBatch batch : outgoingBatches) {
    +      if (Thread.interrupted()) {
    +        throw new InterruptedException();
    --- End diff --
    
    Since we are checking for interrupts here already could we remove `Thread.currentThread().isInterrupted()`
in the flush(boolean schemaChanged) method?


> PartitionerDecorator may close partitioners while CustomRunnable are active during query
cancellation
> -----------------------------------------------------------------------------------------------------
>
>                 Key: DRILL-6295
>                 URL: https://issues.apache.org/jira/browse/DRILL-6295
>             Project: Apache Drill
>          Issue Type: Bug
>            Reporter: Vlad Rozov
>            Assignee: Vlad Rozov
>            Priority: Critical
>             Fix For: 1.14.0
>
>
> During query cancellation, in case {{PartitionerDecorator.executeMethodLogic()}} is active
(waiting on the {{latch}}), the wait will be interrupted and {{Futures}} cancelled, but there
is no guarantee that all {{CustomRunnable}} terminate before returning from {{PartitionerDecorator.executeMethodLogic()}}.
On exit, both income and outgoing batches are cleared, leading to clearing of underlying {{Vectors}}
and {{DrillBufs}}. This eventually causes unallocated memory access and JVM crash as {{CustomRunnable}}
may execute after income/outgoing batches are cleared.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message