ros / dynamic_reconfigure

BSD 3-Clause "New" or "Revised" License
48 stars 111 forks source link

mutex lock error #116

Closed snakehaihai closed 5 years ago

snakehaihai commented 5 years ago

Hey i`m trying to run a code which calls for dynamic reconfgure. build has no issue. in previous 12.04 os has no issue. but once shift to 18.04. we encounter this error

demo_flight_control: /usr/include/boost/thread/pthread/recursive_mutex.hpp:113: void boost::recursive_mutex::lock(): Assertion `!pthread_mutex_lock(&m)' failed. ^CAborted (core dumped)

right after calling dynamic_reconfigure::Server server;

And it is somehow prevent code from running.

May I ask how to solve it?

I`m using ubuntu 18.04 with ros melodic

mikaelarguedas commented 5 years ago

@snakehaihai can you please provide a reproducible example? this issue description is unfortunately not sufficient to investigate the issue.

Thanks!

snakehaihai commented 5 years ago

I answer the question myself. Reformat PC. Reinstall everything. Problem Solved :)

atyshka commented 4 years ago

I too have this issue, following some code on ROS answers. My class has a private member of a boost::recursive_mutex and here's my constructor:

LabelingNode::LabelingNode(ros::NodeHandle& n, ros::NodeHandle& pn) : config_server_(config_mutex_) { boost::recursive_mutex::scoped_lock dyn_reconf_lock(config_mutex_); dyn_reconf_lock.unlock(); config_server_.setCallback(boost::bind(&LabelingNode::recvConfig, this, _1, _2)); }

My node immediately crashed with the following error: /usr/include/boost/thread/pthread/recursive_mutex.hpp:113: void boost::recursive_mutex::lock(): Assertion `!pthread_mutex_lock(&m)' failed. Aborted (core dumped)