ros-infrastructure / buildfarm

Build scripts and notes for catkin debian build pipeline.
6 stars 15 forks source link

ccache: FATAL: Failed to create /var/cache/pbuilder/ccache/X/Y: Permission denied #150

Closed tfoote closed 10 years ago

tfoote commented 10 years ago

We ran a full hydro cycle and got approximately 9 instances of this error.

It can happen both in the body of the build and early in the cmake test compiles.

A trigger missing red got things going again.

<a href="http://jenkins.ros.org/job/ros-hydro-convex-decomposition_binarydeb_quantal_amd64/">ros-hydro-convex-decomposition_binarydeb_quantal_amd64</a>
ccache: FATAL: Failed to create /var/cache/pbuilder/ccache/d/7: Permission denied

<a href="http://jenkins.ros.org/job/ros-hydro-ecto_binarydeb_raring_i386/">ros-hydro-ecto_binarydeb_raring_i386</a>
ccache: FATAL: Failed to create /var/cache/pbuilder/ccache/f/b: Permission denied

<a href="http://jenkins.ros.org/job/ros-hydro-eml_binarydeb_raring_i386/">ros-hydro-eml_binarydeb_raring_i386</a>
ccache: FATAL: Failed to create /var/cache/pbuilder/ccache/2/f: Permission denied

<a href="http://jenkins.ros.org/job/ros-hydro-libuvc_binarydeb_raring_amd64/">ros-hydro-libuvc_binarydeb_raring_amd64</a>
Building remotely on 67.227.254.96
pbuilder --create ran
ccache: FATAL: Failed to create /var/cache/pbuilder/ccache/f/1: Permission denied

<a href="http://jenkins.ros.org/job/ros-hydro-prosilica-gige-sdk_binarydeb_raring_amd64/">ros-hydro-prosilica-gige-sdk_binarydeb_raring_amd64</a>
CMake Error at CMakeLists.txt:158 (add_library):
  Cannot find source file:

    PVAPI-NOTFOUND

  Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp
  .hxx .in .txx

<a href="http://jenkins.ros.org/job/ros-hydro-rtctree_binarydeb_quantal_i386/">ros-hydro-rtctree_binarydeb_quantal_i386</a>
ccache: FATAL: Failed to create /var/cache/pbuilder/ccache/2/0: Permission
  denied

<a href="http://jenkins.ros.org/job/ros-hydro-swiftnav_binarydeb_raring_amd64/">ros-hydro-swiftnav_binarydeb_raring_amd64</a>
Building remotely on 67.227.254.253  
ccache: FATAL: Failed to create /var/cache/pbuilder/ccache/5/0: Permission
  denied

<a href="http://jenkins.ros.org/job/ros-hydro-urg-c_binarydeb_raring_amd64/">ros-hydro-urg-c_binarydeb_raring_amd64</a>
Building remotely on 67.227.255.12
ccache: FATAL: Failed to create /var/cache/pbuilder/ccache/e/1: Permission denied

<a href="http://jenkins.ros.org/job/ros-hydro-uwsim-osgocean_binarydeb_quantal_amd64/">ros-hydro-uwsim-osgocean_binarydeb_quantal_amd64</a>
Building remotely on 67.227.254.94 
ccache: FATAL: Failed to create /var/cache/pbuilder/ccache/8/7: Permission
  denied

<a href="http://jenkins.ros.org/job/ros-hydro-uwsim-osgocean_binarydeb_raring_i386/">ros-hydro-uwsim-osgocean_binarydeb_raring_i386</a>
Building remotely on 67.227.254.94
ccache: FATAL: Failed to create /var/cache/pbuilder/ccache/5/3: Permission denied
tfoote commented 10 years ago

There's a very recent ticket on this here: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=666525 It looks to be a race condition between the internal build user and the root chroot setup both using ccache.

There doesn't seem to be an easy work around (besides disabling ccache) while waiting for the patch. As it's a low percentage of our builds I"m going to close with a won't fix. We can reopen if the prevalence increases in the future.

dirk-thomas commented 10 years ago

Can you describe which concurrent uses are actually colliding? What does "internal build user" and "root chroot setup" stand for?

Would it be possible to separate both by giving one of them a custom CCACHE_BASEDIR?

tfoote commented 10 years ago

My summary is from the ticket. Find more details there. These are the users inside the pbuilder process, there's root and pbuilder users inside the chroot as you don't want to build as root.

That is the basic fix. They turn off CCACHE for the root invocations.

The fix is submitted upstream at http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=73;filename=pbuilder_ccache_666525.diff;att=1;bug=666525