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

Crash in partitioned top-N codegen'd code

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • Impala 4.1.0
    • Impala 4.1.0
    • Backend
    • None
    • ghx-label-1

    Description

      Users reported a crash for a query with the partitioned top-N codegen'd code with the following stack:

      Crash reason:  SIGSEGV
      Crash address: 0x0
      Process uptime: not availableThread 579 (crashed)
       0  0x7f2a53d3c555
          rax = 0x000000002b89df00   rdx = 0x0000000031a7b227
          rcx = 0x0000000031a7b227   rbx = 0x0000000000000000
          rsi = 0x0000000000000000   rdi = 0x0000000000000000
          rbp = 0x000000002b89df00   rsp = 0x00007f2a2a09d2a0
           r8 = 0x00007f2a2a09d2e8    r9 = 0x0000000034f59260
          r10 = 0x0000000000000000   r11 = 0x00007f2bacab2590
          r12 = 0x00007f2a2a09d2e8   r13 = 0x00000000510ea910
          r14 = 0x0000000000000000   r15 = 0x00000000243c5b01
          rip = 0x00007f2a53d3c555
          Found by: given as instruction pointer in context
       1  impalad!impala::TopNNode::Open(impala::RuntimeState*) [topn-node.cc : 325 + 0xb]
          rsp = 0x00007f2a2a09d370   rip = 0x00000000018a339e
          Found by: stack scanning
       2  impalad!std::pair<std::_Rb_tree_iterator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, bool> std::_Rb_tree<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::_Identity<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::_M_insert_unique<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) [char_traits.h : 310 + 0x9]
          rsp = 0x00007f2a2a09d3d0   rip = 0x0000000000cf1d01
          Found by: stack scanning

      After some investigation, the following query reproduces the issue on historical Impala releases (such as Impala 4.0):

      select count(*) from (select row_number() OVER (PARTITION BY l_partkey, l_suppkey ORDER BY CASE WHEN l_shipmode IN ('MAIL', 'AIR') THEN 1 ELSE 0 END DESC) RN FROM tpch.lineitem) c WHERE c.rn = 1;

      This issue does not reproduce on the master branch, and we have determined that the commit for IMPALA-10961 fixed this issue.

      This Jira tracks adding test cases for this issue.

      Attachments

        Issue Links

          Activity

            People

              joemcdonnell Joe McDonnell
              joemcdonnell Joe McDonnell
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: