[jira] [Commented] (MESOS-4633) Tests will dereference stack allocated agent objects upon assertion/expectation failure.
[ https://issues.apache.org/jira/browse/MESOS-4633?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15149225#comment-15149225 ] Joseph Wu commented on MESOS-4633: -- || WIP Reviews || Summary || | https://reviews.apache.org/r/43613/ | Refactor of {{cluster::}} helpers | | https://reviews.apache.org/r/43614/ | Change {{StartSlave}}/{{StartMaster}} helpers | | https://reviews.apache.org/r/43615/ | Tons and tons of test changes | | ??? | Outlier test changes | > Tests will dereference stack allocated agent objects upon > assertion/expectation failure. > > > Key: MESOS-4633 > URL: https://issues.apache.org/jira/browse/MESOS-4633 > Project: Mesos > Issue Type: Bug >Reporter: Joseph Wu >Assignee: Joseph Wu > Labels: flaky, mesosphere, tech-debt, test > > Tests that use the {{StartSlave}} test helper are generally fragile when the > test fails an assert/expect in the middle of the test. This is because the > {{StartSlave}} helper takes raw pointer arguments, which may be > stack-allocated. > In case of an assert failure, the test immediately exits (destroying stack > allocated objects) and proceeds onto test cleanup. The test cleanup may > dereference some of these destroyed objects, leading to a test crash like: > {code} > [18:27:36][Step 8/8] F0204 18:27:35.981302 23085 logging.cpp:64] RAW: Pure > virtual method called > [18:27:36][Step 8/8] @ 0x7f7077055e1c google::LogMessage::Fail() > [18:27:36][Step 8/8] @ 0x7f707705ba6f google::RawLog__() > [18:27:36][Step 8/8] @ 0x7f70760f76c9 __cxa_pure_virtual > [18:27:36][Step 8/8] @ 0xa9423c > mesos::internal::tests::Cluster::Slaves::shutdown() > [18:27:36][Step 8/8] @ 0x1074e45 > mesos::internal::tests::MesosTest::ShutdownSlaves() > [18:27:36][Step 8/8] @ 0x1074de4 > mesos::internal::tests::MesosTest::Shutdown() > [18:27:36][Step 8/8] @ 0x1070ec7 > mesos::internal::tests::MesosTest::TearDown() > {code} > The {{StartSlave}} helper should take {{shared_ptr}} arguments instead. > This also means that we can remove the {{Shutdown}} helper from most of these > tests. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (MESOS-4633) Tests will dereference stack allocated agent objects upon assertion/expectation failure.
[ https://issues.apache.org/jira/browse/MESOS-4633?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15142429#comment-15142429 ] Michael Park commented on MESOS-4633: - {noformat} commit 28917d657a69ee4731375ba54fe67d13816198ff Author: Joseph WuDate: Wed Feb 10 16:56:35 2016 -0800 Constrain `Option`'s forwarding constructor to constructible types. Review: https://reviews.apache.org/r/43434/ {noformat} > Tests will dereference stack allocated agent objects upon > assertion/expectation failure. > > > Key: MESOS-4633 > URL: https://issues.apache.org/jira/browse/MESOS-4633 > Project: Mesos > Issue Type: Bug >Reporter: Joseph Wu >Assignee: Joseph Wu > Labels: flaky, mesosphere, tech-debt, test > > Tests that use the {{StartSlave}} test helper are generally fragile when the > test fails an assert/expect in the middle of the test. This is because the > {{StartSlave}} helper takes raw pointer arguments, which may be > stack-allocated. > In case of an assert failure, the test immediately exits (destroying stack > allocated objects) and proceeds onto test cleanup. The test cleanup may > dereference some of these destroyed objects, leading to a test crash like: > {code} > [18:27:36][Step 8/8] F0204 18:27:35.981302 23085 logging.cpp:64] RAW: Pure > virtual method called > [18:27:36][Step 8/8] @ 0x7f7077055e1c google::LogMessage::Fail() > [18:27:36][Step 8/8] @ 0x7f707705ba6f google::RawLog__() > [18:27:36][Step 8/8] @ 0x7f70760f76c9 __cxa_pure_virtual > [18:27:36][Step 8/8] @ 0xa9423c > mesos::internal::tests::Cluster::Slaves::shutdown() > [18:27:36][Step 8/8] @ 0x1074e45 > mesos::internal::tests::MesosTest::ShutdownSlaves() > [18:27:36][Step 8/8] @ 0x1074de4 > mesos::internal::tests::MesosTest::Shutdown() > [18:27:36][Step 8/8] @ 0x1070ec7 > mesos::internal::tests::MesosTest::TearDown() > {code} > The {{StartSlave}} helper should take {{shared_ptr}} arguments instead. > This also means that we can remove the {{Shutdown}} helper from most of these > tests. -- This message was sent by Atlassian JIRA (v6.3.4#6332)