Follow-up to #298: the post-merge valgrind job on dev (run 568) hangs because FASTSYNC_UNDER_VALGRIND is set by CI but never read, and the /proc/self/maps probe is unreliable on valgrind 3.22. Fork tests then ran under valgrind and leaked io_set_fds() descriptor redirection into later suites, blocking a raw receive_n_data() on an empty pipe.
Honor FASTSYNC_UNDER_VALGRIND, keep the maps scan as fallback.
Reset io_set_fds(-1,-1) per RUN_TEST for suite isolation.
Skip the forking iconv wire roundtrip under valgrind.
Initialize per_dir_filter_count (uninitialized read flagged by valgrind at client_cli.c:1464; could miscount -FF).
Verified CI-equivalent valgrind command now exits 0 (was a >80 min hang); unit 43/43, integration 729 passed, cppcheck + clang-format clean.
Follow-up to #298: the post-merge `valgrind` job on `dev` (run 568) hangs because `FASTSYNC_UNDER_VALGRIND` is set by CI but never read, and the `/proc/self/maps` probe is unreliable on valgrind 3.22. Fork tests then ran under valgrind and leaked `io_set_fds()` descriptor redirection into later suites, blocking a raw `receive_n_data()` on an empty pipe.
- Honor `FASTSYNC_UNDER_VALGRIND`, keep the maps scan as fallback.
- Reset `io_set_fds(-1,-1)` per `RUN_TEST` for suite isolation.
- Skip the forking iconv wire roundtrip under valgrind.
- Initialize `per_dir_filter_count` (uninitialized read flagged by valgrind at `client_cli.c:1464`; could miscount `-FF`).
Verified CI-equivalent valgrind command now exits 0 (was a >80 min hang); unit 43/43, integration 729 passed, cppcheck + clang-format clean.
The post-merge valgrind job on dev hangs. Root cause: the CI valgrind step
exports FASTSYNC_UNDER_VALGRIND=1, but nothing read it, and the
/proc/self/maps "vgpreload" probe is unreliable on valgrind 3.22 (the guest's
maps no longer list the tool's own libraries). So the fork-based unit tests
ran under valgrind anyway; tests that call io_set_fds() left the thread-local
read/write descriptors pointing at a closed test pipe, and a later
send_n_data()/receive_n_data() call was silently redirected to those stale fds
(legacy_session() prefers the globals, which the stdin/stdout SSH server
requires). Later tests only worked by fd-reuse luck; under valgrind the fd
numbers no longer coincide, so the read blocked forever on an empty pipe.
- test_utils.h: honor FASTSYNC_UNDER_VALGRIND (already set by ci.yaml) and keep
the maps scan as a best-effort fallback. Reset io_set_fds(-1, -1) at the
start of every RUN_TEST so one suite cannot leak descriptor redirection into
the next.
- test_iconv.c: skip the forking wire-string roundtrip under valgrind like the
other fork-based tests.
- config.c: initialize per_dir_filter_count in config_set_defaults. The field
was never initialized, so -F/-FF counting read uninitialized heap (valgrind:
conditional jump on uninitialised value at client_cli.c:1464) and could count
from garbage.
Verified with the CI-equivalent command (FASTSYNC_UNDER_VALGRIND=1 valgrind
--leak-check=full --show-leak-kinds=definite --error-exitcode=1): completes
with 0 errors (previously hung >80 min). Unit 43/43; full integration 729
passed; cppcheck and clang-format clean.
TapTap
merged commit cee281ff55 into dev2026-09-17 23:47:48 +02:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Follow-up to #298: the post-merge
valgrindjob ondev(run 568) hangs becauseFASTSYNC_UNDER_VALGRINDis set by CI but never read, and the/proc/self/mapsprobe is unreliable on valgrind 3.22. Fork tests then ran under valgrind and leakedio_set_fds()descriptor redirection into later suites, blocking a rawreceive_n_data()on an empty pipe.FASTSYNC_UNDER_VALGRIND, keep the maps scan as fallback.io_set_fds(-1,-1)perRUN_TESTfor suite isolation.per_dir_filter_count(uninitialized read flagged by valgrind atclient_cli.c:1464; could miscount-FF).Verified CI-equivalent valgrind command now exits 0 (was a >80 min hang); unit 43/43, integration 729 passed, cppcheck + clang-format clean.