Skip to content

Add LSAN suppressions for client-side shutdown leaks#13255

Open
saintstack wants to merge 2 commits into
apple:mainfrom
saintstack:asan3
Open

Add LSAN suppressions for client-side shutdown leaks#13255
saintstack wants to merge 2 commits into
apple:mainfrom
saintstack:asan3

Conversation

@saintstack
Copy link
Copy Markdown
Contributor

Follow-on to b0055b8 ("Remove explicit __lsan_do_leak_check() from stopImmediately()"). That change fixed the LSAN deadlock/timeout but LSAN still runs at process exit and reports unsuppressed shutdown leaks (12,792 bytes in 84 allocations), causing ctests to fail.

Add targeted suppressions for each specific actor function that leaks at shutdown. These are all background actors (recurring timers, proxy monitors, status fetchers, etc.) that are still running when the process exits because FDB does not cancel all actors during shutdown.

Each suppression names the exact function in the stack to avoid masking real leaks. A real leak (e.g., per-request allocation that grows unboundedly) would have application-specific functions in the stack that would not match any of these suppressions.

Verified: with these suppressions, LSAN reports zero unsuppressed leaks in fdb_c_upgrade_to_future_version and multi_process_fdbcli_tests with USE_ASAN=ON. The tests still fail due to a separate pre-existing issue: ASAN makecontext/swapcontext warning logged as Severity=40 by fdbmonitor, which the test runner treats as a test failure.

Follow-on to b0055b8 ("Remove explicit __lsan_do_leak_check() from
stopImmediately()"). That change fixed the LSAN deadlock/timeout but
LSAN still runs at process exit and reports unsuppressed shutdown leaks
(12,792 bytes in 84 allocations), causing ctests to fail.

Add targeted suppressions for each specific actor function that leaks
at shutdown. These are all background actors (recurring timers, proxy
monitors, status fetchers, etc.) that are still running when the
process exits because FDB does not cancel all actors during shutdown.

Each suppression names the exact function in the stack to avoid masking
real leaks. A real leak (e.g., per-request allocation that grows
unboundedly) would have application-specific functions in the stack
that would not match any of these suppressions.

Verified: with these suppressions, LSAN reports zero unsuppressed leaks
in fdb_c_upgrade_to_future_version and multi_process_fdbcli_tests with
USE_ASAN=ON. The tests still fail due to a separate pre-existing issue:
ASAN makecontext/swapcontext warning logged as Severity=40 by
fdbmonitor, which the test runner treats as a test failure.
@saintstack saintstack added the nightlies Issues to address failures in the nighty runs. label May 21, 2026
@saintstack saintstack requested review from Copilot and ploxiln May 21, 2026 01:56
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds additional LeakSanitizer suppressions to prevent client-side test failures caused by known shutdown-time “leaks” from background actors that are still running when processes exit.

Changes:

  • Extend contrib/lsan.suppressions with suppressions for multiple client-side background actors observed in LSAN reports at process shutdown.
  • Add explanatory comments describing why these shutdown-time allocations are currently not cleaned up and how the suppressions are intended to be narrowly targeted.

Comment thread contrib/lsan.suppressions
Comment thread contrib/lsan.suppressions Outdated
Comment thread contrib/lsan.suppressions Outdated
Address review feedback:
- Replace toolchain-specific pattern
  (recurring<std::__1::__bind_front_t<void (DatabaseContext::)
  with the stable FDB symbol DatabaseContext::expireThrottles.
  This is portable across toolchains and does not mask unrelated
  DatabaseContext recurring leaks.
- Fix comment: the actual recurring actor is throttleExpirer
  (binding expireThrottles), not updateLatencyBandConfig.
@foundationdb-ci
Copy link
Copy Markdown
Contributor

Result of foundationdb-pr-clang-ide on Linux RHEL 9

  • Commit ID: 03d6d31
  • Duration 0:24:38
  • Result: ✅ SUCCEEDED
  • Error: N/A
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@foundationdb-ci
Copy link
Copy Markdown
Contributor

Result of foundationdb-pr-macos-m1 on macOS Ventura 13.x

  • Commit ID: 03d6d31
  • Duration 0:33:45
  • Result: ✅ SUCCEEDED
  • Error: N/A
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@foundationdb-ci
Copy link
Copy Markdown
Contributor

Result of foundationdb-pr-clang-ide on Linux RHEL 9

  • Commit ID: 493b415
  • Duration 0:25:51
  • Result: ✅ SUCCEEDED
  • Error: N/A
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@foundationdb-ci
Copy link
Copy Markdown
Contributor

Result of foundationdb-pr-clang-arm on Linux CentOS 7

  • Commit ID: 03d6d31
  • Duration 0:47:17
  • Result: ✅ SUCCEEDED
  • Error: N/A
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@foundationdb-ci
Copy link
Copy Markdown
Contributor

Result of foundationdb-pr-clang on Linux RHEL 9

  • Commit ID: 03d6d31
  • Duration 0:50:08
  • Result: ✅ SUCCEEDED
  • Error: N/A
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@foundationdb-ci
Copy link
Copy Markdown
Contributor

Result of foundationdb-pr on Linux RHEL 9

  • Commit ID: 03d6d31
  • Duration 0:55:44
  • Result: ✅ SUCCEEDED
  • Error: N/A
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@foundationdb-ci
Copy link
Copy Markdown
Contributor

Result of foundationdb-pr-macos on macOS Ventura 13.x

  • Commit ID: 03d6d31
  • Duration 0:56:30
  • Result: ❌ FAILED
  • Error: Error while executing command: ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i ${HOME}/.ssh_key ec2-user@${MAC_EC2_HOST} /usr/local/bin/bash --login ./build_pr_macos.sh. Reason: exit status 254
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@foundationdb-ci
Copy link
Copy Markdown
Contributor

Result of foundationdb-pr-macos-m1 on macOS Ventura 13.x

  • Commit ID: 493b415
  • Duration 0:41:44
  • Result: ✅ SUCCEEDED
  • Error: N/A
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@foundationdb-ci
Copy link
Copy Markdown
Contributor

Result of foundationdb-pr-clang-arm on Linux CentOS 7

  • Commit ID: 493b415
  • Duration 0:44:57
  • Result: ✅ SUCCEEDED
  • Error: N/A
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@foundationdb-ci
Copy link
Copy Markdown
Contributor

Result of foundationdb-pr-cluster-tests on Linux RHEL 9

  • Commit ID: 03d6d31
  • Duration 1:08:11
  • Result: ✅ SUCCEEDED
  • Error: N/A
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)
  • Cluster Test Logs zip file of the test logs (available for 30 days)

@foundationdb-ci
Copy link
Copy Markdown
Contributor

Result of foundationdb-pr-clang on Linux RHEL 9

  • Commit ID: 493b415
  • Duration 0:59:43
  • Result: ✅ SUCCEEDED
  • Error: N/A
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@foundationdb-ci
Copy link
Copy Markdown
Contributor

Result of foundationdb-pr on Linux RHEL 9

  • Commit ID: 493b415
  • Duration 1:06:23
  • Result: ✅ SUCCEEDED
  • Error: N/A
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@foundationdb-ci
Copy link
Copy Markdown
Contributor

Result of foundationdb-pr-cluster-tests on Linux RHEL 9

  • Commit ID: 493b415
  • Duration 1:11:00
  • Result: ✅ SUCCEEDED
  • Error: N/A
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)
  • Cluster Test Logs zip file of the test logs (available for 30 days)

@foundationdb-ci
Copy link
Copy Markdown
Contributor

Result of foundationdb-pr-macos on macOS Ventura 13.x

  • Commit ID: 493b415
  • Duration 1:16:56
  • Result: ✅ SUCCEEDED
  • Error: N/A
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

nightlies Issues to address failures in the nighty runs.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants