* Remove explicit __lsan_do_leak_check() from stopImmediately()
The fix in #13224 (guarding with thread_network == this) resolved the
multi-thread deadlock but the test still times out because the single
main thread's __lsan_do_leak_check() call takes 45+ seconds. The
symbolizer (llvm-addr2line) is slow when resolving stacks through
dynamically loaded external client libraries (libfdb_c_external.so).
Remove the explicit call entirely. LSAN still performs its leak check
automatically at process exit (via the ASAN runtime atexit hook) so
leaks are still detected and reported. Unsuppressed leaks still cause
non-zero exit and fail the test. The suppressions file
(contrib/lsan.suppressions) covers known shutdown-time leaks
(connectionKeeper, connectionMonitor, etc.).
The only behavioral change is that we no longer distinguish "leaks
before intentional shutdown cleanup" from "leaks during shutdown" --
but that distinction was not being used (suppressions cover both).
Verified: ran fdb_c_upgrade_to_future_version with USE_ASAN=ON.
Before fix: hangs 45+ seconds after "Stopping FDB network thread",
killed by ctest timeout. After fix: "FDB network thread successfully
stopped" immediately, test completes cleanly.
* Fix inconsistent function name reference in comment
Add () to __lsan_do_leak_check reference for consistency with other
mentions in the same comment block.
The multiversion client spawns multiple FDB network threads. When the
process exits, each thread calls stopImmediately() which calls
__lsan_do_leak_check(). LSAN uses a global mutex internally, and the
first thread to acquire it blocks while reading from the symbolizer
process (llvm-addr2line). The other threads wait on the mutex forever,
causing the test to timeout.
This manifests as fdb_c_upgrade_to_future_version (and similar tests
using the multiversion client) timing out at ~45 seconds despite all
workloads completing successfully.
Fix: only call __lsan_do_leak_check() from the main network thread
(thread_network == this). The secondary threads skip it since LSAN
will still check them during process exit anyway.