Repository navigation
Closed
Labels
Description
Steps to reproduce on a fresh install of Ubuntu LTS 24.04:
- Install packages and clone repo:
( export DEBIAN_FRONTEND=noninteractive && apt update && apt install git ccache make build-essential libtool cmake autotools-dev automake pkg-config bsdmainutils python3 libevent-dev libboost-dev libsqlite3-dev valgrind -y && git clone https://github.com/bitcoin/bitcoin.git b-c ) && cd b-c git checkout 338bc2cd261ba3daf7fb494f8cb4a534762e292c # cmake migration (allows to test autotools and cmake on the same commit)- Apply a diff to create more function calls in one hotspot (optional):
diff --git a/src/test/util_tests.cpp b/src/test/util_tests.cpp
index c2c725d676..704c060749 100644
--- a/src/test/util_tests.cpp
+++ b/src/test/util_tests.cpp
@@ -273,13 +273,15 @@ BOOST_AUTO_TEST_CASE(util_ReplaceAll)
ReplaceAll(test, search, substitute);
BOOST_CHECK_EQUAL(test, expected);
};
-
+ int i{10000};
+while (i-->0){
test_replaceall("", "foo", original);
test_replaceall(original, "foo", "foo");
test_replaceall("%s", "foo", "A test \"foo\" string 'foo'.");
test_replaceall("\"", "foo", "A test foo%sfoo string '%s'.");
test_replaceall("'", "foo", "A test \"%s\" string foo%sfoo.");
}
+}
BOOST_AUTO_TEST_CASE(util_TrimString)
{- Then create two out-of-tree builds, run a test in callgrind, and annotate it:
./autogen.sh && rm -rf ./bld-a && mkdir bld-a && ( cd bld-a && ../configure && make -j$(nproc) )rm -rf ./bld-c && cmake -B ./bld-c && cmake --build ./bld-c -j $(nproc)valgrind --tool=callgrind --callgrind-out-file=cg-a-%p.out ./bld-a/src/test/test_bitcoin -t util_tests/util_ReplaceAllvalgrind --tool=callgrind --callgrind-out-file=cg-c-%p.out ./bld-c/src/test/test_bitcoin -t util_tests/util_ReplaceAllcallgrind_annotate ./cg-a-40328.outcallgrind_annotate ./cg-c-39984.out
The cmake version of the last call will print a warning:
--------------------------------------------------------------------------------
The following files chosen for auto-annotation could not be found:
--------------------------------------------------------------------------------
./bld-c/src/crypto/./src/compat/byteswap.h
./bld-c/src/crypto/./src/crypto/sha256.cpp
./bld-c/src/crypto/./src/crypto/sha512.cpp
./bld-c/src/test/./src/test/crypto_tests.cpp
./bld-c/src/test/./src/test/util_tests.cpp
./bld-c/src/util/./src/random.cpp
./bld-c/src/util/./src/util/string.cpp
...
It also seems not possible to fix with --include=dir, as the path look a bit odd (non-existing)
Activity
hebasto commentedon Mar 26, 2025
Are there any requirements for debug info when using the
valgrind --tool=callgrind+callgrind_annotatetoolset? Are there any incompatible or unsupported compiler flags?hebasto commentedon Mar 26, 2025
I've tested the master branch @ c0b7159 with the diff from #31957 (comment) on Ubuntu 24.04:
UPD. When configured
-DWITH_CCACHE=OFF:maflcko commentedon Mar 26, 2025
I can't reproduce. What are the exact steps to reproduce from a fresh install of the operating system, like in OP?
maflcko commentedon Nov 18, 2025
Ah, looks like this is related to the prefix-map and the following workaround fixes it:
maflcko commentedon Nov 18, 2025
Maybe the prefix-map can be disabled by default or an option could be added to disable it, or it could be disabled on
-DWITH_CCACHE=NO, as there is no need for it then?hebasto commentedon Nov 23, 2025
788c132 could be considered for reverting. However, doing so would resurface #30799.
hebasto commentedon Nov 23, 2025
And the latter could be addressed using another approach:
maflcko commentedon Jan 14, 2026
For reference, the current steps to test on a fresh install of Ubuntu 26.04 LTS:
This allows testing with and without #34281 to confirm it is fixed.
Merge bitcoin/bitcoin#34281: build: Temporarily remove confusing and …
Merge bitcoin/bitcoin#34281: build: Temporarily remove confusing and …
Merge bitcoin/bitcoin#34281: build: Temporarily remove confusing and …
Merge bitcoin/bitcoin#34281: build: Temporarily remove confusing and …
Merge bitcoin#34281: build: Temporarily remove confusing and brittle …