Open osrf-migration opened 8 years ago
Original comment by Steve Peters (Bitbucket: Steven Peters, GitHub: scpeters).
the following patch makes this test fail every time:
diff -r 5e1b4aafa300d6d92a2b1bd2a71bf2b6273c566c gazebo/physics/WorldState.cc
--- a/gazebo/physics/WorldState.cc Thu Aug 25 15:55:30 2016 -0700
+++ b/gazebo/physics/WorldState.cc Wed Sep 07 18:07:57 2016 -0700
@@ -26,6 +26,7 @@
#include "gazebo/common/Console.hh"
#include "gazebo/common/Exception.hh"
+#include "gazebo/common/Time.hh"
#include "gazebo/physics/World.hh"
#include "gazebo/physics/Model.hh"
#include "gazebo/physics/Light.hh"
@@ -353,6 +354,7 @@
for (ModelState_M::const_iterator iter =
_state.modelStates.begin(); iter != _state.modelStates.end(); ++iter)
{
+ common::Time::MSleep(1);
if (this->HasModelState(iter->second.GetName()))
{
ModelState state = this->GetModelState(iter->second.GetName()) -
@@ -372,6 +374,7 @@
// Subtract the light states.
for (const auto &light : _state.lightStates)
{
+ common::Time::MSleep(1);
if (this->HasLightState(light.second.GetName()))
{
LightState state = this->GetLightState(light.second.GetName()) -
@@ -392,6 +395,7 @@
for (ModelState_M::const_iterator iter =
this->modelStates.begin(); iter != this->modelStates.end(); ++iter)
{
+ common::Time::MSleep(1);
if (!_state.HasModelState(iter->second.GetName()) && this->world)
{
ModelPtr model = this->world->GetModel(iter->second.GetName());
@@ -403,6 +407,7 @@
// Add in the new light states
for (const auto &light : this->lightStates)
{
+ common::Time::MSleep(1);
if (!_state.HasLightState(light.second.GetName()) && this->world)
{
LightPtr lightPtr = this->world->Light(light.second.GetName());
Original comment by Steve Peters (Bitbucket: Steven Peters, GitHub: scpeters).
the following seems to help but doesn't completely fix it
diff -r 5e1b4aafa300d6d92a2b1bd2a71bf2b6273c566c gazebo/physics/World.cc
--- a/gazebo/physics/World.cc Thu Aug 25 15:55:30 2016 -0700
+++ b/gazebo/physics/World.cc Wed Sep 07 18:12:41 2016 -0700
@@ -2397,6 +2397,7 @@
}
// Clear everything.
+ boost::mutex::scoped_lock lockStates(this->dataPtr->logMutex);
this->dataPtr->states[0].clear();
this->dataPtr->states[1].clear();
this->dataPtr->stateToggle = 0;
Original report (archived issue) by Steve Peters (Bitbucket: Steven Peters, GitHub: scpeters).
I've seen an identical backtrace in
UNIT_DataLogger_TEST
two nights in a row, though with slightly different console output (full details here). It was found on the default branch (cec393b3dbdbf38236cdc5969590cddc09282e65).The test fails during the
StressTest
, while randomly toggling the record button (DataLogger_TEST.cc:188). The segfault comes from theLogWorker
thread at World.cc:2585-2586, which is calling WorldState::operator-: