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

[jsk_topic_tools/SynchronizedThrottle] Reset sync policy in destructor #1640

Merged
merged 1 commit into from
Nov 14, 2019

Conversation

iory
Copy link
Member

@iory iory commented Nov 8, 2019

In SynchronizedThrottle, if node is killed, the following error occurs.

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

This PR fixes this behavior.
Also see ros/ros_comm#720 .

@YutoUchimi
Copy link
Contributor

without this PR
https://travis-ci.org/jsk-ros-pkg/jsk_common/jobs/600547156

5449[jsk_topic_tools:make] -- run_tests.py: execute commands
5450[jsk_topic_tools:make]   /opt/ros/indigo/share/rostest/cmake/../../../bin/rostest --pkgdir=/home/travis/ros/ws_jsk_common/src/jsk_common/jsk_topic_tools --package=jsk_topic_tools --results-filename test_test_synchronized_throttle.xml --results-base-dir /home/travis/ros/ws_jsk_common/build/jsk_topic_tools/test_results /home/travis/ros/ws_jsk_common/src/jsk_common/jsk_topic_tools/test/test_synchronized_throttle.test 
5451[jsk_topic_tools:make] ... logging to /home/travis/.ros/log/rostest-c0f29cbedc7b-30222.log
5452[jsk_topic_tools:make] [ROSUNIT] Outputting test results to /home/travis/ros/ws_jsk_common/build/jsk_topic_tools/test_results/jsk_topic_tools/rostest-test_test_synchronized_throttle.xml
5453[jsk_topic_tools:make] [ INFO] [1571637630.327067104]: Initializing nodelet with 2 worker threads.
5454[jsk_topic_tools:make] [ INFO] [1571637630.391821098]: Initializing nodelet with 2 worker threads.
5455[jsk_topic_tools:make] [ INFO] [1571637635.449322452]: All topics are now published and synchronized
5456[jsk_topic_tools:make] terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::lock_error> >'
5457[jsk_topic_tools:make]   what():  boost: mutex lock failed in pthread_mutex_lock: Invalid argument
5458All topics are now published and synchronized
5459[jsk_topic_tools:make] testtest_synchronized_throttle ... ok
5460[jsk_topic_tools:make] 
5461[jsk_topic_tools:make] [ROSTEST]-----------------------------------------------------------------------
5462[jsk_topic_tools:make] 
5463[jsk_topic_tools:make] [jsk_topic_tools.rosunit-test_synchronized_throttle/test_async][passed]
5464[jsk_topic_tools:make] [jsk_topic_tools.rosunit-test_synchronized_throttle/test_async_delay][passed]
5465[jsk_topic_tools:make] [jsk_topic_tools.rosunit-test_synchronized_throttle/test_sync][passed]
5466[jsk_topic_tools:make] [jsk_topic_tools.rosunit-test_synchronized_throttle/test_sync_delay][passed]
5467[jsk_topic_tools:make] 
5468[jsk_topic_tools:make] SUMMARY
5469[jsk_topic_tools:make]  * RESULT: SUCCESS
5470[jsk_topic_tools:make]  * TESTS: 4
5471[jsk_topic_tools:make]  * ERRORS: 0
5472[jsk_topic_tools:make]  * FAILURES: 0
5473[jsk_topic_tools:make] 
5474[jsk_topic_tools:make] rostest log file is in /home/travis/.ros/log/rostest-c0f29cbedc7b-30222.log
5475[jsk_topic_tools:make] -- run_tests.py: verify result "/home/travis/ros/ws_jsk_common/build/jsk_topic_tools/test_results/jsk_topic_tools/rostest-test_test_synchronized_throttle.xml"

with this PR
https://travis-ci.org/jsk-ros-pkg/jsk_common/jobs/609161766

5059[jsk_topic_tools:make] -- run_tests.py: execute commands
5060[jsk_topic_tools:make]   /opt/ros/indigo/share/rostest/cmake/../../../bin/rostest --pkgdir=/home/travis/ros/ws_jsk_common/src/jsk_common/jsk_topic_tools --package=jsk_topic_tools --results-filename test_test_synchronized_throttle.xml --results-base-dir /home/travis/ros/ws_jsk_common/build/jsk_topic_tools/test_results /home/travis/ros/ws_jsk_common/src/jsk_common/jsk_topic_tools/test/test_synchronized_throttle.test 
5061[jsk_topic_tools:make] ... logging to /home/travis/.ros/log/rostest-fb3e36f3268c-25814.log
5062[jsk_topic_tools:make] [ROSUNIT] Outputting test results to /home/travis/ros/ws_jsk_common/build/jsk_topic_tools/test_results/jsk_topic_tools/rostest-test_test_synchronized_throttle.xml
5063[jsk_topic_tools:make] [ INFO] [1573212123.121521430]: Initializing nodelet with 2 worker threads.
5064[jsk_topic_tools:make] [ INFO] [1573212123.209628651]: Initializing nodelet with 2 worker threads.
5065[jsk_topic_tools:make] [ INFO] [1573212128.273663134]: All topics are now published and synchronized
5066[jsk_topic_tools:make] [ INFO] [1573212128.291686189]: All topics are now published and synchronized
5067[jsk_topic_tools:make] testtest_synchronized_throttle ... ok
5068[jsk_topic_tools:make] 
5069[jsk_topic_tools:make] [ROSTEST]-----------------------------------------------------------------------
5070[jsk_topic_tools:make] 
5071[jsk_topic_tools:make] [jsk_topic_tools.rosunit-test_synchronized_throttle/test_async][passed]
5072[jsk_topic_tools:make] [jsk_topic_tools.rosunit-test_synchronized_throttle/test_async_delay][passed]
5073[jsk_topic_tools:make] [jsk_topic_tools.rosunit-test_synchronized_throttle/test_sync][passed]
5074[jsk_topic_tools:make] [jsk_topic_tools.rosunit-test_synchronized_throttle/test_sync_delay][passed]
5075[jsk_topic_tools:make] 
5076[jsk_topic_tools:make] SUMMARY
5077[jsk_topic_tools:make]  * RESULT: SUCCESS
5078[jsk_topic_tools:make]  * TESTS: 4
5079[jsk_topic_tools:make]  * ERRORS: 0
5080[jsk_topic_tools:make]  * FAILURES: 0
5081[jsk_topic_tools:make] 
5082[jsk_topic_tools:make] rostest log file is in /home/travis/.ros/log/rostest-fb3e36f3268c-25814.log
5083[jsk_topic_tools:make] -- run_tests.py: verify result "/home/travis/ros/ws_jsk_common/build/jsk_topic_tools/test_results/jsk_topic_tools/rostest-test_test_synchronized_throttle.xml"

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

Successfully merging this pull request may close these issues.

3 participants