Bug 11379 - Repeated "Disabling direct mode" when the source has '#line non-existing-file'
Repeated "Disabling direct mode" when the source has '#line non-existing-file'
Status: CLOSED FIXED
Product: ccache
Classification: Unclassified
Component: ccache
dev
All All
: P5 normal
: 3.2.3
Assigned To: Joel Rosdahl
Joel Rosdahl
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2015-07-02 20:38 UTC by ishikawa
Modified: 2015-08-16 12:32 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 ishikawa 2015-07-02 20:38:55 UTC
I saw a repetiton of error messages in ccache log while checking
everything is OK in the dev repository after -gsplit-dwarf support was
put in official ccache repository and I have configured the local
build to use -gsplit-dwarf (for some time actually before the official
ccache dev repository had -gsplilt-dwarf support).

As it turned out, it has nothing to do with -gsplit-dwarf support.
But I think it was worth reporting and here it is.

In the log of ccache, attached at the end, please note the strange repetition of
---

Failed to stat lex.Pk11Install_yy.cpp: No such file or directory
Disabling direct mode

---
It was repeated 16 times.

I wondered if there is something wrong and
checked the file "lex.Pk11Install_yy.c", which was compiled when the strange
messages appeared.
(This is part of mozilla thunderbird and I think the file is shared by mozilla firefox, too.)

As it turned out, this file contained #line directives with
non-existing "lex.Pk11Install_yy.cpp" inside. Total of four times.

grep "#[\ \t]*line" lex.Pk11Install_yy.c 
#line 20 "lex.Pk11Install_yy.c"
#line 1 "installparse.l"
#line 5 "installparse.l"
#line 437 "lex.Pk11Install_yy.cpp"
#line 60 "installparse.l"
#line 591 "lex.Pk11Install_yy.cpp"
#line 62 "installparse.l"
#line 63 "installparse.l"
#line 64 "installparse.l"
#line 67 "installparse.l"
#line 71 "installparse.l"
#line 73 "installparse.l"
#line 75 "installparse.l"
#line 81 "installparse.l"
#line 722 "lex.Pk11Install_yy.cpp"
#line 81 "installparse.l"

This means for each appearance of #line ddd "lex.Pk11Install_yy.cpp",
ccache printed out four warnings and each time it said disable direct mode.

----
Failed to stat lex.Pk11Install_yy.cpp: No such file or directory
Disabling direct mode
---

Is this to be expected?

Of course, the source file probably needs fixing, too, but
four (4) pairs of error/warning messages per bogus #line directive with 
non-existing file are a little too many on the side of ccache, too.

TIA

CI


The log.


[2015-07-03T01:36:06.216619 21877] === CCACHE 3.2.2+16_g80f6ab9 STARTED =========================================
[2015-07-03T01:36:06.216619 21877] Config: (default) base_dir = 
[2015-07-03T01:36:06.216619 21877] Config: (environment) cache_dir = /FF-NEW/cache-dir
[2015-07-03T01:36:06.216619 21877] Config: (default) cache_dir_levels = 2
[2015-07-03T01:36:06.216619 21877] Config: (default) compiler = 
[2015-07-03T01:36:06.216619 21877] Config: (default) compiler_check = mtime
[2015-07-03T01:36:06.216619 21877] Config: (default) compression = false
[2015-07-03T01:36:06.216619 21877] Config: (default) compression_level = 6
[2015-07-03T01:36:06.216619 21877] Config: (default) cpp_extension = 
[2015-07-03T01:36:06.216619 21877] Config: (default) direct_mode = true
[2015-07-03T01:36:06.216619 21877] Config: (default) disable = false
[2015-07-03T01:36:06.216619 21877] Config: (default) extra_files_to_hash = 
[2015-07-03T01:36:06.216619 21877] Config: (default) hard_link = false
[2015-07-03T01:36:06.216619 21877] Config: (default) hash_dir = false
[2015-07-03T01:36:06.216619 21877] Config: (environment) log_file = /FF-NEW/cache-dir/logfile
[2015-07-03T01:36:06.216619 21877] Config: (default) max_files = 0
[2015-07-03T01:36:06.216619 21877] Config: (/FF-NEW/cache-dir/ccache.conf) max_size = 4.5G
[2015-07-03T01:36:06.216619 21877] Config: (default) path = 
[2015-07-03T01:36:06.216619 21877] Config: (default) prefix_command = 
[2015-07-03T01:36:06.216619 21877] Config: (default) read_only = false
[2015-07-03T01:36:06.216619 21877] Config: (default) read_only_direct = false
[2015-07-03T01:36:06.216619 21877] Config: (default) recache = false
[2015-07-03T01:36:06.216619 21877] Config: (default) run_second_cpp = false
[2015-07-03T01:36:06.216619 21877] Config: (default) sloppiness = 
[2015-07-03T01:36:06.216619 21877] Config: (default) stats = true
[2015-07-03T01:36:06.216619 21877] Config: (default) temporary_dir = 
[2015-07-03T01:36:06.216619 21877] Config: (default) umask = 
[2015-07-03T01:36:06.216619 21877] Config: (default) unify = false
[2015-07-03T01:36:06.216704 21877] Command line: /usr/bin/ccache /usr/bin/gcc-4.9 -fno-builtin-strlen -Wl,--gdb-index -Dfdatasync=fdatasync -DDEBUG_4GB_CHECK -DUSEHELGRIND=1 -o /NREF-COMM-CENTRAL/objdir-tb3/security/nss/cmd/modutil/lex.Pk11Install_yy.o -c -g -fPIC -DLINUX2_1 -m64 -Wall -Werror-implicit-function-declaration -Wno-switch -pipe -ffunction-sections -fdata-sections -DLINUX -Dlinux -DHAVE_STRERROR -DXP_UNIX -DNSPR20 -DDEBUG -UNDEBUG -DDEBUG_ishikawa -D_REENTRANT -DUSE_UTIL_DIRECTLY -DNO_NSPR_10_SUPPORT -DSSL_DISABLE_DEPRECATED_CIPHER_SUITE_NAMES -I/NREF-COMM-CENTRAL/objdir-tb3/dist/include/nspr -I/NREF-COMM-CENTRAL/objdir-tb3/dist/include/nspr -I/NREF-COMM-CENTRAL/objdir-tb3/dist/include/sectools -I/NREF-COMM-CENTRAL/objdir-tb3/dist/private/sectools -I/NREF-COMM-CENTRAL/objdir-tb3/dist/include/seccmd -I/NREF-COMM-CENTRAL/objdir-tb3/dist/include/nss -I/NREF-COMM-CENTRAL/objdir-tb3/dist/include/dbm -I/NREF-COMM-CENTRAL/objdir-tb3/dist/private/seccmd -I/NREF-COMM-CENTRAL/objdir-tb3/dist/private/nss -I/NREF-COMM-CENTRAL/objdir-tb3/dist/private/dbm lex.Pk11Install_yy.c
[2015-07-03T01:36:06.216761 21877] Hostname: ip030
[2015-07-03T01:36:06.216804 21877] Working directory: /NREF-COMM-CENTRAL/comm-central/mozilla/security/nss/cmd/modutil
[2015-07-03T01:36:06.216930 21877] Source file: lex.Pk11Install_yy.c
[2015-07-03T01:36:06.216954 21877] Object file: /NREF-COMM-CENTRAL/objdir-tb3/security/nss/cmd/modutil/lex.Pk11Install_yy.o
[2015-07-03T01:36:06.216981 21877] Trying direct lookup
[2015-07-03T01:36:06.217895 21877] Looking for object file hash in /FF-NEW/cache-dir/1/2/fd58fd799fab7a43b4024d3525b523-42081.manifest
[2015-07-03T01:36:06.217937 21877] No such manifest file
[2015-07-03T01:36:06.217952 21877] Did not find object file hash in manifest
[2015-07-03T01:36:06.218050 21877] Running preprocessor
[2015-07-03T01:36:06.218065 21877] Executing /usr/bin/gcc-4.9 -fno-builtin-strlen -Wl,--gdb-index -g -fPIC -m64 -Wall -Werror-implicit-function-declaration -Wno-switch -pipe -ffunction-sections -fdata-sections -Dfdatasync=fdatasync -DDEBUG_4GB_CHECK -DUSEHELGRIND=1 -DLINUX2_1 -DLINUX -Dlinux -DHAVE_STRERROR -DXP_UNIX -DNSPR20 -DDEBUG -UNDEBUG -DDEBUG_ishikawa -D_REENTRANT -DUSE_UTIL_DIRECTLY -DNO_NSPR_10_SUPPORT -DSSL_DISABLE_DEPRECATED_CIPHER_SUITE_NAMES -I/NREF-COMM-CENTRAL/objdir-tb3/dist/include/nspr -I/NREF-COMM-CENTRAL/objdir-tb3/dist/include/nspr -I/NREF-COMM-CENTRAL/objdir-tb3/dist/include/sectools -I/NREF-COMM-CENTRAL/objdir-tb3/dist/private/sectools -I/NREF-COMM-CENTRAL/objdir-tb3/dist/include/seccmd -I/NREF-COMM-CENTRAL/objdir-tb3/dist/include/nss -I/NREF-COMM-CENTRAL/objdir-tb3/dist/include/dbm -I/NREF-COMM-CENTRAL/objdir-tb3/dist/private/seccmd -I/NREF-COMM-CENTRAL/objdir-tb3/dist/private/nss -I/NREF-COMM-CENTRAL/objdir-tb3/dist/private/dbm -E lex.Pk11Install_yy.c
[2015-07-03T01:36:06.256871 21877] Failed to stat lex.Pk11Install_yy.cpp: No such file or directory
[2015-07-03T01:36:06.256913 21877] Disabling direct mode
[2015-07-03T01:36:06.256926 21877] Failed to stat lex.Pk11Install_yy.cpp: No such file or directory
[2015-07-03T01:36:06.256935 21877] Disabling direct mode
[2015-07-03T01:36:06.256945 21877] Failed to stat lex.Pk11Install_yy.cpp: No such file or directory
[2015-07-03T01:36:06.256954 21877] Disabling direct mode
[2015-07-03T01:36:06.256964 21877] Failed to stat lex.Pk11Install_yy.cpp: No such file or directory
[2015-07-03T01:36:06.256973 21877] Disabling direct mode
[2015-07-03T01:36:06.256984 21877] Failed to stat lex.Pk11Install_yy.cpp: No such file or directory
[2015-07-03T01:36:06.256993 21877] Disabling direct mode
[2015-07-03T01:36:06.257008 21877] Failed to stat lex.Pk11Install_yy.cpp: No such file or directory
[2015-07-03T01:36:06.257017 21877] Disabling direct mode
[2015-07-03T01:36:06.257027 21877] Failed to stat lex.Pk11Install_yy.cpp: No such file or directory
[2015-07-03T01:36:06.257036 21877] Disabling direct mode
[2015-07-03T01:36:06.257047 21877] Failed to stat lex.Pk11Install_yy.cpp: No such file or directory
[2015-07-03T01:36:06.257055 21877] Disabling direct mode
[2015-07-03T01:36:06.257066 21877] Failed to stat lex.Pk11Install_yy.cpp: No such file or directory
[2015-07-03T01:36:06.257075 21877] Disabling direct mode
[2015-07-03T01:36:06.257086 21877] Failed to stat lex.Pk11Install_yy.cpp: No such file or directory
[2015-07-03T01:36:06.257094 21877] Disabling direct mode
[2015-07-03T01:36:06.257106 21877] Failed to stat lex.Pk11Install_yy.cpp: No such file or directory
[2015-07-03T01:36:06.257115 21877] Disabling direct mode
[2015-07-03T01:36:06.257131 21877] Failed to stat lex.Pk11Install_yy.cpp: No such file or directory
[2015-07-03T01:36:06.257140 21877] Disabling direct mode
[2015-07-03T01:36:06.257153 21877] Failed to stat lex.Pk11Install_yy.cpp: No such file or directory
[2015-07-03T01:36:06.257163 21877] Disabling direct mode
[2015-07-03T01:36:06.257176 21877] Failed to stat lex.Pk11Install_yy.cpp: No such file or directory
[2015-07-03T01:36:06.257185 21877] Disabling direct mode
[2015-07-03T01:36:06.257240 21877] Failed to stat lex.Pk11Install_yy.cpp: No such file or directory
[2015-07-03T01:36:06.257253 21877] Disabling direct mode
[2015-07-03T01:36:06.257264 21877] Failed to stat lex.Pk11Install_yy.cpp: No such file or directory
[2015-07-03T01:36:06.257273 21877] Disabling direct mode
[2015-07-03T01:36:06.257328 21877] Got object file hash from preprocessor
[2015-07-03T01:36:06.257387 21877] Copying /FF-NEW/cache-dir/e/b/6644dd472df45d7788648190500a57-131292.o to /NREF-COMM-CENTRAL/objdir-tb3/security/nss/cmd/modutil/lex.Pk11Install_yy.o via /NREF-COMM-CENTRAL/objdir-tb3/security/nss/cmd/modutil/lex.Pk11Install_yy.o.ip030.21877.t9dPB0 (uncompressed)
[2015-07-03T01:36:06.258350 21877] Created from cache: /FF-NEW/cache-dir/e/b/6644dd472df45d7788648190500a57-131292.o -> /NREF-COMM-CENTRAL/objdir-tb3/security/nss/cmd/modutil/lex.Pk11Install_yy.o
[2015-07-03T01:36:06.258639 21877] Succeeded getting cached result
[2015-07-03T01:36:06.258733 21877] Acquired lock /FF-NEW/cache-dir/e/stats.lock
[2015-07-03T01:36:06.258894 21877] Releasing lock /FF-NEW/cache-dir/e/stats.lock
[2015-07-03T01:36:06.258909 21877] Unlink /FF-NEW/cache-dir/e/stats.lock
[2015-07-03T01:36:06.258928 21877] Result: cache hit (preprocessed)
Comment 1 ishikawa 2015-07-02 20:41:48 UTC
I just realized this file is not compiled with -gsplit-dwarf.
Many directories of mozilla thunderbird/firefx have specified special compiler flags and I suspect this is the case here, too.

TIA
Comment 2 Joel Rosdahl 2015-07-05 16:14:39 UTC
Logging "Disabling direct mode" each time seems unnecessary, I agree.

Fixed in 0184e4cce018c823d9afde72ad2c6282263e0b20 on 3.2-main. Thanks!

Regarding logging failing stats, I would like to keep them since they are a good debug tool.
Comment 3 ishikawa 2015-07-06 16:45:31 UTC
(In reply to Joel Rosdahl from comment #2)

Thank you for your quick fix.

Happy Hacking (in the good sense of the word)
Comment 4 Joel Rosdahl 2015-08-16 12:32:54 UTC
Included in 3.2.3.