Inifinite recursion in logger
- Dominant language
- Haskell
- Stars
- 423
- Forks
- 105
- PR merge metrics
- No merged PRs in 30d
Description
This was originally found in https://github.com/haskell/haskell-language-server/pull/3072
In `lsp`, there is a debug log, printing response body:
https://github.com/haskell/lsp/blob/8b63438313828a31ba1065ea865e504d532d093e/lsp/src/Language/LSP/Server/Control.hs#L224-L234
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.

Contributor guide
Assessment
This issue has not been assessed yet.