Bug 9533 - FATAL: Could not create .... (permission denied?)
FATAL: Could not create .... (permission denied?)
Status: CLOSED FIXED
Product: ccache
Classification: Unclassified
Component: ccache
3.1.8
x86 Linux
: P5 normal
: 3.1.9
Assigned To: Joel Rosdahl
Joel Rosdahl
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-01-03 10:22 UTC by Treeve Jelbert
Modified: 2013-01-06 17:04 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Treeve Jelbert 2013-01-03 10:22:50 UTC
running as root on a 4core machine(AMD A10-5700) I have had this error twice when building a particular piece of software.(OpenCV)

Scanning dependencies of target pch_Generate_opencv_test_highgui
[ 13%] Generating test_precomp.hpp
[ 14%] Generating test_precomp.hpp.gch/opencv_test_highgui_Release.gch
ccache: FATAL: Could not create /var/cache/compiler/e/1/3e1e93f23393193cfbe6a16baad520-
2050005.o.tmp.stdout.Horos.22534 (permission denied?)
make[2]: *** [modules/core/perf_precomp.hpp.gch/opencv_perf_core_Release.gch] Error 1
make[1]: *** [modules/core/CMakeFiles/pch_Generate_opencv_perf_core.dir/all] Error 2


By the time that I check the directories, everything looks normal


$ ls -l /var/cache/compiler/e/1/
total 0

$ ls -l /var/cache/compiler/e/
total 568
drwxr-xr-x 2 root root 32768 Jan  3 10:38 0
drwxr-xr-x 2 root root 36864 Jan  3 10:38 1
drwxr-xr-x 2 root root 32768 Jan  3 10:29 2
drwxr-xr-x 2 root root 32768 Jan  3 10:29 3
drwxr-xr-x 2 root root 32768 Jan  3 10:44 4
drwxr-xr-x 2 root root 32768 Jan  3 10:29 5
drwxr-xr-x 2 root root 32768 Jan  3 10:40 6
drwxr-xr-x 2 root root 36864 Jan  3 10:29 7
drwxr-xr-x 2 root root 32768 Jan  3 10:36 8
drwxr-xr-x 2 root root 32768 Jan  3 10:29 9
drwxr-xr-x 2 root root 36864 Jan  3 10:29 a
drwxr-xr-x 2 root root 28672 Jan  3 10:29 b
drwxr-xr-x 2 root root 32768 Jan  3 10:29 c
drwxr-xr-x 2 root root 32768 Jan  3 10:29 d
drwxr-xr-x 2 root root 36864 Jan  3 10:38 e
drwxr-xr-x 2 root root 36864 Jan  3 10:29 f
-rw-r--r-- 1 root root    83 Jan  3 10:44 stats


# ccache -s
cache directory                     /root/.ccache
cache hit (direct)                  1060
cache hit (preprocessed)             573
cache miss                         17095
called for link                     4590
called for preprocessing             578
multiple source files                  1
compile failed                       287
preprocessor error                   150
can't use precompiled header        2491
bad compiler arguments                57
unsupported source language            2
autoconf compile/link                890
unsupported compiler option           23
no input file                       2440
files in cache                      5479
cache size                           1.5 Gbytes
max cache size                       2.0 Gbytes

# ls -l /root/.ccache
lrwxrwxrwx 1 root root 20 Oct 15  2009 /root/.ccache -> /var/cache/compiler/


It may be relevant that /var/cache is on a SSD drive

# df
Filesystem     1K-blocks     Used Available Use% Mounted on
/dev/sda1       20644348  6465588  13130184  33% /
/dev/sda5       21128344  5239144  14816056  27% /home
/dev/sda8       41284928 18000720  21187072  46% /var/git
/dev/sda7        4062816  2085324   1812348  54% /var/spool
/dev/sda9        6603288  3044436   3223340  49% /var/cache


# uname -a
Linux Horos 3.7.1 #50 SMP PREEMPT Tue Dec 18 11:35:24 CET 2012 x86_64 GNU/Linux

$ gcc -v
Using built-in specs.
COLLECT_GCC=/usr/bin/gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/4.7.2/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /usr/src/gcc-4.7.2/configure --prefix=/usr --infodir=/usr/share/info --mandir=/usr/share/man --enable-threads=posix --enable-languages=c,c++ --with-bugurl=http://bugs.sourcemage.org --enable-bootstrap --enable-checking=release --disable-multilib --without-ppl --without-cloog --build=x86_64-pc-linux-gnu --with-system-zlib --disable-nls
Thread model: posix
gcc version 4.7.2 (GCC)
Comment 1 Joel Rosdahl 2013-01-03 16:30:55 UTC
Do you remember if the problem showed up for test_precomp.hpp.gch/opencv_test_highgui_Release.gch both times?
Comment 2 Treeve Jelbert 2013-01-03 17:04:04 UTC
I have just rerun the build, using the existing ccache, and get the same error.

Scanning dependencies of target pch_Generate_opencv_test_highgui
[ 13%] Generating test_precomp.hpp
[ 14%] Generating test_precomp.hpp.gch/opencv_test_highgui_Release.gch
ccache: FATAL: Could not create /var/cache/compiler/e/1/3e1e93f23393193cfbe6a16baad520-
2050005.o.tmp.stdout.Horos.14301 (permission denied?)
make[2]: *** [modules/core/perf_precomp.hpp.gch/opencv_perf_core_Release.gch] Error 1
make[1]: *** [modules/core/CMakeFiles/pch_Generate_opencv_perf_core.dir/all] Error 2


I monitored /var/cache/compiler/e/1 during the build and the file 
3e1e93f23393193cfbe6a16baad520-2050005.o

appeared, but is now gone.


I was building OpenCV-2.4.3
Comment 3 Joel Rosdahl 2013-01-06 16:45:20 UTC
Fixed in 83943e2522f8ea261c616adcc901620af80abb06 and 17791e1e460aec9c0efc1edbd031e975b81c1855 on the maint branch.
Comment 4 Joel Rosdahl 2013-01-06 17:04:24 UTC
Fix included in v3.1.9.