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

Allocation/Dealloc mismatch unique_ptr param seems to be overwritten (mem-leak)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • Impala 2.12.0
    • Impala 2.12.0
    • Backend

    Description

      ==1448==ERROR: AddressSanitizer: alloc-dealloc-mismatch (operator new [] vs operator delete) on 0x602002e1cb90
      #0 0x13acc30 in operator delete(void*) /label/ec2-package-centos-6/toolchain/source/llvm/llvm-3.9.1.src/projects/compiler-rt/lib/asan/asan_new_delete.cc:110
      #1 0x29c3c36 in std::unique_ptr<double, std::default_delete<double> >::~unique_ptr() /Impala-Toolchain/gcc-4.9.2/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/../../../../include/c++/4.9.2/bits/unique_ptr.h:236:4
      #2 0x29c1b4a in impala::ObjectiveFunction::~ObjectiveFunction() /repos/Impala/be/src/util/mpfit-util.h:43:7
      #3 0x29cfe3f in void std::Destroy_aux<false>::_destroy<impala::ObjectiveFunction*>(impala::ObjectiveFunction*, impala::ObjectiveFunction*) /Impala-Toolchain/gcc-4.9.2/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/../../../../include/c++/4.9.2/bits/stl_construct.h:103:6
      #4 0x29c200d in std::vector<impala::ObjectiveFunction, std::allocator<impala::ObjectiveFunction> >::~vector() /Impala-Toolchain/gcc-4.9.2/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/../../../../include/c++/4.9.2/bits/stl_vector.h:424:9
      #5 0x29886e8 in impala::AggregateFunctions::SampledNdvFinalize(impala_udf::FunctionContext*, impala_udf::StringVal const&) /repos/Impala/be/src/exprs/aggregate-functions-ir.cc:1663:1
      #6 0x2977e05 in impala::AggFnEvaluator::SerializeOrFinalize(impala::Tuple*, impala::SlotDescriptor const&, impala::Tuple*, void*) /repos/Impala/be/src/exprs/agg-fn-evaluator.cc:437:21
      #7 0x28978c8 in impala::AggFnEvaluator::Finalize(std::vector<impala::AggFnEvaluator*, std::allocator<impala::AggFnEvaluator*> > const&, impala::Tuple*, impala::Tuple*) /repos/Impala/be/src/exprs/agg-fn-evaluator.h:307:15
      #8 0x288a947 in impala::PartitionedAggregationNode::GetOutputTuple(std::vector<impala::AggFnEvaluator*, std::allocator<impala::AggFnEvaluator*> > const&, impala::Tuple*, impala::MemPool*) /repos/Impala/be/src/exec/partitioned-aggregation-node.cc:989:5
      #9 0x2887b95 in impala::PartitionedAggregationNode::GetSingletonOutput(impala::RowBatch*) /repos/Impala/be/src/exec/partitioned-aggregation-node.cc:388:25
      #10 0x288746b in impala::PartitionedAggregationNode::GetNext(impala::RuntimeState*, impala::RowBatch*, bool*) /repos/Impala/be/src/exec/partitioned-aggregation-node.cc:360:44
      #11 0x17aec86 in impala::FragmentInstanceState::ExecInternal() /repos/Impala/be/src/runtime/fragment-instance-state.cc:270:55
      #12 0x17ac05c in impala::FragmentInstanceState::Exec() /repos/Impala/be/src/runtime/fragment-instance-state.cc:89:14
      #13 0x178c852 in impala::QueryState::ExecFInstance(impala::FragmentInstanceState*) /repos/Impala/be/src/runtime/query-state.cc:382:24
      #14 0x16887e2 in boost::function0<void>::operator()() const /Impala-Toolchain/boost-1.57.0-p3/include/boost/function/function_template.hpp:766:14
      #15 0x1ad8e97 in impala::Thread::SuperviseThread(std::string const&, std::string const&, boost::function<void ()>, impala::Promise<long>*) /repos/Impala/be/src/util/thread.cc:352:3
      #16 0x1ae3c15 in void boost::_bi::list4<boost::_bi::value<std::string>, boost::_bi::value<std::string>, boost::_bi::value<boost::function<void ()> >, boost::_bi::value<impala::Promise<long>> >::operator()<void (std::string const&, std::string const&, boost::function<void ()>, impala::Promise<long>), boost::_bi::list0>(boost::_bi::type<void>, void (&)(std::string const&, std::string const&, boost::function<void ()>, impala::Promise<long>), boost::_bi::list0&, int) /Impala-Toolchain/boost-1.57.0-p3/include/boost/bind/bind.hpp:457:9
      #17 0x1ae3a91 in boost::_bi::bind_t<void, void (std::string const&, std::string const&, boost::function<void ()>, impala::Promise<long>), boost::_bi::list4<boost::_bi::value<std::string>, boost::_bi::value<std::string>, boost::_bi::value<boost::function<void ()> >, boost::_bi::value<impala::Promise<long>> > >::operator()() /Impala-Toolchain/boost-1.57.0-p3/include/boost/bind/bind_template.hpp:20:16
      #18 0x2f91239 in thread_proxy (/repos/Impala/be/build/debug/service/impalad+0x2f91239)
      #19 0x374a207850 in start_thread (/lib64/libpthread.so.0+0x374a207850)
      #20 0x3749ee894c in clone (/lib64/libc.so.6+0x3749ee894c)

      0x602002e1cb90 is located 0 bytes inside of 16-byte region [0x602002e1cb90,0x602002e1cba0)
      allocated by thread T24318 here:
      #0 0x13aca90 in operator new[](unsigned long, std::nothrow_t const&) /label/ec2-package-centos-6/toolchain/source/llvm/llvm-3.9.1.src/projects/compiler-rt/lib/asan/asan_new_delete.cc:86
      #1 0x2efa1c6 in impala::ObjectiveFunction::LmsFit(double const*, double const*, int) /repos/Impala/be/src/util/mpfit-util.cc:60:17
      #2 0x2988613 in impala::AggregateFunctions::SampledNdvFinalize(impala_udf::FunctionContext*, impala_udf::StringVal const&) /repos/Impala/be/src/exprs/aggregate-functions-ir.cc:1646:10
      #3 0x2977e05 in impala::AggFnEvaluator::SerializeOrFinalize(impala::Tuple*, impala::SlotDescriptor const&, impala::Tuple*, void*) /repos/Impala/be/src/exprs/agg-fn-evaluator.cc:437:21
      #4 0x28978c8 in impala::AggFnEvaluator::Finalize(std::vector<impala::AggFnEvaluator*, std::allocator<impala::AggFnEvaluator*> > const&, impala::Tuple*, impala::Tuple*) /repos/Impala/be/src/exprs/agg-fn-evaluator.h:307:15
      #5 0x288a947 in impala::PartitionedAggregationNode::GetOutputTuple(std::vector<impala::AggFnEvaluator*, std::allocator<impala::AggFnEvaluator*> > const&, impala::Tuple*, impala::MemPool*) /repos/Impala/be/src/exec/partitioned-aggregation-node.cc:989:5
      #6 0x2887b95 in impala::PartitionedAggregationNode::GetSingletonOutput(impala::RowBatch*) /repos/Impala/be/src/exec/partitioned-aggregation-node.cc:388:25
      #7 0x288746b in impala::PartitionedAggregationNode::GetNext(impala::RuntimeState*, impala::RowBatch*, bool*) /repos/Impala/be/src/exec/partitioned-aggregation-node.cc:360:44
      #8 0x17aec86 in impala::FragmentInstanceState::ExecInternal() /repos/Impala/be/src/runtime/fragment-instance-state.cc:270:55
      #9 0x17ac05c in impala::FragmentInstanceState::Exec() /repos/Impala/be/src/runtime/fragment-instance-state.cc:89:14
      #10 0x178c852 in impala::QueryState::ExecFInstance(impala::FragmentInstanceState*) /repos/Impala/be/src/runtime/query-state.cc:382:24
      #11 0x16887e2 in boost::function0<void>::operator()() const /Impala-Toolchain/boost-1.57.0-p3/include/boost/function/function_template.hpp:766:14
      #12 0x1ad8e97 in impala::Thread::SuperviseThread(std::string const&, std::string const&, boost::function<void ()>, impala::Promise<long>*) /repos/Impala/be/src/util/thread.cc:352:3
      #13 0x1ae3c15 in void boost::_bi::list4<boost::_bi::value<std::string>, boost::_bi::value<std::string>, boost::_bi::value<boost::function<void ()> >, boost::_bi::value<impala::Promise<long>> >::operator()<void (std::string const&, std::string const&, boost::function<void ()>, impala::Promise<long>), boost::_bi::list0>(boost::_bi::type<void>, void (&)(std::string const&, std::string const&, boost::function<void ()>, impala::Promise<long>), boost::_bi::list0&, int) /Impala-Toolchain/boost-1.57.0-p3/include/boost/bind/bind.hpp:457:9
      #14 0x1ae3a91 in boost::_bi::bind_t<void, void (std::string const&, std::string const&, boost::function<void ()>, impala::Promise<long>), boost::_bi::list4<boost::_bi::value<std::string>, boost::_bi::value<std::string>, boost::_bi::value<boost::function<void ()> >, boost::_bi::value<impala::Promise<long>> > >::operator()() /Impala-Toolchain/boost-1.57.0-p3/include/boost/bind/bind_template.hpp:20:16
      #15 0x2f91239 in thread_proxy (/repos/Impala/be/build/debug/service/impalad+0x2f91239)

      Attachments

        Issue Links

          Activity

            People

              alex.behm Alexander Behm
              pranay_singh Pranay Singh
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: