Repository navigation
Conversation
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
This was referenced Dec 2, 2026
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.
See ltex-plus/ltex-ls-plus#231.
Problem
ltex-cli-plusgiven several files checks the first five or six, logsWaiting for diagnostics for filefor 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.checkFilewaited for them forever. In every thread dump of a stalled server, the checking thread is inFileOutputStream.writeBytesunderConsoleHandler. The server's log reaches 2.8 KB before the sixth file and 4.5 KB by the seventh.Fix
LspCliLanguageClient.startLanguageServerProcessnow discards the server's standard error output, or with--verbose(log level INFO) passes it through to the client's own. The--verbosehelp text, the README andchangelog.xmlsay so.Testing
StderrFloodingLanguageServerwrites 1 MiB to standard error output before it publishes diagnostics. ItsCheckerTestcase times out after 30 s on the old code and passes with the fix.ltex-cli-plusnever exits when given several files, stopping atWaiting for diagnostics for fileltex-ls-plus#231, 6 of 6 runs stalled before the fix: 3 with ltex-ls-plus 19.0.0, and 3 with a build of ltex-ls-plus'sdevelop. After it, 6 of 6 runs (3 with--verbose, 3 without) checked all seven files, reported 121 diagnostics, and exited in 12 to 18 s. The sample from LTeX CLI hangs indefinitely with a specific markdown and somehiddenFalsePositivesltex-ls-plus#99 finishes in 12 s.mvn verifypasses: 16 tests,ktlint,detektand JaCoCo. It ran on JDK 21: on JDK 25 the suite hangs inLspCliLauncherTestbefore this change too, which I'm looking into separately.Once this is released, ltex-ls-plus needs its
lspCliVersionintools/addLtexCli.pybumped, 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