Uploaded image for project: 'IMPALA'
  1. IMPALA
  2. IMPALA-1351

Failed DCHECK(!status_.ok()) in complicated query

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • Impala 2.0
    • Impala 2.0
    • None
    • None

    Description

      The query below reliably crashes. This is almost certainly not the simplest case but the two NOT IN predicates seem to be required.

      Socket error 104: Connection reset by peer
      Could not execute command: 
      select COUNT(t2.month) AS int_col_1
      FROM alltypesagg t1 CROSS
      JOIN alltypesagg t2 FULL
      OUTER JOIN alltypestiny t3 ON t3.year = t2.int_col
      AND t3.int_col = t2.year
      WHERE t1.day NOT IN
          (SELECT tt1.year AS int_col_1
           FROM alltypes tt1
           RIGHT JOIN alltypes tt2 ON tt2.month = tt1.year
           WHERE t3.tinyint_col = tt2.tinyint_col
             AND t3.bigint_col = tt2.bigint_col
             AND t3.int_col = tt1.id)
        AND t1.day NOT IN
          (SELECT ttt1.tinyint_col AS tinyint_col_1
           FROM alltypestiny ttt1
           WHERE t1.tinyint_col = ttt1.month
             AND ttt1.month IS NULL
             AND ttt1.tinyint_col NOT IN
               (SELECT tttt2.int_col AS int_col_1
                FROM alltypesagg tttt1
                RIGHT JOIN alltypes tttt2 ON tttt2.id = tttt1.year)
             AND ttt1.month NOT IN
               (SELECT MIN(tttt2.year + tttt1.smallint_col * tttt1.int_col - tttt2.bigint_col) + MAX(tttt2.tinyint_col) AS bigint_col_1
                FROM alltypestiny tttt1
                INNER JOIN alltypestiny tttt2 ON tttt2.month = tttt1.smallint_col)
             AND ttt1.month IS NOT NULL
             AND t2.smallint_col = ttt1.bigint_col)
      

      stack trace

      (gdb) bt
      #0  0x0000003a0ca32635 in raise () from /lib64/libc.so.6
      #1  0x0000003a0ca33e15 in abort () from /lib64/libc.so.6
      #2  0x0000000001e862a9 in google::DumpStackTraceAndExit () at src/utilities.cc:147
      #3  0x0000000001e7d9ad in google::LogMessage::Fail () at src/logging.cc:1296
      #4  0x0000000001e81437 in google::LogMessage::SendToLog (this=0x7f9abb2b5870)
          at src/logging.cc:1250
      #5  0x0000000001e80996 in google::LogMessage::Flush (this=0x7f9abb2b5870)
          at src/logging.cc:1119
      #6  0x0000000001e818cd in google::LogMessageFatal::~LogMessageFatal (this=0x7f9abb2b5870, 
          __in_chrg=<value optimized out>) at src/logging.cc:1817
      #7  0x00000000014c38a0 in impala::PartitionedHashJoinNode::GetNext (this=0x4aa5680, 
          state=0x5b33c00, out_batch=0x728fba0, eos=0x4aa60c8)
          at /data/9/query-gen/Impala/be/src/exec/partitioned-hash-join-node.cc:761
      #8  0x00000000014fcdef in impala::BlockingJoinNode::Open (this=0x4aa5f80, state=0x5b33c00)
          at /data/9/query-gen/Impala/be/src/exec/blocking-join-node.cc:177
      #9  0x00000000014aabaa in impala::PartitionedAggregationNode::Open (this=0x59cbb80, 
          state=0x5b33c00)
          at /data/9/query-gen/Impala/be/src/exec/partitioned-aggregation-node.cc:227
      #10 0x00000000013c20b0 in impala::PlanFragmentExecutor::OpenInternal (this=0x533e1d0)
          at /data/9/query-gen/Impala/be/src/runtime/plan-fragment-executor.cc:332
      #11 0x00000000013c1f2c in impala::PlanFragmentExecutor::Open (this=0x533e1d0)
          at /data/9/query-gen/Impala/be/src/runtime/plan-fragment-executor.cc:318
      #12 0x000000000106c1d4 in impala::ImpalaServer::FragmentExecState::Exec (this=0x533e000)
          at /data/9/query-gen/Impala/be/src/service/fragment-exec-state.cc:49
      

      code

       // Finish up the current batch.
          {
            // Putting SCOPED_TIMER in ProcessProbeBatch() causes weird exception handling IR in
            // the xcompiled function, so call it here instead.
            int rows_added = 0;
            SCOPED_TIMER(probe_timer_);
            if (process_probe_batch_fn_ == NULL || ht_ctx_->level() != 0) {
              rows_added = ProcessProbeBatch(join_op_, out_batch, ht_ctx_.get());
            } else {
              DCHECK_NOTNULL(process_probe_batch_fn_level0_);
              if (ht_ctx_->level() == 0) {
                rows_added = process_probe_batch_fn_level0_(this, out_batch, ht_ctx_.get());
              } else {
                rows_added = process_probe_batch_fn_(this, out_batch, ht_ctx_.get());
              }
            }
            if (UNLIKELY(rows_added < 0)) {
              DCHECK(!status_.ok());
      

      Attachments

        Activity

          People

            nong_impala_60e1 Nong Li
            caseyc casey
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: