Repository navigation
Never stop the server process from the line editor of the embedded client - #125512
Merged
Merged
Conversation
…ient The embedded client (`/webterminal` and the SSH interface) runs `replxx` inside the server process. Pressing Ctrl-R and then Ctrl-Z stopped the whole server with `SIGSTOP`: the incremental history search of `replxx` handled Ctrl-Z by itself with `raise(SIGSTOP)`, bypassing the key binding that disables suspending. - Update `replxx` so that Ctrl-Z in the history search goes through the key binding. - In the embedded mode, always disable suspending, regardless of `ignore_shell_suspend`. - In the embedded mode, do not install the process-wide `SIGWINCH` handler: the pseudoterminal is not the controlling terminal of the server, so it is useless, and the server process must not have its signal handlers changed by a session. Closes: ClickHouse/clickhouse-private#80920 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Contributor
|
Workflow [PR], commit [bc33b3d] Summary: ✅
AI ReviewSummaryReviewed #125512 at Final Verdict✅ Approve |
`master` of `replxx` now contains the fix of Ctrl-Z in the incremental history search. The new commit merges it with the history recall changes used by ClickHouse and fixes Ctrl-V blocking after the esc delay support from `master`. Related: ClickHouse/replxx#45 Related: ClickHouse/replxx#46 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Contributor
Build profile diff (arm_release)Commit See the job log for details. |
Address review: the previous bump to the merge of `replxx` `master` with the ClickHouse changes also pulled in the `vi`/editing-mode series, the `Esc`-delay handling, prompt indentation and thread-local terminal state. The `Esc`-delay handling broke Meta+Up history recall, which made `04909_client_hints_history_navigation` fail (`meta_up_recall_no_hints`) in every stateless test job: https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=125512&sha=latest&name_0=PR #125512 Go back to `00cd994`, which is the current `replxx` pointer on `master` plus only the one-file fix for `Ctrl-Z` in the incremental history search. The broader `replxx` upgrade should go into a separate PR. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…in-embedded-client Resolve the conflict in `tests/integration/test_webterminal/test.py` by keeping both new tests.
This was referenced Oct 14, 2026
clickhouse-gh Bot
added a commit
that referenced
this pull request
Oct 14, 2026
Backport #125512 to 26.8: Never stop the server process from the line editor of the embedded client
clickhouse-gh Bot
added a commit
that referenced
this pull request
Oct 14, 2026
Backport #125512 to 26.9: Never stop the server process from the line editor of the embedded client
robot-clickhouse-ci-1
added a commit
that referenced
this pull request
Oct 15, 2026
Cherry pick #125512 to 26.3: Never stop the server process from the line editor of the embedded client
robot-clickhouse
added a commit
that referenced
this pull request
Oct 15, 2026
… editor of the embedded client
robot-clickhouse-ci-1
added a commit
that referenced
this pull request
Oct 15, 2026
Cherry pick #125512 to 26.7: Never stop the server process from the line editor of the embedded client
robot-clickhouse
added a commit
that referenced
this pull request
Oct 15, 2026
… editor of the embedded client
strtgbb
pushed a commit
to Altinity/ClickHouse
that referenced
this pull request
Oct 15, 2026
…m the line editor of the embedded client
clickhouse-gh Bot
added a commit
that referenced
this pull request
Oct 15, 2026
Backport #125512 to 26.7: Never stop the server process from the line editor of the embedded client
alexey-milovidov
added a commit
that referenced
this pull request
Oct 15, 2026
Backport #125512 to 26.3: Never stop the server process from the line editor of the embedded client
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The embedded client (
/webterminaland the SSH interface) runsreplxxinside the server process. Pressing Ctrl-R and then Ctrl-Z stopped the whole server withSIGSTOP. The incremental history search inreplxxhandled Ctrl-Z itself withraise(SIGSTOP)and so skipped the key binding that disables suspending.The fix goes after the root cause, which is terminal job control leaking into a process that does not own the terminal:
replxx(merged in Handle Ctrl-Z in incremental history search through the key binding replxx#45): Ctrl-Z in the history search now exits the search and goes back to the main loop, like the other editing keys, so it uses the key binding.suspendis the only otherraisecall, and it can only be reached through the binding.ignore_shell_suspendis set to.SIGWINCHhandler is no longer installed. The pseudoterminal is not the server's controlling terminal, so the signal never arrives anyway, and a session must not change the server's signal handlers.The
contrib/replxxsubmodule points to ClickHouse/replxx@00cd994: thereplxxcommit already used onmasterplus only the one-file fix for Ctrl-Z in the history search. The broader update to the merge with replxxmaster(ClickHouse/replxx#46) is left for a separate PR, because itsEsc-delay handling breaks Meta+Up history recall.I confirmed locally that with only the
ReplxxLineReaderchange (oldreplxx), the server ends up in stateT (stopped)after\x12\x1a. With thereplxxchange it keeps serving, and the session still runs queries. The added integration test reuses the existingtest_webterminalcluster.Closes: https://github.com/ClickHouse/clickhouse-private/issues/80920
Related: ClickHouse/replxx#45
Related: ClickHouse/replxx#46
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Fixed an issue where pressing Ctrl-R and then Ctrl-Z in the web terminal or the SSH interface suspended the whole server process.
🤖 Generated with Claude Code
Workflow [PR]
Sync PR [sync-upstream/pr/125512]
Version info
26.10.1.2405-master(included in26.10and later)26.9.20.11,26.8.28.10,26.7.32.5,26.3.53.6