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-4676) Foreman.moveToState can block forever if called by the foreman thread while the query is still being setup
Date Mon, 16 May 2016 23:45:13 GMT

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

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

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

    https://github.com/apache/drill/pull/503#discussion_r63444982
  
    --- Diff: common/src/main/java/org/apache/drill/common/EventProcessor.java ---
    @@ -57,25 +58,35 @@ public EventProcessor() {
        */
       public void sendEvent(final T newEvent) {
         synchronized (queuedEvents) {
    -      if (isProcessing) {
    -        queuedEvents.addLast(newEvent);
    +      queuedEvents.addLast(newEvent);
    +      if (!started || isProcessing) {
             return;
           }
     
           isProcessing = true;
         }
     
    +    processEvents();
    +  }
    +
    +  public void start() {
    +    if (started) {
    +      return;
    +    }
    +
    +    synchronized (queuedEvents) {
    +      started = true;
    +      isProcessing = true;
    +    }
    +
    +    processEvents();
    +  }
    +
    +  private void processEvents() {
         @SuppressWarnings("resource")
         final DeferredException deferredException = new DeferredException();
    -    T event = newEvent;
    +    T event;
    --- End diff --
    
    Move this declaration inside the loop.


> Foreman.moveToState can block forever if called by the foreman thread while the query
is still being setup
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: DRILL-4676
>                 URL: https://issues.apache.org/jira/browse/DRILL-4676
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Execution - Flow
>    Affects Versions: 1.6.0
>            Reporter: Deneche A. Hakim
>            Assignee: Sudheesh Katkam
>             Fix For: 1.7.0
>
>
> When the query is being setup, foreman has a special CountDownLatch that blocks rpc threads
from delivering external events, this latch is unblocked at the end of the query setup.
> In some cases though, when the foreman is submitting remote fragments, a failure in RpcBus.send()
causes an exception to be thrown that is reported to 
> Foreman.FragmentSubmitListener and blocks in the CountDownLatch. This causes the foreman
thread to block forever, and can rpc threads to be blocked too.
> This seems to happen more frequently at a high concurrency load, and also can prevent
clients from connecting to the Drillbits.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message