-
Notifications
You must be signed in to change notification settings - Fork 101
Open
Description
This was originally found in haskell/haskell-language-server#3072
In lsp, there is a debug log, printing response body:
lsp/lsp/src/Language/LSP/Server/Control.hs
Lines 224 to 234 in 8b63438
| -- We need to make sure we only send over the content of the message, | |
| -- and no other tags/wrapper stuff | |
| let str = J.encode msg | |
| let out = BSL.concat | |
| [ TL.encodeUtf8 $ TL.pack $ "Content-Length: " ++ show (BSL.length str) | |
| , BSL.fromStrict _TWO_CRLF | |
| , str ] | |
| clientOut out | |
| logger <& SendMsg (TL.decodeUtf8 str) `WithSeverity` Debug |
And in HLS, our logger sends a copy of log to LSP client:
https://github.com/haskell/haskell-language-server/blob/347a7187f20242540926b9927c59a45b18798c67/exe/Main.hs#L72-L82
Then it goes into infinite recursion. A lot of logs like below are produced, and finally OOM on a machine with 64GB RAM.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
