Skip to content

Discard or pass through the server's stderr - #68

Open
regulad wants to merge 1 commit into
ltex-plus:developfrom
regulad:implement-231
Open

regulad wants to merge 1 commit into
ltex-plus:developfrom
regulad:implement-231

Conversation

@regulad

@regulad regulad commented Dec 2, 2026

Copy link
Copy Markdown

See ltex-plus/ltex-ls-plus#231.

Problem

ltex-cli-plus given several files checks the first five or six, logs Waiting for diagnostics for file for the next, and never exits. ltex-plus/ltex-ls-plus#99 is the same bug: its one-file sample stalls too.

Cause

lsp-cli-plus started the language server with its standard error output as a pipe and never read it. ltex-ls-plus logs at FINE there by default, and on Windows the pipe holds about 4 KB. Once it was full, the server blocked in its next write to the log and never published the diagnostics of the file being checked, so Checker.checkFile waited for them forever. In every thread dump of a stalled server, the checking thread is in FileOutputStream.writeBytes under ConsoleHandler. The server's log reaches 2.8 KB before the sixth file and 4.5 KB by the seventh.

Fix

LspCliLanguageClient.startLanguageServerProcess now discards the server's standard error output, or with --verbose (log level INFO) passes it through to the client's own. The --verbose help text, the README and changelog.xml say so.

Testing

Once this is released, ltex-ls-plus needs its lspCliVersion in tools/addLtexCli.py bumped, which would close ltex-plus/ltex-ls-plus#231 and ltex-plus/ltex-ls-plus#99.


Drafted by Claude Opus 5.5 (claude-opus-5-5); reviewed by @regulad.

https://claude.ai/code/session_01Mv4cZ3LFVAJ9aG5SntwnAr

lsp-cli-plus started the language server with its standard error
output as a pipe and never read it. Servers write their log there, and
ltex-ls-plus logs at FINE by default. Once the pipe was full (about
4 KB on Windows), the server blocked in its next write to the log and
never published the diagnostics of the file being checked, so the
client waited for them forever.

Discard the server's standard error output, or with --verbose pass it
through to the client's own. Add a test server that writes 1 MiB to
standard error output before it publishes diagnostics.

See ltex-plus/ltex-ls-plus#231.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Mv4cZ3LFVAJ9aG5SntwnAr
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.

ltex-cli-plus never exits when given several files, stopping at Waiting for diagnostics for file

1 participant