Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[camera_info_manager] Segmentation fault #198

Open
MatthijsBurgh opened this issue Jul 9, 2021 · 2 comments
Open

[camera_info_manager] Segmentation fault #198

MatthijsBurgh opened this issue Jul 9, 2021 · 2 comments

Comments

@MatthijsBurgh
Copy link

MatthijsBurgh commented Jul 9, 2021

On a regular bases I get a segmentation fault in the camera_info_manager, in the isCalibrated function.

terminate called after throwing an instance of 'boost::wrapexcept<boost::lock_error>'
  what():  boost: mutex lock failed in pthread_mutex_lock: Invalid argument

It is related to the scoped_lock in that function,

boost::mutex::scoped_lock lock_(mutex_);

I have tried with a with a boost::lock_guard, but also a std::mutex in combination with a std::lock_guard. I keep getting seg faults on that line.

The camera_info_manager is used as part of the openni2_driver which is run as a nodelet.

To me it isn't logical the lock should result in a segfault. I have run many gdb sessions, but I couldn't find anything else that catched my eye.

@MatthijsBurgh
Copy link
Author

@vrabaud @jack-oquin @mjcarroll You got any idea about this?

@devrite
Copy link

devrite commented Jul 31, 2021

One reason might be you using camera_info_manager when it is already destroyed or not fully constructed yet (some race). In which case the mutex can be invalid to use.

Another cause:

I had boost issues before. In my case another proprietary API exported boost symbols of an incompatible version and started using those symbols. In this case you may inspect whether or not you end up in a function symbols of another DSO not part of your lib.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants