Skip to content

Fix hung check in stress test caused by synchronous DELETE on system.session_log - #96947

Merged
alexey-milovidov merged 1 commit into
masterfrom
fix-02835-hung-check-stress-test
Feb 15, 2026
Merged

alexey-milovidov merged 1 commit into
masterfrom
fix-02835-hung-check-stress-test

Conversation

@alexey-milovidov

@alexey-milovidov alexey-milovidov commented Feb 15, 2026 •

Copy link
Copy Markdown
Member

Summary

  • The DELETE FROM system.session_log cleanup at the start of test 02835_drop_user_during_session creates a synchronous lightweight delete mutation. In ASan stress tests, system.session_log receives continuous writes from all concurrent sessions, causing the mutation to get stuck in StorageMergeTree::waitForMutation for over 12 minutes, triggering the hung check.
  • Fix by making the cleanup DELETE non-blocking with lightweight_deletes_sync = 0. This is safe because the test user name includes the PID, making collisions extremely unlikely.

CI report: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=96926&sha=724c57e90613f66e2ef897f80a644ba21e98b470&name_0=PR&name_1=Stress%20test%20%28arm_asan%2C%20s3%29
#96926

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 into CHANGELOG.md):

...

Documentation entry for user-facing changes

  • Documentation is written (mandatory for new features)

🤖 Generated with Claude Code

Version info

  • Merged into: 26.2.1.722

…em.session_log`

The `DELETE FROM system.session_log` cleanup at the start of test
`02835_drop_user_during_session` creates a synchronous lightweight delete
mutation. In ASan stress tests, `system.session_log` receives continuous
writes from all concurrent test sessions, causing the mutation to take
over 12 minutes. Even though the query gets cancelled (`is_cancelled: 1`),
it remains stuck in `StorageMergeTree::waitForMutation`.

Fix by making the cleanup DELETE non-blocking with
`lightweight_deletes_sync = 0`. This is safe because the test user name
includes the PID (`$$`), making collisions from PID reuse extremely
unlikely during a single stress test run.

https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=96926&sha=724c57e90613f66e2ef897f80a644ba21e98b470&name_0=PR&name_1=Stress%20test%20%28arm_asan%2C%20s3%29

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@clickhouse-gh

clickhouse-gh Bot commented Feb 15, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [f3e2aaa]

Summary: ✅

@clickhouse-gh clickhouse-gh Bot added the pr-ci label Feb 15, 2026
@alexey-milovidov alexey-milovidov self-assigned this Feb 15, 2026
@alexey-milovidov
alexey-milovidov merged commit fc4ebee into master Feb 15, 2026
130 checks passed
@alexey-milovidov
alexey-milovidov deleted the fix-02835-hung-check-stress-test branch February 15, 2026 13:42
@robot-ch-test-poll4 robot-ch-test-poll4 added the pr-synced-to-cloud The PR is synced to the cloud repo label Feb 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-ci 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.

2 participants