----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/7720/ -----------------------------------------------------------
(Updated Oct. 29, 2012, 2:16 a.m.) Review request for mesos, Benjamin Hindman and Ben Mahler. Changes ------- Ben's comments. I'm getting a very strange* SEGFAULT issue, when I move allocator.cpp into allocator.hpp and inline all the methods. The first test succeeds, and then second one segfaults. Here is a gdb trace. [ OK ] MasterTest.TaskRunning (99 ms) [ RUN ] MasterTest.KillTask I1028 13:32:40.872483 28352512 master.cpp:304] Master started on 192.168.1.127:57593 I1028 13:32:40.872520 28352512 master.cpp:319] Master ID: 201210281332-2130815168-57593-19716 Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_INVALID_ADDRESS at address: 0x00000002ffffffa0 [Switching to process 19716] 0x00007fff81a61162 in std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string () (gdb) thread apply all bt Thread 6 (process 19716): #0 0x00007fff8a4f6932 in select$DARWIN_EXTSN () #1 0x0000000100eca3d8 in select_poll (loop=0x10111cea0, timeout=<value temporarily unavailable, due to optimizations>) at ev_select.c:168 #2 0x0000000100ecb1e7 in ev_loop (loop=0x10111cea0, flags=<value temporarily unavailable, due to optimizations>) at ev.c:2311 #3 0x0000000100d5996e in process::serve () at basic_string.h:238 #4 0x00007fff8a4ebfd6 in _pthread_start () #5 0x00007fff8a4ebe89 in thread_start () Thread 5 (process 19716): #0 0x00007fff81a61162 in std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string () #1 0x00000001000d7a0e in Flag [inlined] () at /Users/vinod/workspace/apache/mesos/src/flags/flag.hpp:107 #2 Flag [inlined] () at flag.hpp:69 #3 pair [inlined] () at /usr/include/c++/4.2.1/bits/stl_pair.h:14 #4 pair [inlined] () at flag.hpp:107 #5 __gnu_cxx::new_allocator<std::pair<std::string const, flags::Flag> >::construct () at /usr/include/c++/4.2.1/ext/new_allocator.h:69 #6 std::_Rb_tree<std::string, std::pair<std::string const, flags::Flag>, std::_Select1st<std::pair<std::string const, flags::Flag> >, std::less<std::string>, std::allocator<std::pair<std::string const, flags::Flag> > >::_M_create_node () at /usr/include/c++/4.2.1/bits/stl_tree.h:380 #7 std::_Rb_tree<std::string, std::pair<std::string const, flags::Flag>, std::_Select1st<std::pair<std::string const, flags::Flag> >, std::less<std::string>, std::allocator<std::pair<std::string const, flags::Flag> > >::_M_clone_node () at /usr/include/c++/4.2.1/bits/stl_tree.h:392 #8 0x00000001000d7a0e in std::_Rb_tree<std::string, std::pair<std::string const, flags::Flag>, std::_Select1st<std::pair<std::string const, flags::Flag> >, std::less<std::string>, std::allocator<std::pair<std::string const, flags::Flag> > >::_M_copy (this=0x101b08cc0, __x=0x2ffffff80, __p=0x101b08cc8) at stl_pair.h:1287 #9 0x0000000100bcb0bf in process::dispatch<mesos::internal::master::AllocatorProcess, mesos::internal::master::Flags const&, process::PID<mesos::internal::master::Master> const&, mesos::internal::master::Flags, process::PID<mesos::internal::master::Master> > () at basic_string.h:238 #10 0x0000000100b864d6 in mesos::internal::master::Master::initialize () at basic_string.h:238 #11 0x0000000100d5daa0 in process::ProcessManager::resume () at basic_string.h:238 #12 0x0000000100d5e47c in process::schedule () at basic_string.h:238 #13 0x00007fff8a4ebfd6 in _pthread_start () #14 0x00007fff8a4ebe89 in thread_start () Thread 4 (process 19716): #0 0x00007fff8a4eda6a in __semwait_signal () #1 0x00007fff8a4f1881 in _pthread_cond_wait () #2 0x0000000100db0d10 in Gate::arrive () at basic_string.h:238 #3 0x0000000100d5e45e in process::schedule () at basic_string.h:238 #4 0x00007fff8a4ebfd6 in _pthread_start () #5 0x00007fff8a4ebe89 in thread_start () Thread 3 (process 19716): #0 0x00007fff8a4eda6a in __semwait_signal () #1 0x00007fff8a4f1881 in _pthread_cond_wait () #2 0x0000000100db0d10 in Gate::arrive () at basic_string.h:238 #3 0x0000000100d5e45e in process::schedule () at basic_string.h:238 #4 0x00007fff8a4ebfd6 in _pthread_start () #5 0x00007fff8a4ebe89 in thread_start () Thread 2 (process 19716): #0 0x00007fff8a4eda6a in __semwait_signal () #1 0x00007fff8a4f1881 in _pthread_cond_wait () #2 0x0000000100db0d10 in Gate::arrive () at basic_string.h:238 #3 0x0000000100d5e45e in process::schedule () at basic_string.h:238 #4 0x00007fff8a4ebfd6 in _pthread_start () #5 0x00007fff8a4ebe89 in thread_start () Thread 1 (process 19716): #0 MasterTest_KillTask_Test::TestBody (this=<value temporarily unavailable, due to optimizations>) at stl_vector.h:608 #1 0x000000010032fe05 in testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void> () at basic_string.h:493 #2 0x000000010033ae6f in testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void> () at basic_string.h:493 #3 0x00000001003274d1 in testing::Test::Run () at basic_string.h:493 #4 0x000000010032e034 in testing::TestInfo::Run () at basic_string.h:493 #5 0x000000010032e187 in testing::TestCase::Run () at basic_string.h:493 #6 0x000000010032e476 in testing::internal::UnitTestImpl::RunAllTests () at basic_string.h:493 #7 0x00000001003302b7 in testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool> () at basic_string.h:493 #8 0x000000010033a8f8 in testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool> () at basic_string.h:493 #9 0x0000000100326c81 in testing::UnitTest::Run () at basic_string.h:493 #10 0x0000000100019b92 in main (argc=2, argv=<value temporarily unavailable, due to optimizations>) at ../../src/tests/main.cpp:205 Description ------- Specifically: --> Allocator writers don't need to do extra work to make their allocator async. This is guaranteed/enforced by the Allocator interface. --> Inside master, the allocator calls looks like method calls instead of dispatches. Diffs (updated) ----- src/local/local.hpp cd0483c72f919e08a67b4eeaebef3b62b0ff9798 src/local/local.cpp 67c7a7c260d2ea610fb64b491f9bf7a22ec53aac src/master/allocator.hpp 9fd790564d1361b9bdb2111f29348a631f66c831 src/master/allocator.cpp 3f822912a4e0c50c1612eac98ae85447aae023d4 src/master/drf_sorter.hpp 9c43ba32c6ed04fd6960524b5925c5c27c3e4d2d src/master/drf_sorter.cpp 0ab4a14ca0bfb721de00e29d993fd4aa08a27ac5 src/master/hierarchical_allocator_process.hpp 266d339bdb72f8c63288d91c1f514da07ee9acf2 src/master/main.cpp 813ef7de8e57b1cbd688e6e34e360c7b191ed641 src/master/master.hpp 146af017bbb6da9bd44acb53a4f1ee0ffbedd64f src/master/master.cpp 82e4dc704e5c67ec178bd058934896328308d868 src/master/sorter.hpp 80d0893b1f988898e40ae3a2f6f19a117ad5f72d src/sched/sched.cpp 5a4e594a3a8a2089cf74e7e418f2e7bde4c03e9d src/tests/allocator_tests.cpp ed52ff61b1820cb3f5f7f2ae421fb3f84a85939a src/tests/allocator_zookeeper_tests.cpp bd408c22df5edc3684791e509ce1a4c210553922 src/tests/fault_tolerance_tests.cpp 558bf41ab6f4ba319ec3b23f3347f98e235260f9 src/tests/gc_tests.cpp 1de240579a1cc6af8738d2ffb5da1b3e01c4b19e src/tests/master_detector_tests.cpp fb32af8130d3f359eecba5389c2e42c247d6b70e src/tests/master_tests.cpp 37e97e0a58a0128579f155183b7e769ab4e1b452 src/tests/resource_offers_tests.cpp c50da38508694f956ad104fb160896eb9b9d5fea src/tests/utils.hpp 4066c02b23db15310104955465c4e4afd7bcad5b Diff: https://reviews.apache.org/r/7720/diff/ Testing ------- make check Thanks, Vinod Kone
