- edited description
Valgrind error for testOrientedPlane3Factor
Issue #215
resolved
Intermittent indeterminent system exception. Can find an example failure at:
http://hawkertempest.cc.gatech.edu:8080/job/gtsam-ubuntu-pullrequest/BUILD_OPT=Debug,MKL_OPT=MKL%20OFF,ROT_OPT=Rot3,TBB_OPT=TBB%20ON/33/console
ran the test with Valgrind. This is the output.
==17472== Memcheck, a memory error detector
==17472== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==17472== Using Valgrind-3.10.0.SVN and LibVEX; rerun with -h for copyright info
==17472== Command: ./testOrientedPlane3Factor
==17472==
There were no test failures
==17472==
==17472== HEAP SUMMARY:
==17472== in use at exit: 13,579 bytes in 10 blocks
==17472== total heap usage: 784 allocs, 774 frees, 73,356 bytes allocated
==17472==
==17472== 608 bytes in 2 blocks are possibly lost in loss record 3 of 7
==17472== at 0x4C2CC70: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==17472== by 0x4012E54: _dl_allocate_tls (dl-tls.c:296)
==17472== by 0x7F7EDA0: pthread_create@@GLIBC_2.2.5 (allocatestack.c:589)
==17472== by 0x68C0EF0: ??? (in /usr/lib/libtbb.so.2)
==17472== by 0x68C7DA9: ??? (in /usr/lib/libtbb.so.2)
==17472== by 0x5E78B83: tbb::interface5::internal::task_base::spawn(tbb::task&) (task.h:915)
==17472== by 0x5E785B9: tbb::interface6::internal::flag_task* tbb::interface6::internal::partition_type_base<tbb::interface6::internal::auto_partition_type>::split_work<tbb::interface6::internal::start_for<tbb::blocked_range<unsigned long>, gtsam::(anonymous namespace)::_LinearizeOneFactor, tbb::auto_partitioner const> >(tbb::interface6::internal::start_for<tbb::blocked_range<unsigned long>, gtsam::(anonymous namespace)::_LinearizeOneFactor, tbb::auto_partitioner const>&) (partitioner.h:231)
==17472== by 0x5E78164: void tbb::interface6::internal::partition_type_base<tbb::interface6::internal::auto_partition_type>::execute<tbb::interface6::internal::start_for<tbb::blocked_range<unsigned long>, gtsam::(anonymous namespace)::_LinearizeOneFactor, tbb::auto_partitioner const>, tbb::blocked_range<unsigned long> >(tbb::interface6::internal::start_for<tbb::blocked_range<unsigned long>, gtsam::(anonymous namespace)::_LinearizeOneFactor, tbb::auto_partitioner const>&, tbb::blocked_range<unsigned long>&) (partitioner.h:246)
==17472== by 0x5E7809B: tbb::interface6::internal::start_for<tbb::blocked_range<unsigned long>, gtsam::(anonymous namespace)::_LinearizeOneFactor, tbb::auto_partitioner const>::execute() (parallel_for.h:116)
==17472== by 0x68C9B39: ??? (in /usr/lib/libtbb.so.2)
==17472== by 0x68C7F8F: ??? (in /usr/lib/libtbb.so.2)
==17472== by 0x5CABE69: tbb::task::spawn_root_and_wait(tbb::task&) (task.h:705)
==17472==
==17472== 3,096 bytes in 3 blocks are possibly lost in loss record 5 of 7
==17472== at 0x4C2B800: operator new[](unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==17472== by 0x68C623B: ??? (in /usr/lib/libtbb.so.2)
==17472== by 0x68C65BD: ??? (in /usr/lib/libtbb.so.2)
==17472== by 0x68C4B02: ??? (in /usr/lib/libtbb.so.2)
==17472== by 0x68C4359: ??? (in /usr/lib/libtbb.so.2)
==17472== by 0x68C2800: tbb::internal::allocate_root_with_context_proxy::allocate(unsigned long) const (in /usr/lib/libtbb.so.2)
==17472== by 0x5E78BAF: operator new(unsigned long, tbb::internal::allocate_root_with_context_proxy const&) (task.h:944)
==17472== by 0x5E77B70: tbb::interface6::internal::start_for<tbb::blocked_range<unsigned long>, gtsam::(anonymous namespace)::_LinearizeOneFactor, tbb::auto_partitioner const>::run(tbb::blocked_range<unsigned long> const&, gtsam::(anonymous namespace)::_LinearizeOneFactor const&, tbb::auto_partitioner const&) (parallel_for.h:92)
==17472== by 0x5E77ADD: void tbb::parallel_for<tbb::blocked_range<unsigned long>, gtsam::(anonymous namespace)::_LinearizeOneFactor>(tbb::blocked_range<unsigned long> const&, gtsam::(anonymous namespace)::_LinearizeOneFactor const&) (parallel_for.h:165)
==17472== by 0x5E773C7: gtsam::NonlinearFactorGraph::linearize(gtsam::Values const&) const (NonlinearFactorGraph.cpp:349)
==17472== by 0x5EA33AE: gtsam::ISAM2::update(gtsam::NonlinearFactorGraph const&, gtsam::Values const&, std::vector<unsigned long, std::allocator<unsigned long> > const&, boost::optional<gtsam::FastMap<unsigned long, int> > const&, boost::optional<gtsam::FastList<unsigned long> > const&, boost::optional<gtsam::FastList<unsigned long> > const&, bool) (ISAM2.cpp:703)
==17472== by 0x477ABD: OrientedPlane3lm_translation_errorTest::run(TestResult&) (testOrientedPlane3Factor.cpp:81)
==17472==
==17472== LEAK SUMMARY:
==17472== definitely lost: 0 bytes in 0 blocks
==17472== indirectly lost: 0 bytes in 0 blocks
==17472== possibly lost: 3,704 bytes in 5 blocks
==17472== still reachable: 9,875 bytes in 5 blocks
==17472== suppressed: 0 bytes in 0 blocks
==17472== Reachable blocks (those to which a pointer was found) are not shown.
==17472== To see them, rerun with: --leak-check=full --show-leak-kinds=all
==17472==
==17472== For counts of detected and suppressed errors, rerun with: -v
==17472== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)
@nsrinivasan7
Comments (4)
-
reporter -
I'm pretty sure it's due to concurrent access to Unit3's basis computation, which is not thread-safe. I'll take a look.
-
Good catch
-
- changed status to resolved
- Log in to comment