-
Notifications
You must be signed in to change notification settings - Fork 912
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
Does lock necessary for parameter server access? #401
Comments
With which version of ros_comm are you experiencing the issue? Can you provide a reproducible example to ease our troubleshooting? |
I am testing with the hydro release version of ros_comm 1.10.2. Run the deb version of rosbridge and open up the webpage below. You might want to wget roslibjs and eventemitter2 beforehand.
|
If you refresh the webpage a couple of times you will see something like this. Since it is thread related , I couldn't find any better way to replicate the problem...
|
The actuall set/get param is called in rosapi. https://github.com/RobotWebTools/rosbridge_suite/blob/develop/rosapi/src/rosapi/params.py#L43-L67 |
I can see the same error messages but for me it happens on every refresh - not only occasionally. I am not sure if the stacktrace is related to multi threaded invocation. But the Python parameter API does not provide thread-safe access (http://wiki.ros.org/rospy/Overview/Parameter%20Server). You might need to deal with the locking in your user land code. Perhaps you want to fill this ticket against rosbridge so that deal with locking for you? |
Ok. Actually, @lrasinen has created a PR to patch rosbridge side. But I just wanted to make sure if anything happen in ros_comm. Because, I have noticed similar behavior when I tried to call roslib.launcher.load_manifest while testing this question. And also I thought it is a new behavior which didn't happen before since roslibjs test code has been around for a year without any problem. I will proceed the patch in rosbridge side. Thanks for explanation @dirk-thomas |
I wonder if parameter server is not thread-safe anymore. I have tried to get and set params almost simultaneously using rosbridge, and it raised an error.
Here are some test code using rosbridge. RobotWebTools/rosbridge_suite#103.
I believe this is introduced recently since I was able to replicate the problem using default roslibjs test code. The test code was developed more than a year ago and worked fine until I see this issue. And I can confirm that no logic inside of rosbridge has changed.
The text was updated successfully, but these errors were encountered: