Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

Full-process ASan and LSan need a sanitizer build of chdb-core #9

Open

Description

@ShawnChen-Sirius

The gap

The V1 plan asks for the sanitizers to cover the driver end to end. What we have:

  • UBSan: full coverage. The whole integration suite runs under it in CI.
  • ASan: covers the JVM-free native harness only (chdb-jni/test/chdb_jni_test.cpp, 199
    checks), not the driver under a JVM.
  • LSan: not run at all.

Why ASan cannot run against the released engine today

Established by measurement, not assumption:

  • ASan + JIT: the JVM crashes in C2 during compilation.
  • ASan + -Xint: the crash moves into libchdb itself.
  • handle_segv=0 is required regardless, because ASan and HotSpot both want SIGSEGV, and even
    with it the above still holds.
  • On macOS, SIP strips DYLD_INSERT_LIBRARIES, so the interposition route is closed there
    independently of any of this.

The common factor is that the released libchdb.so is a non-instrumented, statically linked
~350 MB binary. ASan's allocator and the engine's own memory machinery do not coexist, and
without an instrumented engine there is nothing useful for LSan to report either — every engine
allocation is invisible to it, so a suppression file large enough to silence the noise would
also silence anything real.

What would close this

An ASan/LSan build of chdb-core published as a release asset, or reproducibly buildable from a
documented target. Then:

  1. Point scripts/run-sanitizer-tests.sh at it behind a flag.
  2. Run the full integration suite under ASan with handle_segv=0, and under LSan with a
    suppression file scoped to the engine's known static allocations rather than to everything.
  3. Add it to CI as a scheduled job rather than a per-PR one — an instrumented engine is slow
    and large.

This is a chdb-core dependency, not something this repository can close on its own.

Related

  • scripts/run-sanitizer-tests.sh, scripts/lsan-suppressions.txt
  • docs/memory.md

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions