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

Sporadic GHCJS crashes and panics #791

Open
johannesgerer opened this issue Jun 17, 2020 · 4 comments
Open

Sporadic GHCJS crashes and panics #791

johannesgerer opened this issue Jun 17, 2020 · 4 comments

Comments

@johannesgerer
Copy link

johannesgerer commented Jun 17, 2020

Hello,

ghcjs-8.6.0.1 -O2 obtained through Reflex Platform on x86_64 GNU/Linux crashes sporadically on my codebase and usually runs through on retry.

Unable to identify a pattern, I would not know where to start debugging this and am aware that the information in this (initial) post is not enough to investigate the root cause.

This issue is started to keep track of these crashes, also for reference for other people experiencing similar crashes.

Retrying a compilation here and there is not a big issue, my real concern is that GHCJS might produce incorrect or corrupt code(?).

Some of the error messages mention: Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug, but I guess given this is GHCJS this does not apply here?

These are four examples:

(cabal is compiling modules in parallel so I am not sure whether the Linking Template Haskell actually came from the crashed compilation.)

<no location info>: error:
    expectJust cpeBody:collect_args
CallStack (from HasCallStack):
  error, called at compiler/utils/Maybes.hs:55:27 in ghc-api-ghcjs-8.6.5-6FVyIFYUYrGAjZejsOfZHE:Maybes
  expectJust, called at compiler/coreSyn/CorePrep.hs:930:32 in ghc-api-ghcjs-8.6.5-6FVyIFYUYrGAjZejsOfZHE:CorePrep
Linking Template Haskell ([...])

<no location info>: error:                                                                                
    ghcjs: panic! (the 'impossible' happened)
  (GHC version 8.6.5 for x86_64-unknown-linux):
        tcIfaceExtId                                                                                                                                                                                                
  $fPersistEntityColumnA_$ckeyToValues                                                                                                                                                                            
  Coercion axiom ‘D:R:EntityFieldIndexProdtyp0’                                                                                                                                                                     
  Call stack:                                                                                                                                                                                                       
      CallStack (from HasCallStack):                                                                      
        callStackDoc, called at compiler/utils/Outputable.hs:1160:37 in ghc-api-ghcjs-8.6.5-6FVyIFYUYrGAjZejsOfZHE:Outputable
        pprPanic, called at compiler/iface/TcIface.hs:1695:38 in ghc-api-ghcjs-8.6.5-6FVyIFYUYrGAjZejsOfZHE:TcIface
Linking Template Haskell ([...])

<no location info>: error:
    ghcjs: panic! (the 'impossible' happened)
  (GHC version 8.6.5 for x86_64-unknown-linux):
        getClassPredTys
  forall a b.
  WhenMatched f_a1iYU x_a1iYV y_a1iYW a
  -> (a -> WhenMatched f_a1iYU x_a1iYV y_a1iYW b)
  -> WhenMatched f_a1iYU x_a1iYV y_a1iYW b
  Call stack:
      CallStack (from HasCallStack):
        callStackDoc, called at compiler/utils/Outputable.hs:1160:37 in ghc-api-ghcjs-8.6.5-6FVyIFYUYrGAjZejsOfZHE:Outputable
        pprPanic, called at compiler/types/Type.hs:1848:29 in ghc-api-ghcjs-8.6.5-6FVyIFYUYrGAjZejsOfZHE:Type
<no location info>: error:                                                                                                                                                                                              ghcjs: panic! (the 'impossible' happened)                                                                                                                                                                       
  (GHC version 8.6.5 for x86_64-unknown-linux):                                                                                                                                                                             getClassPredTys                                                                                                                                                                                             
  Put ()                                                                                                                                                                                                            
  Call stack:                                                                                                                                                                                                             CallStack (from HasCallStack):                                                                                                                                                                                
        callStackDoc, called at compiler/utils/Outputable.hs:1160:37 in ghc-api-ghcjs-8.6.5-6FVyIFYUYrGAjZejsOfZHE:Outputable                                                                                               pprPanic, called at compiler/types/Type.hs:1848:29 in ghc-api-ghcjs-8.6.5-6FVyIFYUYrGAjZejsOfZHE:Type                                                                                                                                                                                                                     

Thanks,
Johannes

@cdsmith
Copy link

cdsmith commented Jun 17, 2020

One thing you might try is telling cabal not to build in parallel. This fixed my random GHCJS panics with the same version of GHCJS. If you disable parallel builds and it fixes the problem, that is a huge step toward identifying the cause.

@3noch
Copy link

3noch commented Jun 17, 2020

Possibly related: #654

@ddssff
Copy link
Contributor

ddssff commented Jun 24, 2020

We had these problems until we switched from cabal to cabal-v2. Mysterious, I know.

@ilyakooo0
Copy link

ilyakooo0 commented Aug 24, 2021

I get a reproducible error: https://github.com/typeable/octopod/pull/83/checks?check_run_id=3408759131

rerunning the job yields the same result

for history: this is the commit typeable/octopod@8091758

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants