You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@mesos.apache.org by "James Peach (JIRA)" <ji...@apache.org> on 2017/04/17 18:17:41 UTC

[jira] [Created] (MESOS-7394) libprocess test failures double-free stack-allocated processes

James Peach created MESOS-7394:
----------------------------------

             Summary: libprocess test failures double-free stack-allocated processes
                 Key: MESOS-7394
                 URL: https://issues.apache.org/jira/browse/MESOS-7394
             Project: Mesos
          Issue Type: Bug
            Reporter: James Peach


Some of the {{libprocess}} tests will allocate a {{Process}} on the stack and then {{wait}} on that at the end of the test. If the test fails before the process it waited on, however, {{gtest}} returns from the test function, causing the stack variable to be deallocated. However, there is still a pointer to in the {{libprocess}} {{ProcessManager}}, so when {{libprocess}} finalizes, we end up throwing exceptions because the stack variable is trashed.

For example:
{code}
#0  0x00007ffff43a291f in raise () from /lib64/libc.so.6
#1  0x00007ffff43a451a in abort () from /lib64/libc.so.6
#2  0x00007ffff4ce452d in __gnu_cxx::__verbose_terminate_handler() () from /lib64/libstdc++.so.6
#3  0x00007ffff4ce22d6 in ?? () from /lib64/libstdc++.so.6
#4  0x00007ffff4ce2321 in std::terminate() () from /lib64/libstdc++.so.6
#5  0x00007ffff4ce2539 in __cxa_throw () from /lib64/libstdc++.so.6
#6  0x00007ffff4d0c02f in std::__throw_length_error(char const*) () from /lib64/libstdc++.so.6
#7  0x00007ffff4d76a5c in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_create(unsigned long&, unsigned long) () from /lib64/libstdc++.so.6
#8  0x00007ffff4d794ed in void std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char*>(char*, char*, std::forward_iterator_tag) () from /lib64/libstdc++.so.6
#9  0x00007ffff4d7954f in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
    () from /lib64/libstdc++.so.6
#10 0x000000000041d413 in process::UPID::UPID (this=0x7fffffffdd00, that=...) at ../../../3rdparty/libprocess/include/process/pid.hpp:44
#11 0x0000000000430d86 in process::ProcessBase::self (this=0x7fffffffd338) at ../../../3rdparty/libprocess/include/process/process.hpp:76
#12 0x000000000087d62e in process::ProcessManager::finalize (this=0xdc5c50) at ../../../3rdparty/libprocess/src/process.cpp:2682
#13 0x00000000008749f7 in process::finalize (finalize_wsa=true) at ../../../3rdparty/libprocess/src/process.cpp:1316
#14 0x00000000005dae1e in main (argc=1, argv=0x7fffffffdfe8) at ../../../3rdparty/libprocess/src/tests/main.cpp:82
{code}

An example test is {{ProcessTest.Http1}}.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)