Skip to content

Set malloc_context_size=8 for the MSan server in stateless tests - #2981

Open
filimonov wants to merge 1 commit into
antalya-26.8from
ci/antalya-26.8/msan-malloc-context-size
Open

filimonov wants to merge 1 commit into
antalya-26.8from
ci/antalya-26.8/msan-malloc-context-size

Conversation

@filimonov

Copy link
Copy Markdown
Member

MSan stateless shards get slower during a run and hit the 4 hour job timeout. This sets malloc_context_size=8 in MSAN_OPTIONS for the server started by ClickHouseProc.start. poison_in_dtor=1 stays on.

Why

Local measurement (CI MSan build, 12 clients, the same 200 .sql tests before and after 1200 other tests)

Setting Server CPU, first pass Server CPU, second pass Unique stacks in the depot
default (depth 20) 79 s 172 s 14.9 M
malloc_context_size=8 65 s 69 s 4.9 M

Risks / notes

  • MSan reports from this server show 8 frames instead of 20 in the "allocated / destroyed here" stack. The stack of the error itself does not change.
  • Only the server in stateless test jobs is affected. Clients, integration tests and local MSan builds keep depth 20.
  • Not tested locally; this PR is the test. Compare MSan stateless shard durations with the run above.

Changelog category (leave one):

  • CI Fix or Improvement (changelog entry is not required)

Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):

...

Documentation entry for user-facing changes

...

CI/CD Options

Exclude tests:

  • Fast test
  • Integration Tests
  • Stateless tests
  • Stateful tests
  • Unit tests
  • Performance tests
  • Aarch64 tests
  • All with ASAN
  • All with TSAN
  • All with MSAN
  • All with UBSAN
  • All with Coverage
  • All Regression
  • Disable CI Cache

Regression jobs to run:

  • Fast suites (mostly <1h)
  • Aggregate Functions (2h)
  • Alter (1.5h)
  • Benchmark (30m)
  • CAS (content-addressed storage; Antalya only)
  • ClickHouse Keeper (1h)
  • Iceberg (2h)
  • LDAP (1h)
  • OAuth (5m)
  • Parquet (1.5h)
  • RBAC (1.5h)
  • SSL Server (1h)
  • S3 (2h)
  • S3 Export (2h)
  • Swarms (30m)
  • Tiered Storage (2h)

🤖 Generated with Claude Code

With `poison_in_dtor=1` every destructor stores a call stack in the MSan
stack depot. At the default depth of 20 frames almost every stack is
unique, the depot (2^20 buckets) fills up, and `StackDepotBase::Put`
takes 58-76% of server CPU, growing during the run. MSan stateless
shards then hit the 4 hour job timeout.

Local measurement on the CI MSan build, same 200 tests before and after
1200 other tests: server CPU 79 s -> 172 s at depth 20, 65 s -> 69 s at
depth 8. Use-after-destroy detection stays on; only the "allocated /
destroyed here" stack in reports gets shorter.

https://s3.amazonaws.com/altinity-build-artifacts/REFs/antalya-26.8/d86c7394783bd27532903f18c7519525a0061307/45729031774/ci_run_report.html

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Signed-off-by: Mikhail Filimonov <mfilimonov@altinity.com>
@github-actions

Copy link
Copy Markdown

Workflow [PR], commit [2ae753a]

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant