Skip to content

HLS loops - out of memory? (Assertion `freesize < size' failed.) #1638

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

Closed
googleson78 opened this issue Mar 30, 2021 · 5 comments
Closed

HLS loops - out of memory? (Assertion `freesize < size' failed.) #1638

googleson78 opened this issue Mar 30, 2021 · 5 comments
Labels
build tool: stack performance Issues about memory consumption, responsiveness, etc. status: needs info Not actionable, because there's missing information type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..

Comments

@googleson78
Copy link
Contributor

hls version

tauren :: git/benchmark/vray-benchmark-service ‹BENCH-1100_poc*› » haskell-language-server-wrapper --version
haskell-language-server version: 1.0.0.0 (GHC: 8.10.4) (PATH: /home/googleson78/.ghcup/bin/haskell-language-server-wrapper-1.0.0) (GIT hash: 4cd1cf934638881e52b3eba9f70157a4b799c0e9)

Your environment

Describe your project (alternative: link to the project): Private project, can't give link unfortunately
Has 5 components:

  • lib
  • exe - generate-data
  • exe - generate-docs
  • exe - vray-benchmark-service
  • tests benchmark-tests

Contents of hie.yaml:

cradle:
  stack:
    - path: "./src"
      component: "vray-benchmark-service:lib"

    - path: "./generate-data/Main.hs"
      component: "vray-benchmark-service:exe:generate-data"

    - path: "./generate-data/Paths_vray_benchmark_service.hs"
      component: "vray-benchmark-service:exe:generate-data"

    - path: "./generate-docs/Main.hs"
      component: "vray-benchmark-service:exe:generate-docs"

    - path: "./generate-docs/Paths_vray_benchmark_service.hs"
      component: "vray-benchmark-service:exe:generate-docs"

    - path: "./app/Main.hs"
      component: "vray-benchmark-service:exe:vray-benchmark-service"

    - path: "./app/Paths_vray_benchmark_service.hs"
      component: "vray-benchmark-service:exe:vray-benchmark-service"

    - path: "./tests"
      component: "vray-benchmark-service:test:benchmark-tests"

Steps to reproduce

The file I'm trying to typecheck does not compile - it has a kind mismatch in it.

type family ConfigFor (ty :: ScoreType) :: Type where

ScoreType actually has a type parameter, but In this type family signature it has not been added yet. GHC properly reports this error, and HLS does too (when called directly via a shell), but after failing it just endlessly attempts to recompile again.

Include debug information

Here's a log of letting hls run until it arbitrarily crashes with an error to stderr (stack overflow error?).

haskell-language-server-8.8.4: allocatestack.c:384: advise_stack_range: Assertion `freesize < size' failed.
haskell-language-server-wrapper: callProcess: /home/googleson78/.ghcup/bin/haskell-language-server-8.8.4 "-d" "-l" "looping.log" "src/ScoreType.hs" (exit -6): failed

I'm including all of the stdout, the stderr, and the output of -d, as the stack overflow error seems to not be present in the -d output.
looping.log (-d output)
loopingstdout.log
loopingstderr.log

@Ailrun Ailrun added type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc.. build tool: stack status: needs repro labels Mar 30, 2021
@Ailrun
Copy link
Member

Ailrun commented Mar 30, 2021

Thank you for the issue report! It will be also great if you can also provide some reproduction.

@jneira
Copy link
Member

jneira commented Mar 30, 2021

It is very similar to #429, it involves using compiler plugins and building hls from source in the machine is using it served as workaround

@jneira jneira mentioned this issue Mar 30, 2021
@googleson78
Copy link
Contributor Author

Same issue with an hls built from master (currently d60dee0)

@googleson78
Copy link
Contributor Author

googleson78 commented Mar 30, 2021

I'm not sure if this is a repro for the same thing, but I got this while trying to slim down my original reproducer - https://github.com/googleson78/repro1638

It doesn't loop forever, but it does loop a few times, so maybe it just doesn't run out of space due to the fact that this repo is a lot smaller compared to the other?

In there, I don't get any errors reported in my lsp client (nvim + LanguageClient-neovim). I would expect to get the error that ghc reports.

@jneira jneira added the performance Issues about memory consumption, responsiveness, etc. label Apr 6, 2021
@jneira jneira changed the title HLS loops - out of memory? HLS loops - out of memory? (Assertion freesize < size' failed.`) Jan 31, 2022
@jneira jneira changed the title HLS loops - out of memory? (Assertion freesize < size' failed.`) HLS loops - out of memory? (Assertion `freesize < size' failed.) Jan 31, 2022
@hasufell hasufell added status: needs info Not actionable, because there's missing information and removed old_status: needs repro labels Jul 13, 2022
@michaelpj
Copy link
Collaborator

Closing as old and no recent reports

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build tool: stack performance Issues about memory consumption, responsiveness, etc. status: needs info Not actionable, because there's missing information 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