Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

*** stack smashing detected ***: terminated #2633

Closed
ilyakooo0 opened this issue Jan 24, 2022 · 8 comments
Closed

*** stack smashing detected ***: terminated #2633

ilyakooo0 opened this issue Jan 24, 2022 · 8 comments
Labels
build tool: stack type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..

Comments

@ilyakooo0
Copy link

ilyakooo0 commented Jan 24, 2022

Your environment

Which OS do you use:

  • Linux 6273dde0ec9a 5.10.91 NixOS x86_64 GNU/Linux
  • VS Code 1.63.2
  • Stack

The project has quite a bit of TH: autoexporter and embedding files in binaries.

Steps to reproduce

I honestly don't know what causes this, but it happens every time I open my private project.

Expected behaviour

It does not crash

Actual behaviour

It crashes

Include debug information

Logs from the VS Code Haskell extension:
*** stack smashing detected ***: terminated
haskell-language-server-wrapper: callProcess: /home/vscode/.local/bin/haskell-language-server "--lsp" (exit -6): failed
[Error - 8:00:21 AM] Connection to server got closed. Server will not be restarted.
[Error - 8:00:21 AM] Request textDocument/codeAction failed.
Error: Connection got disposed.
	at Object.dispose (/home/vscode/.vscode-server/extensions/haskell.haskell-1.8.0/dist/extension.js:2:1010893)
	at Object.dispose (/home/vscode/.vscode-server/extensions/haskell.haskell-1.8.0/dist/extension.js:2:1090976)
	at k.handleConnectionClosed (/home/vscode/.vscode-server/extensions/haskell.haskell-1.8.0/dist/extension.js:2:1091189)
	at k.handleConnectionClosed (/home/vscode/.vscode-server/extensions/haskell.haskell-1.8.0/dist/extension.js:2:1151535)
	at t (/home/vscode/.vscode-server/extensions/haskell.haskell-1.8.0/dist/extension.js:2:1089278)
	at n.invoke (/home/vscode/.vscode-server/extensions/haskell.haskell-1.8.0/dist/extension.js:2:1012506)
	at a.fire (/home/vscode/.vscode-server/extensions/haskell.haskell-1.8.0/dist/extension.js:2:1013267)
	at Y (/home/vscode/.vscode-server/extensions/haskell.haskell-1.8.0/dist/extension.js:2:1000151)
	at n.invoke (/home/vscode/.vscode-server/extensions/haskell.haskell-1.8.0/dist/extension.js:2:1012506)
	at a.fire (/home/vscode/.vscode-server/extensions/haskell.haskell-1.8.0/dist/extension.js:2:1013267)
	at g.fireClose (/home/vscode/.vscode-server/extensions/haskell.haskell-1.8.0/dist/extension.js:2:1024720)
	at Socket.<anonymous> (/home/vscode/.vscode-server/extensions/haskell.haskell-1.8.0/dist/extension.js:2:1025505)
	at Socket.emit (events.js:315:20)
	at Pipe.<anonymous> (net.js:673:12)
[Error - 8:00:21 AM] Request textDocument/codeLens failed.
Error: Connection got disposed.
	at Object.dispose (/home/vscode/.vscode-server/extensions/haskell.haskell-1.8.0/dist/extension.js:2:1010893)
	at Object.dispose (/home/vscode/.vscode-server/extensions/haskell.haskell-1.8.0/dist/extension.js:2:1090976)
	at k.handleConnectionClosed (/home/vscode/.vscode-server/extensions/haskell.haskell-1.8.0/dist/extension.js:2:1091189)
	at k.handleConnectionClosed (/home/vscode/.vscode-server/extensions/haskell.haskell-1.8.0/dist/extension.js:2:1151535)
	at t (/home/vscode/.vscode-server/extensions/haskell.haskell-1.8.0/dist/extension.js:2:1089278)
	at n.invoke (/home/vscode/.vscode-server/extensions/haskell.haskell-1.8.0/dist/extension.js:2:1012506)
	at a.fire (/home/vscode/.vscode-server/extensions/haskell.haskell-1.8.0/dist/extension.js:2:1013267)
	at Y (/home/vscode/.vscode-server/extensions/haskell.haskell-1.8.0/dist/extension.js:2:1000151)
	at n.invoke (/home/vscode/.vscode-server/extensions/haskell.haskell-1.8.0/dist/extension.js:2:1012506)
	at a.fire (/home/vscode/.vscode-server/extensions/haskell.haskell-1.8.0/dist/extension.js:2:1013267)
	at g.fireClose (/home/vscode/.vscode-server/extensions/haskell.haskell-1.8.0/dist/extension.js:2:1024720)
	at Socket.<anonymous> (/home/vscode/.vscode-server/extensions/haskell.haskell-1.8.0/dist/extension.js:2:1025505)
	at Socket.emit (events.js:315:20)
	at Pipe.<anonymous> (net.js:673:12)
@ilyakooo0 ilyakooo0 added status: needs triage type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc.. labels Jan 24, 2022
@jneira
Copy link
Member

jneira commented Jan 24, 2022

I've seen that error before in the cabal issue tracker: haskell/cabal#7456
Does the build succeded out of hls? is the error throwed if you run haskell-language-server -d . in the project root dir (attach logs if it is so, please)?

@ilyakooo0
Copy link
Author

Yes, the issue is still reproducible when I call haskell-language-server -d ..

@jneira I sent you an email with the logs.

@jneira
Copy link
Member

jneira commented Jan 24, 2022

Thanks, i've took a look and i dont see nothing wrong until the crash. The error is shown just after loading path/to/Server.hs.
I guess haskell-language-server -d path/to/Server.hs alone will throw it again. If it is so maybe you could indentify some property of that module which might be related with the error

@pepeiborra
Copy link
Collaborator

Have you tried building an HLS binary from source with -dynamic?

https://haskell-language-server.readthedocs.io/en/latest/troubleshooting.html#static-binaries

@bgamari
Copy link

bgamari commented Feb 8, 2022

Which GHC version was this observed with?

@ilyakooo0
Copy link
Author

GHC 8.6.5

@ilyakooo0
Copy link
Author

I compiled HLS from source with the same version

@michaelpj
Copy link
Collaborator

Tentatively closing since old and quiet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build tool: stack type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..
Projects
None yet
Development

No branches or pull requests

5 participants