-
Notifications
You must be signed in to change notification settings - Fork 280
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
file COPY cannot set permissions for 05.catkin_make.bash #718
Comments
Please provide an example command sequence for which it at least happens sometimes. |
ok, I finally able to find the way to reproduce this issue, see https://travis-ci.org/k-okada/test_catkin_parallel/jobs/50891940#L2704 |
So the file in question (based on your travis-ci job) being installed which presumably collides is If you build multiple packages in parallel which create the same file then you can get a collision like this. The question is why is this file being installed by more than one package. In the original post it is the tab completion for Lines 197 to 203 in 2599eb9
@dirk-thomas why is that being done? |
thanks for looking into, I found that we sometimes have copy error on both it seems catkin checks if the 05.catkin_make_isolated.bash exists ( catkin/cmake/catkin_add_env_hooks.cmake Line 128 in 2599eb9
install command atomic or not.
|
@wjwwood Indeed, the completion scripts could be registered only once for catkin itself. @k-okada I can't tell why the operation fails. It could be any kind of system reason: permission denied, no space left on device, destination directory does not exist, etc. CMake does not report the actual cause (http://public.kitware.com/Bug/view.php?id=14700). The travis log you referenced does not involve an catkin/cmake/catkin_add_env_hooks.cmake Line 91 in 7c2682f
|
it only happens if you build multiple catkin packag and it happens randomly, so may be |
For the problem you are describing that doesn't seem to be a problem but it seems to be unable to perform the copy. |
I believe that copy is never atomic, only rename. But rename either doesn't work across filesystems or is no longer atomic when used across filesystems, I don't remember which. I do remember talking about creating a peer file in the destination folder with a random name and then using rename to rename the randomly named file to the target name. This is both atomic and guaranteed to work since the file being renamed is always on the same filesystems since they are in the same folder. But that's not the point, I think the important question here is _why_ are these particular files getting installed by more than one package? I would have thought only catkin would install these files. We've taken pains to make sure that files written by multiple packages due to catkin are done using the rename action as their final step, but if configure file or copy are used to create other files which are known to be written to the same place then this error will continue to happen.
It's not considered to be atomic, but as @dirk-thomas said, this isn't an install problem, this collision is happening in the develspace. |
Some of the environment hooks (the ones for completion) do not need to be installed for other packages than catkin. That is easy to fix. But some of the environment hooks (setting the variables for test results) must be installed for every package. So for them the copy to the devel space needs to be atomic if their destination across packages is the same and they are being invoked in concurrently. |
@dirk-thomas @wjwwood +1 on this issue. Do you have a workaround for this? |
We do not. We need to sit down and discuss it in more detail. This is a conceptual problem and we'll likely have to adjust how we do testing (or at least how we pass the test directory to rostest) to make it work. |
This is related to #719 |
Some of the environment hooks have been removed in b298bb1#diff-4711d7d40543d1cda255cb4f83806100 The remaining ones should only be added for the catkin package: #732 Therefore I will close this ticket since it should not be an issue anymore. |
we sometimes see following error when we compile multiple packages in parallel, I still can not find a way to reproduce this issue perfectly, but it occurs sometimes. It seems we have to not to overwrite on
https://github.com/ros/catkin/blob/indigo-devel/cmake/catkin_add_env_hooks.cmake#L91, or find any other way to write atomic copy.
The text was updated successfully, but these errors were encountered: