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

QQ core dump #1639

Closed
paolino opened this issue Mar 30, 2021 · 8 comments
Closed

QQ core dump #1639

paolino opened this issue Mar 30, 2021 · 8 comments
Labels
component: plugins type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..

Comments

@paolino
Copy link

paolino commented Mar 30, 2021

{-# language QuasiQuotes #-}
module Lib where 

import Hasql.TH  -- from hasql-th

oneStatement =
      [resultlessStatement| 
      insert into a (c) values (0)
      |]

Your environment

Output of haskell-language-server --probe-tools or haskell-language-server-wrapper --probe-tools:

~/hls-bug >>> haskell-language-server-8.10.4 --probe-tools                                                  [127]
haskell-language-server version: 1.0.0.0 (GHC: 8.10.4) (PATH: /home/paolino/.ghcup/bin/haskell-language-server-8.10.4~1.0.0) (GIT hash: 4cd1cf934638881e52b3eba9f70157a4b799c0e9)
Tool versions found on the $PATH
cabal:          3.2.0.0
stack:          2.5.1
ghc:            8.8.4

~/hls-bug >>>          

Which lsp-client do you use:

VSCode

Describe your project (alternative: link to the project):

Contents of hie.yaml:

cradle:
  stack:
    - path: "./src"
      component: "hls-bug:lib"

Steps to reproduce

git clone https://gitlab.com/devs.global.de/hls-qq-bug.git
cd hls-qq-bug
haskell-language-server-8.10.4 

Expected behaviour

No errors

Actual behaviour

2021-03-30 13:34:04.881348936 [ThreadId 225] INFO hls: finish: GenerateCore (took 0.00s)
haskell-language-server-8.10.4: allocatestack.c:384: advise_stack_range: Assertion `freesize < size' failed.
zsh: abort (core dumped) haskell-language-server-8.10.4

Include debug information

Execute in the root of your project the command haskell-language-server --debug . and paste the logs here:

Debug output:
~/hls-bug >>> haskell-language-server-8.10.4 --debug                                                    ±[master]
haskell-language-server version: 1.0.0.0 (GHC: 8.10.4) (PATH: /home/paolino/.ghcup/bin/haskell-language-server-8.10.4~1.0.0) (GIT hash: 4cd1cf934638881e52b3eba9f70157a4b799c0e9)
ghcide setup tester in /home/paolino/hls-bug.
Report bugs at https://github.com/haskell/haskell-language-server/issues

Step 1/4: Finding files to test in /home/paolino/hls-bug
Found 2 files

Step 2/4: Looking for hie.yaml files that control setup
Found 1 cradle
  (/home/paolino/hls-bug/hie.yaml)

Step 3/4: Initializing the IDE

Step 4/4: Type checking the files
2021-03-30 13:34:58.844923941 [ThreadId 4] DEBUG hls:   Set files of interest to: [(NormalizedFilePath "/home/paolino/hls-bug/src/Lib.hs",OnDisk),(NormalizedFilePath "/home/paolino/hls-bug/Setup.hs",OnDisk)]
2021-03-30 13:34:58.845865318 [ThreadId 51] INFO hls:   Consulting the cradle for "src/Lib.hs"
Output from setting up the cradle Cradle {cradleRootDir = "/home/paolino/hls-bug", cradleOptsProg = CradleAction: Stack}
2021-03-30 13:34:58.845880338 [ThreadId 59] INFO hls:   File:     
Hidden:   no
Range:    1:1-2:1
Source:   compiler
Severity: DsError
Message: 
  Internal error, getIdeGlobalExtras, no entry for IdeConfigurationVar
  CallStack (from HasCallStack):
  errorIO, called at src/Development/IDE/Core/Shake.hs:284:20 in
  ghcide-1.0.0.0-inplace:Development.IDE.Core.Shake
> hls-bug> configure (lib)
> Configuring hls-bug-0.1.0.0...
> hls-bug> initial-build-steps (lib)
> Configuring GHCi with the following packages: hls-bug
> /home/paolino/hls-bug/.stack-work/install/x86_64-linux-tinfo6/d4cee56cacabd8bd07391d265d3403a179a098315bb864732c0e2ff1e456e44d/8.10.4/pkgdb:/home/paolino/.stack/snapshots/x86_64-linux-tinfo6/d4cee56cacabd8bd07391d265d3403a179a098315bb864732c0e2ff1e456e44d/8.10.4/pkgdb:/home/paolino/.stack/programs/x86_64-linux/ghc-tinfo6-8.10.4/lib/ghc-8.10.4/package.conf.d
2021-03-30 13:35:00.931017584 [ThreadId 51] DEBUG hls:  Session loading result: Right (ComponentOptions {componentOptions = ["-i","-odir=/home/paolino/hls-bug/.stack-work/odir","-hidir=/home/paolino/hls-bug/.stack-work/odir","-hide-all-packages","-i/home/paolino/hls-bug/.stack-work/dist/x86_64-linux-tinfo6/Cabal-3.2.1.0/build","-i/home/paolino/hls-bug/src","-i/home/paolino/hls-bug/.stack-work/dist/x86_64-linux-tinfo6/Cabal-3.2.1.0/build/autogen","-i/home/paolino/hls-bug/.stack-work/dist/x86_64-linux-tinfo6/Cabal-3.2.1.0/build/global-autogen","-stubdir=/home/paolino/hls-bug/.stack-work/dist/x86_64-linux-tinfo6/Cabal-3.2.1.0/build","-package-id=base-4.14.1.0","-package-id=hasql-1.4.5.1-1L7dTodIujM5AETBnoy20O","-package-id=hasql-th-0.4.0.8-FsvjE8QSLSWL7KZzhseHId","-package-id=vector-0.12.1.2-6jlbObSa8iuJfxUVGBQC5r","-optP-include","-optP/home/paolino/hls-bug/.stack-work/ghci/10b49667/cabal_macros.h","-ghci-script=/tmp/haskell-stack-ghci/a125751e/ghci-script","-package-db","/home/paolino/hls-bug/.stack-work/install/x86_64-linux-tinfo6/d4cee56cacabd8bd07391d265d3403a179a098315bb864732c0e2ff1e456e44d/8.10.4/pkgdb","-package-db","/home/paolino/.stack/snapshots/x86_64-linux-tinfo6/d4cee56cacabd8bd07391d265d3403a179a098315bb864732c0e2ff1e456e44d/8.10.4/pkgdb","-package-db","/home/paolino/.stack/programs/x86_64-linux/ghc-tinfo6-8.10.4/lib/ghc-8.10.4/package.conf.d"], componentRoot = "/home/paolino/hls-bug", componentDependencies = ["hls-bug.cabal","package.yaml","stack.yaml"]},"/home/paolino/.stack/programs/x86_64-linux/ghc-tinfo6-8.10.4/lib/ghc-8.10.4")
2021-03-30 13:35:00.984431062 [ThreadId 51] INFO hls:   Using interface files cache dir: /home/paolino/.cache/ghcide/main-e9464d3229f923a67fd6512183610ff03a645567
2021-03-30 13:35:00.984650254 [ThreadId 51] INFO hls:   Making new HscEnv[main]
2021-03-30 13:35:00.996671707 [ThreadId 51] DEBUG hls:  New Component Cache HscEnvEq: (([],Just HscEnvEq 24),fromList [("/home/paolino/hls-bug/hie.yaml",Just 2021-03-30 11:27:59.723402696 UTC),("hls-bug.cabal",Just 2021-03-30 10:32:52.809633311 UTC),("package.yaml",Just 2021-03-30 10:32:39.969472182 UTC),("stack.yaml",Just 2021-03-30 10:26:46.075021619 UTC)])
2021-03-30 13:35:01.001908113 [ThreadId 51] DEBUG hls:  Known files updated: fromList [(TargetModule Paths_hls_bug,["/home/paolino/hls-bug/.stack-work/dist/x86_64-linux-tinfo6/Cabal-3.2.1.0/build/autogen/Paths_hls_bug.hs"]),(TargetModule Lib,["/home/paolino/hls-bug/src/Lib.hs"]),(TargetFile NormalizedFilePath "/home/paolino/hls-bug/src/Lib.hs",["/home/paolino/hls-bug/src/Lib.hs"])]
2021-03-30 13:35:01.002275776 [ThreadId 22] DEBUG hls:  Finishing build session(exception: AsyncCancelled)
2021-03-30 13:35:01.002387837 [ThreadId 51] DEBUG hls:  Restarting build session (aborting the previous one took 0.00s)
2021-03-30 13:35:01.003974787 [ThreadId 134] INFO hls:  Consulting the cradle for "Setup.hs"
Output from setting up the cradle Cradle {cradleRootDir = "/home/paolino/hls-bug", cradleOptsProg = CradleAction: Stack}
2021-03-30 13:35:01.004179169 [ThreadId 134] DEBUG hls: Session loading result: Left [CradleError {cradleErrorDependencies = [], cradleErrorExitCode = ExitSuccess, cradleErrorStderr = ["Multi Cradle: No prefixes matched","pwd: /home/paolino/hls-bug","filepath: /home/paolino/hls-bug/Setup.hs","prefixes:","(\"./src\",Stack {component = Just \"hls-bug:lib\", stackYaml = Nothing})"]}]
2021-03-30 13:35:01.00438312 [ThreadId 128] INFO hls:   File:     /home/paolino/hls-bug/Setup.hs
Hidden:   no
Range:    1:1-2:1
Source:   cradle
Severity: DsError
Message: 
  Multi Cradle: No prefixes matched
  pwd: /home/paolino/hls-bug
  filepath: /home/paolino/hls-bug/Setup.hs
  prefixes:
  ("./src",Stack {component = Just "hls-bug:lib", stackYaml = Nothing})
2021-03-30 13:35:01.399944072 [ThreadId 211] INFO hls:  finish: User TypeCheck (took 0.40s)
2021-03-30 13:35:01.402204138 [ThreadId 224] INFO hls:  finish: GetHie (took 0.00s)
2021-03-30 13:35:01.402324329 [ThreadId 225] INFO hls:  finish: GenerateCore (took 0.00s)
Files that failed:
 * /home/paolino/hls-bug/Setup.hs

Completed (1 file worked, 1 file failed)
haskell-language-server-8.10.4: allocatestack.c:384: advise_stack_range: Assertion `freesize < size' failed.
zsh: abort (core dumped)  haskell-language-server-8.10.4 --debug
~/hls-bug >>>   
<paste your logs here>

Paste the logs from the lsp-client, e.g. for VS Code

LSP logs:
<paste your logs here>
@paolino
Copy link
Author

paolino commented Mar 30, 2021

Worth mentioning that running ghcide

[a.pv@he 08:51:02 vlan-service] ghcide --version
ghcide version: 0.6.0.2 (GHC: 8.10) (PATH: /home/a.pv/.local/bin/ghcide) (GIT hash: 3ef4ef99c4b9cde867d29180c32586947df64b9e)

it completes the analysis with no core dump

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

Ailrun commented Mar 30, 2021

As a quick workaround, you can disable some plugins using config explained here.

@jneira
Copy link
Member

jneira commented Mar 30, 2021

This one is very similar to #1638 (that in turn could be a duplicate of #429)

@jneira
Copy link
Member

jneira commented Mar 30, 2021

What is your os (we should ask for it in the template 🤔 )?

@paolino
Copy link
Author

paolino commented Mar 30, 2021

What is your os (we should ask for it in the template thinking )?

Both arch and centos 7 fail, centos 7 with segfault

@paolino
Copy link
Author

paolino commented Mar 30, 2021

I compiled the project

haskell-language-server version: 1.0.0.0 (GHC: 8.10.4) (PATH: /home/a.pv/.local/bin/haskell-language-server) (GIT hash: c5f5d20fa8635acf40e17f609af2a30c362c933c)

the issue is not there anymore

@jneira
Copy link
Member

jneira commented Mar 30, 2021

nice, thanks for trying and confirm it, I would close this one as duplicated after updatingbthe original one, if you don't mind

@paolino
Copy link
Author

paolino commented Mar 30, 2021

yes, thanks for support

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: plugins 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

3 participants