Skip to content

tests: fail the test itself in case of Fatal/sanitizer alerts#82234

Merged
alexey-milovidov merged 1 commit intoClickHouse:masterfrom
azat:tests/fail-on-fatal-sanitizer-alerts
Jun 20, 2025
Merged

tests: fail the test itself in case of Fatal/sanitizer alerts#82234
alexey-milovidov merged 1 commit intoClickHouse:masterfrom
azat:tests/fail-on-fatal-sanitizer-alerts

Conversation

@azat
Copy link
Copy Markdown
Member

@azat azat commented Jun 19, 2025

Previously it was reported at the end of the all tests, and even code was not changed, and this hide errors and makes debugging way harder.

Changelog category (leave one):

  • Not for changelog (changelog entry is not required)

Previously it was reported at the end of the all tests, and even code
was not changed, and this hide errors and makes debugging way harder.
@azat azat requested a review from pamarcos June 19, 2025 20:01
@clickhouse-gh
Copy link
Copy Markdown
Contributor

clickhouse-gh bot commented Jun 19, 2025

Workflow [PR], commit [7a20743]

Summary:

@clickhouse-gh clickhouse-gh bot added the pr-not-for-changelog This PR should not be mentioned in the changelog label Jun 19, 2025
@alexey-milovidov alexey-milovidov self-assigned this Jun 20, 2025
@alexey-milovidov alexey-milovidov added this pull request to the merge queue Jun 20, 2025
Merged via the queue into ClickHouse:master with commit b2aa0c2 Jun 20, 2025
121 checks passed
@robot-clickhouse robot-clickhouse added the pr-synced-to-cloud The PR is synced to the cloud repo label Jun 20, 2025
azat added a commit to azat/ClickHouse that referenced this pull request Jun 23, 2025
azat added a commit to azat/ClickHouse that referenced this pull request Jun 23, 2025
…path)

This time I tested it with sanitizers:

    $ ../tests/clickhouse-test shebang
    Using queries from '/src/ch/clickhouse/tests/queries' directory
    Connecting to ClickHouse server... OK
    Connected to server 25.7.1.1 @ 9042a93 master
    Found 1 parallel tests and 0 sequential tests
    Running about 1 stateless tests (Process-3).
    02203_shebang:                                                          [ FAIL ] 0.33 sec.
    Reason: having stderror:
    Path: /src/ch/clickhouse/tests/queries/0_stateless/test_ggjjtc06/clickhouse-351von_4.10890
    ==================
    WARNING: ThreadSanitizer: data race (pid=10890)
      Write of size 4 at 0x5555569e9718 by thread T2:
        #0 thread2_func <null> (test-tsan+0xe7f68)

      Previous write of size 4 at 0x5555569e9718 by thread T1:
        #0 thread1_func <null> (test-tsan+0xe7f28)

      Location is global 'shared_var' of size 4 at 0x5555569e9718 (test-tsan+0x1495718)

      Thread T2 (tid=10893, running) created by main thread at:
        #0 pthread_create /src/llvm/llvm-project/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:1051:3 (test-tsan+0x640da)
        ClickHouse#1 main <null> (test-tsan+0xe7fc5)

      Thread T1 (tid=10892, finished) created by main thread at:
        #0 pthread_create /src/llvm/llvm-project/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:1051:3 (test-tsan+0x640da)
        ClickHouse#1 main <null> (test-tsan+0xe7fae)

    SUMMARY: ThreadSanitizer: data race (/tmp/test-tsan+0xe7f68) in thread2_func
    ==================
    ThreadSanitizer: reported 1 warnings
    stdout:
    1
    Database: test_ggjjtc06

    Having 1 errors! 0 tests passed. 0 tests skipped. 0.34 s elapsed (Process-3).
    All tests have finished.

And "Fatal" logs:

    $ ../tests/clickhouse-test shebang
    Using queries from '/src/ch/clickhouse/tests/queries' directory
    Connecting to ClickHouse server... OK
    Connected to server 25.7.1.1 @ 9042a93 master
    Found 1 parallel tests and 0 sequential tests
    Running about 1 stateless tests (Process-3).
    02203_shebang:                                                          [ FAIL ] 0.33 sec.
    Reason: having stderror:
    Path: /src/ch/clickhouse/tests/queries/0_stateless/test_grqdqc9f/clickhouse-p8a4uip4
    foo

    stdout:
    1
    Having 1 errors! 0 tests passed. 0 tests skipped. 0.34 s elapsed (Process-3).
    All tests have finished.

Fixes: ClickHouse#82234
azat added a commit to azat/ClickHouse that referenced this pull request Jun 23, 2025
…path)

This time I tested it with sanitizers:

    $ ../tests/clickhouse-test shebang
    Using queries from '/src/ch/clickhouse/tests/queries' directory
    Connecting to ClickHouse server... OK
    Connected to server 25.7.1.1 @ 9042a93 master
    Found 1 parallel tests and 0 sequential tests
    Running about 1 stateless tests (Process-3).
    02203_shebang:                                                          [ FAIL ] 0.33 sec.
    Reason: having stderror:
    Path: /src/ch/clickhouse/tests/queries/0_stateless/test_ggjjtc06/clickhouse-351von_4.10890
    ==================
    WARNING: ThreadSanitizer: data race (pid=10890)
      Write of size 4 at 0x5555569e9718 by thread T2:
        #0 thread2_func <null> (test-tsan+0xe7f68)

      Previous write of size 4 at 0x5555569e9718 by thread T1:
        #0 thread1_func <null> (test-tsan+0xe7f28)

      Location is global 'shared_var' of size 4 at 0x5555569e9718 (test-tsan+0x1495718)

      Thread T2 (tid=10893, running) created by main thread at:
        #0 pthread_create /src/llvm/llvm-project/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:1051:3 (test-tsan+0x640da)
        ClickHouse#1 main <null> (test-tsan+0xe7fc5)

      Thread T1 (tid=10892, finished) created by main thread at:
        #0 pthread_create /src/llvm/llvm-project/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:1051:3 (test-tsan+0x640da)
        ClickHouse#1 main <null> (test-tsan+0xe7fae)

    SUMMARY: ThreadSanitizer: data race (/tmp/test-tsan+0xe7f68) in thread2_func
    ==================
    ThreadSanitizer: reported 1 warnings
    stdout:
    1
    Database: test_ggjjtc06

    Having 1 errors! 0 tests passed. 0 tests skipped. 0.34 s elapsed (Process-3).
    All tests have finished.

And "Fatal" logs:

    $ ../tests/clickhouse-test shebang
    Using queries from '/src/ch/clickhouse/tests/queries' directory
    Connecting to ClickHouse server... OK
    Connected to server 25.7.1.1 @ 9042a93 master
    Found 1 parallel tests and 0 sequential tests
    Running about 1 stateless tests (Process-3).
    02203_shebang:                                                          [ FAIL ] 0.33 sec.
    Reason: having stderror:
    Path: /src/ch/clickhouse/tests/queries/0_stateless/test_grqdqc9f/clickhouse-p8a4uip4
    foo

    stdout:
    1
    Having 1 errors! 0 tests passed. 0 tests skipped. 0.34 s elapsed (Process-3).
    All tests have finished.

Fixes: ClickHouse#82234
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-not-for-changelog This PR should not be mentioned in the changelog pr-synced-to-cloud The PR is synced to the cloud repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants