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

ASAN tests fail with use-after-poison in HdfsParquetScanner::FindSkipRangesForPagesWithMinMaxFilters

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: Impala 4.1.0
    • Fix Version/s: Impala 4.1.0
    • Component/s: Backend
    • Labels:
    • Epic Color:
      ghx-label-2

      Description

      The end to end tests are failing on ASAN with Impala crashing with this Address Sanitizer message:

      ==25719==ERROR: AddressSanitizer: use-after-poison on address 0x621002e92e90 at pc 0x000001b6e38e bp 0x7fea9ae76830 sp 0x7fea9ae75fe0
      READ of size 8 at 0x621002e92e90 thread T18425
          #0 0x1b6e38d in __interceptor_memcpy.part.40 /mnt/source/llvm/llvm-5.0.1.src-p3/projects/compiler-rt/lib/asan/../sanitizer_common/sanitizer_common_interceptors.inc:738
          #1 0x1c47f93 in void std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*, std::forward_iterator_tag) /data/jenkins/workspace/impala-asf-master-core-asan/Impala-Toolchain/toolchain-packages-gcc7.5.0/gcc-7.5.0/lib/gcc/x86_64-pc-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/basic_string.tcc:225:6
          #2 0x7ff0440059a4 in void std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct_aux<char const*>(char const*, char const*, std::__false_type) /mnt/source/gcc/build-7.5.0/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/basic_string.h:236
          #3 0x7ff0440059a4 in void std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*) /mnt/source/gcc/build-7.5.0/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/basic_string.h:255
          #4 0x7ff0440059a4 in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, unsigned long, std::allocator<char> const&) /mnt/source/gcc/build-7.5.0/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/basic_string.h:502
          #5 0x39b63f8 in impala::HdfsParquetScanner::SkipPagesBatch(parquet::RowGroup&, impala::ColumnStatsReader const&, parquet::ColumnIndex const&, int, int, impala::ColumnType const&, int, parquet::ColumnChunk const&, impala::MinMaxFilter const*, std::vector<impala::RowRange, std::allocator<impala::RowRange> >*, int*) /data/jenkins/workspace/impala-asf-master-core-asan/repos/Impala/be/src/exec/parquet/hdfs-parquet-scanner.cc:1181:31
          #6 0x39baa09 in impala::HdfsParquetScanner::FindSkipRangesForPagesWithMinMaxFilters(std::vector<impala::RowRange, std::allocator<impala::RowRange> >*) /data/jenkins/workspace/impala-asf-master-core-asan/repos/Impala/be/src/exec/parquet/hdfs-parquet-scanner.cc:1470:7
          #7 0x39b8d7f in impala::HdfsParquetScanner::EvaluatePageIndex() /data/jenkins/workspace/impala-asf-master-core-asan/repos/Impala/be/src/exec/parquet/hdfs-parquet-scanner.cc:1541:5
          #8 0x39b088a in impala::HdfsParquetScanner::ProcessPageIndex() /data/jenkins/workspace/impala-asf-master-core-asan/repos/Impala/be/src/exec/parquet/hdfs-parquet-scanner.cc:1274:3
          #9 0x39a84bb in impala::HdfsParquetScanner::NextRowGroup() /data/jenkins/workspace/impala-asf-master-core-asan/repos/Impala/be/src/exec/parquet/hdfs-parquet-scanner.cc:889:34
          #10 0x39a63fa in impala::HdfsParquetScanner::GetNextInternal(impala::RowBatch*) /data/jenkins/workspace/impala-asf-master-core-asan/repos/Impala/be/src/exec/parquet/hdfs-parquet-scanner.cc:468:5
          #11 0x39a4511 in impala::HdfsParquetScanner::ProcessSplit() /data/jenkins/workspace/impala-asf-master-core-asan/repos/Impala/be/src/exec/parquet/hdfs-parquet-scanner.cc:379:21
          #12 0x3320940 in impala::HdfsScanNode::ProcessSplit(std::vector<impala::FilterContext, std::allocator<impala::FilterContext> > const&, impala::MemPool*, impala::io::ScanRange*, long*) /data/jenkins/workspace/impala-asf-master-core-asan/repos/Impala/be/src/exec/hdfs-scan-node.cc:500:21
          #13 0x331f6fb in impala::HdfsScanNode::ScannerThread(bool, long) /data/jenkins/workspace/impala-asf-master-core-asan/repos/Impala/be/src/exec/hdfs-scan-node.cc:418:7
          #14 0x2369d96 in boost::function0<void>::operator()() const /data/jenkins/workspace/impala-asf-master-core-asan/Impala-Toolchain/toolchain-packages-gcc7.5.0/boost-1.61.0-p2/include/boost/function/function_template.hpp:770:14
          #15 0x2f48019 in impala::Thread::SuperviseThread(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&, boost::function<void ()>, impala::ThreadDebugInfo const*, impala::Promise<long, (impala::PromiseMode)0>*) /data/jenkins/workspace/impala-asf-master-core-asan/repos/Impala/be/src/util/thread.cc:360:3
          #16 0x2f53b48 in void boost::_bi::list5<boost::_bi::value<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, boost::_bi::value<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, boost::_bi::value<boost::function<void ()> >, boost::_bi::value<impala::ThreadDebugInfo*>, boost::_bi::value<impala::Promise<long, (impala::PromiseMode)0>*> >::operator()<void (*)(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&, boost::function<void ()>, impala::ThreadDebugInfo const*, impala::Promise<long, (impala::PromiseMode)0>*), boost::_bi::list0>(boost::_bi::type<void>, void (*&)(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&, boost::function<void ()>, impala::ThreadDebugInfo const*, impala::Promise<long, (impala::PromiseMode)0>*), boost::_bi::list0&, int) /data/jenkins/workspace/impala-asf-master-core-asan/Impala-Toolchain/toolchain-packages-gcc7.5.0/boost-1.61.0-p2/include/boost/bind/bind.hpp:531:9
          #17 0x2f5399b in boost::_bi::bind_t<void, void (*)(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&, boost::function<void ()>, impala::ThreadDebugInfo const*, impala::Promise<long, (impala::PromiseMode)0>*), boost::_bi::list5<boost::_bi::value<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, boost::_bi::value<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, boost::_bi::value<boost::function<void ()> >, boost::_bi::value<impala::ThreadDebugInfo*>, boost::_bi::value<impala::Promise<long, (impala::PromiseMode)0>*> > >::operator()() /data/jenkins/workspace/impala-asf-master-core-asan/Impala-Toolchain/toolchain-packages-gcc7.5.0/boost-1.61.0-p2/include/boost/bind/bind.hpp:1222:16
          #18 0x47f0131 in thread_proxy (/data0/jenkins/workspace/impala-asf-master-core-asan/repos/Impala/be/build/debug/service/impalad+0x47f0131)
          #19 0x7ff046cd1e24 in start_thread (/lib64/libpthread.so.0+0x7e24)
          #20 0x7ff04370034c in __clone (/lib64/libc.so.6+0xf834c)
      
      0x621002e92e90 is located 1424 bytes inside of 4096-byte region [0x621002e92900,0x621002e93900)
      allocated by thread T18425 here:
          #0 0x1c0c960 in malloc /mnt/source/llvm/llvm-5.0.1.src-p3/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:67
          #1 0x2551bd3 in impala::MemPool::FindChunk(long, bool) /data/jenkins/workspace/impala-asf-master-core-asan/repos/Impala/be/src/runtime/mem-pool.cc:132:45
          #2 0x25c2ad8 in unsigned char* impala::MemPool::Allocate<true>(long, int) /data/jenkins/workspace/impala-asf-master-core-asan/repos/Impala/be/src/runtime/mem-pool.h:295:9
          #3 0x25c2ad8 in impala::MemPool::TryAllocate(long) /data/jenkins/workspace/impala-asf-master-core-asan/repos/Impala/be/src/runtime/mem-pool.h:120
          #4 0x39b4c01 in impala::HdfsParquetScanner::ConvertStatsIntoInternalValuesBatch(impala::ColumnStatsReader const&, parquet::ColumnIndex const&, int, int, impala::ColumnType const&, unsigned char**, unsigned char**) /data/jenkins/workspace/impala-asf-master-core-asan/repos/Impala/be/src/exec/parquet/hdfs-parquet-scanner.cc:1089:48
          #5 0x39b619f in impala::HdfsParquetScanner::SkipPagesBatch(parquet::RowGroup&, impala::ColumnStatsReader const&, parquet::ColumnIndex const&, int, int, impala::ColumnType const&, int, parquet::ColumnChunk const&, impala::MinMaxFilter const*, std::vector<impala::RowRange, std::allocator<impala::RowRange> >*, int*) /data/jenkins/workspace/impala-asf-master-core-asan/repos/Impala/be/src/exec/parquet/hdfs-parquet-scanner.cc:1163:7
          #6 0x39baa09 in impala::HdfsParquetScanner::FindSkipRangesForPagesWithMinMaxFilters(std::vector<impala::RowRange, std::allocator<impala::RowRange> >*) /data/jenkins/workspace/impala-asf-master-core-asan/repos/Impala/be/src/exec/parquet/hdfs-parquet-scanner.cc:1470:7
          #7 0x39b8d7f in impala::HdfsParquetScanner::EvaluatePageIndex() /data/jenkins/workspace/impala-asf-master-core-asan/repos/Impala/be/src/exec/parquet/hdfs-parquet-scanner.cc:1541:5
          #8 0x39b088a in impala::HdfsParquetScanner::ProcessPageIndex() /data/jenkins/workspace/impala-asf-master-core-asan/repos/Impala/be/src/exec/parquet/hdfs-parquet-scanner.cc:1274:3
          #9 0x39a84bb in impala::HdfsParquetScanner::NextRowGroup() /data/jenkins/workspace/impala-asf-master-core-asan/repos/Impala/be/src/exec/parquet/hdfs-parquet-scanner.cc:889:34
          #10 0x39a63fa in impala::HdfsParquetScanner::GetNextInternal(impala::RowBatch*) /data/jenkins/workspace/impala-asf-master-core-asan/repos/Impala/be/src/exec/parquet/hdfs-parquet-scanner.cc:468:5
          #11 0x39a4511 in impala::HdfsParquetScanner::ProcessSplit() /data/jenkins/workspace/impala-asf-master-core-asan/repos/Impala/be/src/exec/parquet/hdfs-parquet-scanner.cc:379:21
          #12 0x3320940 in impala::HdfsScanNode::ProcessSplit(std::vector<impala::FilterContext, std::allocator<impala::FilterContext> > const&, impala::MemPool*, impala::io::ScanRange*, long*) /data/jenkins/workspace/impala-asf-master-core-asan/repos/Impala/be/src/exec/hdfs-scan-node.cc:500:21
          #13 0x331f6fb in impala::HdfsScanNode::ScannerThread(bool, long) /data/jenkins/workspace/impala-asf-master-core-asan/repos/Impala/be/src/exec/hdfs-scan-node.cc:418:7
          #14 0x2369d96 in boost::function0<void>::operator()() const /data/jenkins/workspace/impala-asf-master-core-asan/Impala-Toolchain/toolchain-packages-gcc7.5.0/boost-1.61.0-p2/include/boost/function/function_template.hpp:770:14
          #15 0x2f48019 in impala::Thread::SuperviseThread(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&, boost::function<void ()>, impala::ThreadDebugInfo const*, impala::Promise<long, (impala::PromiseMode)0>*) /data/jenkins/workspace/impala-asf-master-core-asan/repos/Impala/be/src/util/thread.cc:360:3
          #16 0x2f53b48 in void boost::_bi::list5<boost::_bi::value<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, boost::_bi::value<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, boost::_bi::value<boost::function<void ()> >, boost::_bi::value<impala::ThreadDebugInfo*>, boost::_bi::value<impala::Promise<long, (impala::PromiseMode)0>*> >::operator()<void (*)(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&, boost::function<void ()>, impala::ThreadDebugInfo const*, impala::Promise<long, (impala::PromiseMode)0>*), boost::_bi::list0>(boost::_bi::type<void>, void (*&)(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&, boost::function<void ()>, impala::ThreadDebugInfo const*, impala::Promise<long, (impala::PromiseMode)0>*), boost::_bi::list0&, int) /data/jenkins/workspace/impala-asf-master-core-asan/Impala-Toolchain/toolchain-packages-gcc7.5.0/boost-1.61.0-p2/include/boost/bind/bind.hpp:531:9
          #17 0x2f5399b in boost::_bi::bind_t<void, void (*)(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&, boost::function<void ()>, impala::ThreadDebugInfo const*, impala::Promise<long, (impala::PromiseMode)0>*), boost::_bi::list5<boost::_bi::value<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, boost::_bi::value<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, boost::_bi::value<boost::function<void ()> >, boost::_bi::value<impala::ThreadDebugInfo*>, boost::_bi::value<impala::Promise<long, (impala::PromiseMode)0>*> > >::operator()() /data/jenkins/workspace/impala-asf-master-core-asan/Impala-Toolchain/toolchain-packages-gcc7.5.0/boost-1.61.0-p2/include/boost/bind/bind.hpp:1222:16
          #18 0x47f0131 in thread_proxy (/data0/jenkins/workspace/impala-asf-master-core-asan/repos/Impala/be/build/debug/service/impalad+0x47f0131)

      This looks related to the fix for IMPALA-10709: https://github.com/apache/impala/commit/40c3074e79f4e35ef8af9bfe1f73aa34511425cf

      This doesn't reproduce with that patch reverted.

        Attachments

          Activity

            People

            • Assignee:
              sql_forever Qifan Chen
              Reporter:
              joemcdonnell Joe McDonnell
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: