Skip to content

Valgrind error in local scheduler tests. #570

Closed
@robertnishihara

Description

@robertnishihara

This may have been introduced very recently in #539.

* Suite local_scheduler_tests:
[INFO] (/home/travis/build/ray-project/ray/src/common/cmake/../test/test_common.h:23) trying to find plasma socket (attempt 0)
[INFO] (/home/travis/build/ray-project/ray/src/common/cmake/../test/test_common.h:23) trying to find plasma socket (attempt 0)
[INFO] (/home/travis/build/ray-project/ray/src/local_scheduler/local_scheduler.cc:229) Started worker with pid 17892
==17891== 
==17891== HEAP SUMMARY:
==17891==     in use at exit: 1,670 bytes in 8 blocks
==17891==   total heap usage: 508 allocs, 500 frees, 87,248 bytes allocated
==17891== 
==17891== 4 bytes in 1 blocks are still reachable in loss record 1 of 8
==17891==    at 0x4C2B0E0: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==17891==    by 0x464975: __gnu_cxx::new_allocator<int>::allocate(unsigned long, void const*) (new_allocator.h:104)
==17891==    by 0x4638C4: std::_Vector_base<int, std::allocator<int> >::_M_allocate(unsigned long) (in /home/travis/build/ray-project/ray/python/ray/core/src/local_scheduler/local_scheduler_tests)
==17891==    by 0x4624D1: void std::vector<int, std::allocator<int> >::_M_emplace_back_aux<int const&>(int const&) (vector.tcc:404)
==17891==    by 0x460FFA: std::vector<int, std::allocator<int> >::push_back(int const&) (stl_vector.h:911)
==17891==    by 0x4809B6: get_redis_shards(redisContext*, std::vector<std::string, std::allocator<std::string> >&, std::vector<int, std::allocator<int> >&) (redis.cc:156)
==17891==    by 0x45255B: object_reconstruction_test() (local_scheduler_tests.cc:190)
==17891==    by 0x455B2A: local_scheduler_tests() (local_scheduler_tests.cc:678)
==17891==    by 0x4564D2: greatest_run_suite(void (*)(), char const*) (local_scheduler_tests.cc:686)
==17891==    by 0x457182: main (local_scheduler_tests.cc:691)
==17891== 
==17891== 8 bytes in 1 blocks are still reachable in loss record 2 of 8
==17891==    at 0x4C2B0E0: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==17891==    by 0x48C3CD: __gnu_cxx::new_allocator<std::string>::allocate(unsigned long, void const*) (new_allocator.h:104)
==17891==    by 0x48BF7E: std::_Vector_base<std::string, std::allocator<std::string> >::_M_allocate(unsigned long) (in /home/travis/build/ray-project/ray/python/ray/core/src/local_scheduler/local_scheduler_tests)
==17891==    by 0x48B7AB: void std::vector<std::string, std::allocator<std::string> >::_M_emplace_back_aux<std::string>(std::string&&) (vector.tcc:404)
==17891==    by 0x48AFE6: void std::vector<std::string, std::allocator<std::string> >::emplace_back<std::string>(std::string&&) (vector.tcc:101)
==17891==    by 0x48AAED: std::vector<std::string, std::allocator<std::string> >::push_back(std::string&&) (stl_vector.h:920)
==17891==    by 0x48097F: get_redis_shards(redisContext*, std::vector<std::string, std::allocator<std::string> >&, std::vector<int, std::allocator<int> >&) (redis.cc:155)
==17891==    by 0x45255B: object_reconstruction_test() (local_scheduler_tests.cc:190)
==17891==    by 0x455B2A: local_scheduler_tests() (local_scheduler_tests.cc:678)
==17891==    by 0x4564D2: greatest_run_suite(void (*)(), char const*) (local_scheduler_tests.cc:686)
==17891==    by 0x457182: main (local_scheduler_tests.cc:691)
==17891== 
==17891== 16 bytes in 1 blocks are still reachable in loss record 3 of 8
==17891==    at 0x4C2B0E0: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==17891==    by 0x47B0C9: __gnu_cxx::new_allocator<double>::allocate(unsigned long, void const*) (new_allocator.h:104)
==17891==    by 0x47AB58: std::_Vector_base<double, std::allocator<double> >::_M_allocate(unsigned long) (in /home/travis/build/ray-project/ray/python/ray/core/src/local_scheduler/local_scheduler_tests)
==17891==    by 0x47A651: void std::vector<double, std::allocator<double> >::_M_emplace_back_aux<double>(double&&) (vector.tcc:404)
==17891==    by 0x479EF2: void std::vector<double, std::allocator<double> >::emplace_back<double>(double&&) (vector.tcc:101)
==17891==    by 0x479767: std::vector<double, std::allocator<double> >::push_back(double&&) (stl_vector.h:920)
==17891==    by 0x478EA4: TaskBuilder::Finish(long*) (task.cc:101)
==17891==    by 0x477108: TaskSpec_finish_construct(TaskBuilder*, long*) (task.cc:178)
==17891==    by 0x451C60: example_task_spec_with_args(long, long, UniqueID*, long*) (example_task.h:27)
==17891==    by 0x451CAE: example_task_spec(long, long, long*) (example_task.h:34)
==17891==    by 0x4524D5: object_reconstruction_test() (local_scheduler_tests.cc:180)
==17891==    by 0x455B2A: local_scheduler_tests() (local_scheduler_tests.cc:678)
==17891== 
==17891== 34 bytes in 1 blocks are possibly lost in loss record 4 of 8
==17891==    at 0x4C2B0E0: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==17891==    by 0x510F248: std::string::_Rep::_S_create(unsigned long, unsigned long, std::allocator<char> const&) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.19)
==17891==    by 0x5110970: char* std::string::_S_construct<char const*>(char const*, char const*, std::allocator<char> const&, std::forward_iterator_tag) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.19)
==17891==    by 0x5110D87: std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, std::allocator<char> const&) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.19)
==17891==    by 0x480966: get_redis_shards(redisContext*, std::vector<std::string, std::allocator<std::string> >&, std::vector<int, std::allocator<int> >&) (redis.cc:155)
==17891==    by 0x45255B: object_reconstruction_test() (local_scheduler_tests.cc:190)
==17891==    by 0x455B2A: local_scheduler_tests() (local_scheduler_tests.cc:678)
==17891==    by 0x4564D2: greatest_run_suite(void (*)(), char const*) (local_scheduler_tests.cc:686)
==17891==    by 0x457182: main (local_scheduler_tests.cc:691)
==17891== 
==17891== 64 bytes in 1 blocks are still reachable in loss record 5 of 8
==17891==    at 0x4C2B0E0: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==17891==    by 0x4645E1: __gnu_cxx::new_allocator<unsigned int>::allocate(unsigned long, void const*) (new_allocator.h:104)
==17891==    by 0x46317A: std::_Vector_base<unsigned int, std::allocator<unsigned int> >::_M_allocate(unsigned long) (in /home/travis/build/ray-project/ray/python/ray/core/src/local_scheduler/local_scheduler_tests)
==17891==    by 0x461831: unsigned int* std::vector<unsigned int, std::allocator<unsigned int> >::_M_allocate_and_copy<std::move_iterator<unsigned int*> >(unsigned long, std::move_iterator<unsigned int*>, std::move_iterator<unsigned int*>) (stl_vector.h:1138)
==17891==    by 0x460594: std::vector<unsigned int, std::allocator<unsigned int> >::reserve(unsigned long) (vector.tcc:75)
==17891==    by 0x45F27A: flatbuffers::FlatBufferBuilder::FlatBufferBuilder(unsigned int, flatbuffers::simple_allocator const*) (flatbuffers.h:663)
==17891==    by 0x4791AA: TaskBuilder::TaskBuilder() (in /home/travis/build/ray-project/ray/python/ray/core/src/local_scheduler/local_scheduler_tests)
==17891==    by 0x476F17: make_task_builder() (task.cc:136)
==17891==    by 0x4570CE: main (local_scheduler_tests.cc:689)
==17891== 
==17891== 128 bytes in 1 blocks are still reachable in loss record 6 of 8
==17891==    at 0x4C2B0E0: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==17891==    by 0x464557: __gnu_cxx::new_allocator<flatbuffers::FlatBufferBuilder::FieldLoc>::allocate(unsigned long, void const*) (new_allocator.h:104)
==17891==    by 0x4630AC: std::_Vector_base<flatbuffers::FlatBufferBuilder::FieldLoc, std::allocator<flatbuffers::FlatBufferBuilder::FieldLoc> >::_M_allocate(unsigned long) (in /home/travis/build/ray-project/ray/python/ray/core/src/local_scheduler/local_scheduler_tests)
==17891==    by 0x4616F7: flatbuffers::FlatBufferBuilder::FieldLoc* std::vector<flatbuffers::FlatBufferBuilder::FieldLoc, std::allocator<flatbuffers::FlatBufferBuilder::FieldLoc> >::_M_allocate_and_copy<std::move_iterator<flatbuffers::FlatBufferBuilder::FieldLoc*> >(unsigned long, std::move_iterator<flatbuffers::FlatBufferBuilder::FieldLoc*>, std::move_iterator<flatbuffers::FlatBufferBuilder::FieldLoc*>) (stl_vector.h:1138)
==17891==    by 0x460454: std::vector<flatbuffers::FlatBufferBuilder::FieldLoc, std::allocator<flatbuffers::FlatBufferBuilder::FieldLoc> >::reserve(unsigned long) (vector.tcc:75)
==17891==    by 0x45F265: flatbuffers::FlatBufferBuilder::FlatBufferBuilder(unsigned int, flatbuffers::simple_allocator const*) (flatbuffers.h:662)
==17891==    by 0x4791AA: TaskBuilder::TaskBuilder() (in /home/travis/build/ray-project/ray/python/ray/core/src/local_scheduler/local_scheduler_tests)
==17891==    by 0x476F17: make_task_builder() (task.cc:136)
==17891==    by 0x4570CE: main (local_scheduler_tests.cc:689)
==17891== 
==17891== 392 bytes in 1 blocks are still reachable in loss record 7 of 8
==17891==    at 0x4C2B0E0: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==17891==    by 0x476EF6: make_task_builder() (task.cc:136)
==17891==    by 0x4570CE: main (local_scheduler_tests.cc:689)
==17891== 
==17891== 1,024 bytes in 1 blocks are still reachable in loss record 8 of 8
==17891==    at 0x4C2B800: operator new[](unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==17891==    by 0x45ECA7: flatbuffers::simple_allocator::allocate(unsigned long) const (flatbuffers.h:488)
==17891==    by 0x45ED1D: flatbuffers::vector_downward::vector_downward(unsigned long, flatbuffers::simple_allocator const&) (flatbuffers.h:501)
==17891==    by 0x45F1F8: flatbuffers::FlatBufferBuilder::FlatBufferBuilder(unsigned int, flatbuffers::simple_allocator const*) (flatbuffers.h:661)
==17891==    by 0x4791AA: TaskBuilder::TaskBuilder() (in /home/travis/build/ray-project/ray/python/ray/core/src/local_scheduler/local_scheduler_tests)
==17891==    by 0x476F17: make_task_builder() (task.cc:136)
==17891==    by 0x4570CE: main (local_scheduler_tests.cc:689)
==17891== 
==17891== LEAK SUMMARY:
==17891==    definitely lost: 0 bytes in 0 blocks
==17891==    indirectly lost: 0 bytes in 0 blocks
==17891==      possibly lost: 34 bytes in 1 blocks
==17891==    still reachable: 1,636 bytes in 7 blocks
==17891==         suppressed: 0 bytes in 0 blocks
==17891== 
==17891== For counts of detected and suppressed errors, rerun with: -v
==17891== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething that is supposed to be working; but isn't

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions