From 9b1033f3ae534e5aad02c10f663b589b8f28c026 Mon Sep 17 00:00:00 2001 From: Joel Rosdahl Date: Mon, 20 Mar 2023 20:42:14 +0100 Subject: fix: Disable the inode cache by default There have reports of ccache processes hanging on futex calls related to the inode cache. (The inode cache synchronization mechanism has been reworked not to use pthread mutexes in ccache 4.8, so the inode cache is enabled by default in 4.8 and newer.) --- LICENSE.adoc | 2 +- doc/MANUAL.adoc | 2 +- doc/NEWS.adoc | 11 +++++++++++ src/Config.hpp | 4 ++-- src/core/mainoptions.cpp | 4 ++-- test/suites/inode_cache.bash | 3 +++ 6 files changed, 20 insertions(+), 6 deletions(-) diff --git a/LICENSE.adoc b/LICENSE.adoc index b863cecd..0f97424b 100644 --- a/LICENSE.adoc +++ b/LICENSE.adoc @@ -35,7 +35,7 @@ The copyright for ccache as a whole is as follows: ---- Copyright (C) 2002-2007 Andrew Tridgell -Copyright (C) 2009-2022 Joel Rosdahl and other contributors +Copyright (C) 2009-2023 Joel Rosdahl and other contributors ---- diff --git a/doc/MANUAL.adoc b/doc/MANUAL.adoc index 48328fa8..86c9b19b 100644 --- a/doc/MANUAL.adoc +++ b/doc/MANUAL.adoc @@ -756,7 +756,7 @@ might be incorrect. If true, ccache will cache source file hashes based on device, inode and timestamps. This reduces the time spent on hashing include files since the - result can be resused between compilations. The default is true. The feature + result can be resused between compilations. The default is false. The feature requires <> to be located on a local filesystem of a supported type. + diff --git a/doc/NEWS.adoc b/doc/NEWS.adoc index 72499040..d8146027 100644 --- a/doc/NEWS.adoc +++ b/doc/NEWS.adoc @@ -1,5 +1,16 @@ = Ccache news +== Ccache 4.7.5 + +Release date: 2023-03-20 + +=== Bug fixes + +- Disabled the inode cache by default again since there have reports of ccache + processes hanging on futex calls related to the inode cache. + + [small]#_[contributed by Joel Rosdahl]_# + + == Ccache 4.7.4 Release date: 2022-11-21 diff --git a/src/Config.hpp b/src/Config.hpp index b75ff43c..cc5d2717 100644 --- a/src/Config.hpp +++ b/src/Config.hpp @@ -1,4 +1,4 @@ -// Copyright (C) 2019-2022 Joel Rosdahl and other contributors +// Copyright (C) 2019-2023 Joel Rosdahl and other contributors // // See doc/AUTHORS.adoc for a complete list of contributors. // @@ -181,7 +181,7 @@ private: bool m_hash_dir = true; std::string m_ignore_headers_in_manifest; std::string m_ignore_options; - bool m_inode_cache = true; + bool m_inode_cache = false; bool m_keep_comments_cpp = false; double m_limit_multiple = 0.8; std::string m_log_file; diff --git a/src/core/mainoptions.cpp b/src/core/mainoptions.cpp index 2283162f..37cc4b99 100644 --- a/src/core/mainoptions.cpp +++ b/src/core/mainoptions.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2021-2022 Joel Rosdahl and other contributors +// Copyright (C) 2021-2023 Joel Rosdahl and other contributors // // See doc/AUTHORS.adoc for a complete list of contributors. // @@ -70,7 +70,7 @@ constexpr const char VERSION_TEXT[] = Features: {2} Copyright (C) 2002-2007 Andrew Tridgell -Copyright (C) 2009-2022 Joel Rosdahl and other contributors +Copyright (C) 2009-2023 Joel Rosdahl and other contributors See for a complete list of contributors. diff --git a/test/suites/inode_cache.bash b/test/suites/inode_cache.bash index 830ef8c7..48d7d712 100644 --- a/test/suites/inode_cache.bash +++ b/test/suites/inode_cache.bash @@ -1,4 +1,6 @@ SUITE_inode_cache_PROBE() { + export CCACHE_INODECACHE=1 + if $HOST_OS_WINDOWS; then echo "inode cache not available on Windows" return @@ -16,6 +18,7 @@ SUITE_inode_cache_PROBE() { } SUITE_inode_cache_SETUP() { + export CCACHE_INODECACHE=1 export CCACHE_DEBUG=1 unset CCACHE_NODIRECT export CCACHE_TEMPDIR="${CCACHE_DIR}/tmp" # isolate inode cache file -- cgit v1.2.1