-
Notifications
You must be signed in to change notification settings - Fork 16
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
Semaphore name needs to be randomized, otherwise clash with other users is unavoidable #56
Comments
FYI @mjcarroll added the semaphore stuff according to git blame. |
Busted :) I think having a randomized suffix makes perfect sense. Is this something you are interested in contributing? |
I can definitely prepare a PR appending a random string/number to the semaphore name. But as I don't know the architecture of ign-launch, I can't foresee the consequences (if there are any). |
The semaphore was added to fix the way that we were originally using It was originally supposed to be an unnamed semaphore, but MacOS explicitly has to be named. Because the original implementation was unnamed, I don't see any issue with adding a randomized string. The semaphore is not being accessed across multiple launch instances or being used in a way that the name is needed. |
Okay, then I can prepare the PR. One thing to think through - shouldn't we go with unnamed semaphores on non-Mac platforms? |
I opted to used named semaphores for all platforms to prevent having to maintain platform specific code. |
Fix posted in #57. |
Fixes gazebosim#56. Signed-off-by: Martin Pecka <[email protected]>
Fixes gazebosim#56. Signed-off-by: Martin Pecka <[email protected]>
Fixes gazebosim#56. Signed-off-by: Martin Pecka <[email protected]>
Fixes #56. Signed-off-by: Martin Pecka <[email protected]>
Could I ask for a release of ign-launch1 which includes this fix? It'd simplify our testing... |
See #61 |
On some of our cluster nodes, when I run Ignition Blueprint/ign-launch1 (the SubT simulator), I get an error:
That points to
https://github.com/ignitionrobotics/ign-launch/blob/9f4a9298b2f549cd0df66d30f9c5942198593ea5/src/Manager.cc#L298
which can fail in case the semaphore with name
https://github.com/ignitionrobotics/ign-launch/blob/9f4a9298b2f549cd0df66d30f9c5942198593ea5/src/Manager.cc#L50
already exists and is created by another user with permissions that don't allow modification of the semaphore (i.e. 644).
I've checked that on the failing nodes, the semaphore indeed exists and is created by someone else:
In such a case, I can't use Ignition launch at all on that cluster node.
It'd be much better to name the semaphore either randomly, or predictably incorporating the username. Some other apps create semaphores named e.g.:
The text was updated successfully, but these errors were encountered: