Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • GHC GHC
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 5,242
    • Issues 5,242
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 570
    • Merge requests 570
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell CompilerGlasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #21694
Closed
Open
Issue created Jun 05, 2022 by Artem Pelenitsyn@ulysses4everReporter

cborg profiling bulid fails with panic

Summary

cborg profiling bulid fails with panic

Steps to reproduce

$ cabal unpack cborg-0.2.7.0
$ cd cborg-0.2.7.0
$ cabal build --enable-profiling --profiling=all

Warning: The package list for 'hackage.haskell.org' is 25 days old.
Run 'cabal update' to get the latest list of available packages.
Resolving dependencies...
Build profile: -w ghc-9.2.2 -O1
In order, the following will be built (use -v for more details):
 - half-0.3.1 (lib) (requires build)
 - primitive-0.7.3.0 (lib) (requires build)
 - cborg-0.2.7.0 (lib)  --enable-profiling (first run)
Starting     half-0.3.1 (lib)
Starting     primitive-0.7.3.0 (lib)
Building     primitive-0.7.3.0 (lib)
Building     half-0.3.1 (lib)
Installing   half-0.3.1 (lib)
Completed    half-0.3.1 (lib)
Installing   primitive-0.7.3.0 (lib)
Completed    primitive-0.7.3.0 (lib)
Configuring library for cborg-0.2.7.0..
Preprocessing library for cborg-0.2.7.0..
Building library for cborg-0.2.7.0..
[ 1 of 14] Compiling Codec.CBOR.ByteArray.Internal ( src/Codec/CBOR/ByteArray/Internal.hs, /data/artem/hask/cborg-0.2.7.0/dist-newstyle/build/x86_64-linux/ghc-9.2.2/cborg-0.2.7.0/build/Codec/CBOR/ByteArray/Internal.o, /data/artem/hask/cborg-0.2.7.0/dist-newstyle/build/x86_64-linux/ghc-9.2.2/cborg-0.2.7.0/build/Codec/CBOR/ByteArray/Internal.dyn_o )
[ 2 of 14] Compiling Codec.CBOR.ByteArray.Sliced ( src/Codec/CBOR/ByteArray/Sliced.hs, /data/artem/hask/cborg-0.2.7.0/dist-newstyle/build/x86_64-linux/ghc-9.2.2/cborg-0.2.7.0/build/Codec/CBOR/ByteArray/Sliced.o, /data/artem/hask/cborg-0.2.7.0/dist-newstyle/build/x86_64-linux/ghc-9.2.2/cborg-0.2.7.0/build/Codec/CBOR/ByteArray/Sliced.dyn_o )

src/Codec/CBOR/ByteArray/Sliced.hs:44:1: warning: [-Wunused-imports]
    The qualified import of ‘Data.ByteString.Short.Internal’ is redundant
      except perhaps to import instances from ‘Data.ByteString.Short.Internal’
    To import instances alone, use: import Data.ByteString.Short.Internal()
   |
44 | import qualified Data.ByteString.Short.Internal as BSS
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ 3 of 14] Compiling Codec.CBOR.ByteArray ( src/Codec/CBOR/ByteArray.hs, /data/artem/hask/cborg-0.2.7.0/dist-newstyle/build/x86_64-linux/ghc-9.2.2/cborg-0.2.7.0/build/Codec/CBOR/ByteArray.o, /data/artem/hask/cborg-0.2.7.0/dist-newstyle/build/x86_64-linux/ghc-9.2.2/cborg-0.2.7.0/build/Codec/CBOR/ByteArray.dyn_o )

src/Codec/CBOR/ByteArray.hs:39:1: warning: [-Wunused-imports]
    The qualified import of ‘Data.ByteString.Short.Internal’ is redundant
      except perhaps to import instances from ‘Data.ByteString.Short.Internal’
    To import instances alone, use: import Data.ByteString.Short.Internal()
   |
39 | import qualified Data.ByteString.Short.Internal as BSS
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ 4 of 14] Compiling Codec.CBOR.Decoding ( src/Codec/CBOR/Decoding.hs, /data/artem/hask/cborg-0.2.7.0/dist-newstyle/build/x86_64-linux/ghc-9.2.2/cborg-0.2.7.0/build/Codec/CBOR/Decoding.o, /data/artem/hask/cborg-0.2.7.0/dist-newstyle/build/x86_64-linux/ghc-9.2.2/cborg-0.2.7.0/build/Codec/CBOR/Decoding.dyn_o )
[ 5 of 14] Compiling Codec.CBOR.Encoding[boot] ( src/Codec/CBOR/Encoding.hs-boot, /data/artem/hask/cborg-0.2.7.0/dist-newstyle/build/x86_64-linux/ghc-9.2.2/cborg-0.2.7.0/build/Codec/CBOR/Encoding.o-boot, /data/artem/hask/cborg-0.2.7.0/dist-newstyle/build/x86_64-linux/ghc-9.2.2/cborg-0.2.7.0/build/Codec/CBOR/Encoding.dyn_o )
[ 6 of 14] Compiling Codec.CBOR.FlatTerm[boot] ( src/Codec/CBOR/FlatTerm.hs-boot, /data/artem/hask/cborg-0.2.7.0/dist-newstyle/build/x86_64-linux/ghc-9.2.2/cborg-0.2.7.0/build/Codec/CBOR/FlatTerm.o-boot, /data/artem/hask/cborg-0.2.7.0/dist-newstyle/build/x86_64-linux/ghc-9.2.2/cborg-0.2.7.0/build/Codec/CBOR/FlatTerm.dyn_o )
[ 7 of 14] Compiling Codec.CBOR.Encoding ( src/Codec/CBOR/Encoding.hs, /data/artem/hask/cborg-0.2.7.0/dist-newstyle/build/x86_64-linux/ghc-9.2.2/cborg-0.2.7.0/build/Codec/CBOR/Encoding.o, /data/artem/hask/cborg-0.2.7.0/dist-newstyle/build/x86_64-linux/ghc-9.2.2/cborg-0.2.7.0/build/Codec/CBOR/Encoding.dyn_o )
[ 8 of 14] Compiling Codec.CBOR.Magic ( src/Codec/CBOR/Magic.hs, /data/artem/hask/cborg-0.2.7.0/dist-newstyle/build/x86_64-linux/ghc-9.2.2/cborg-0.2.7.0/build/Codec/CBOR/Magic.o, /data/artem/hask/cborg-0.2.7.0/dist-newstyle/build/x86_64-linux/ghc-9.2.2/cborg-0.2.7.0/build/Codec/CBOR/Magic.dyn_o )
[ 9 of 14] Compiling Codec.CBOR.Read  ( src/Codec/CBOR/Read.hs, /data/artem/hask/cborg-0.2.7.0/dist-newstyle/build/x86_64-linux/ghc-9.2.2/cborg-0.2.7.0/build/Codec/CBOR/Read.o, /data/artem/hask/cborg-0.2.7.0/dist-newstyle/build/x86_64-linux/ghc-9.2.2/cborg-0.2.7.0/build/Codec/CBOR/Read.dyn_o )
[10 of 14] Compiling Codec.CBOR.FlatTerm ( src/Codec/CBOR/FlatTerm.hs, /data/artem/hask/cborg-0.2.7.0/dist-newstyle/build/x86_64-linux/ghc-9.2.2/cborg-0.2.7.0/build/Codec/CBOR/FlatTerm.o, /data/artem/hask/cborg-0.2.7.0/dist-newstyle/build/x86_64-linux/ghc-9.2.2/cborg-0.2.7.0/build/Codec/CBOR/FlatTerm.dyn_o )
[11 of 14] Compiling Codec.CBOR.Term  ( src/Codec/CBOR/Term.hs, /data/artem/hask/cborg-0.2.7.0/dist-newstyle/build/x86_64-linux/ghc-9.2.2/cborg-0.2.7.0/build/Codec/CBOR/Term.o, /data/artem/hask/cborg-0.2.7.0/dist-newstyle/build/x86_64-linux/ghc-9.2.2/cborg-0.2.7.0/build/Codec/CBOR/Term.dyn_o )
[12 of 14] Compiling Codec.CBOR       ( src/Codec/CBOR.hs, /data/artem/hask/cborg-0.2.7.0/dist-newstyle/build/x86_64-linux/ghc-9.2.2/cborg-0.2.7.0/build/Codec/CBOR.o, /data/artem/hask/cborg-0.2.7.0/dist-newstyle/build/x86_64-linux/ghc-9.2.2/cborg-0.2.7.0/build/Codec/CBOR.dyn_o )
[13 of 14] Compiling Codec.CBOR.Write ( src/Codec/CBOR/Write.hs, /data/artem/hask/cborg-0.2.7.0/dist-newstyle/build/x86_64-linux/ghc-9.2.2/cborg-0.2.7.0/build/Codec/CBOR/Write.o, /data/artem/hask/cborg-0.2.7.0/dist-newstyle/build/x86_64-linux/ghc-9.2.2/cborg-0.2.7.0/build/Codec/CBOR/Write.dyn_o )
[14 of 14] Compiling Codec.CBOR.Pretty ( src/Codec/CBOR/Pretty.hs, /data/artem/hask/cborg-0.2.7.0/dist-newstyle/build/x86_64-linux/ghc-9.2.2/cborg-0.2.7.0/build/Codec/CBOR/Pretty.o, /data/artem/hask/cborg-0.2.7.0/dist-newstyle/build/x86_64-linux/ghc-9.2.2/cborg-0.2.7.0/build/Codec/CBOR/Pretty.dyn_o )
[ 1 of 14] Compiling Codec.CBOR.ByteArray.Internal ( src/Codec/CBOR/ByteArray/Internal.hs, /data/artem/hask/cborg-0.2.7.0/dist-newstyle/build/x86_64-linux/ghc-9.2.2/cborg-0.2.7.0/build/Codec/CBOR/ByteArray/Internal.p_o )
[ 2 of 14] Compiling Codec.CBOR.ByteArray.Sliced ( src/Codec/CBOR/ByteArray/Sliced.hs, /data/artem/hask/cborg-0.2.7.0/dist-newstyle/build/x86_64-linux/ghc-9.2.2/cborg-0.2.7.0/build/Codec/CBOR/ByteArray/Sliced.p_o )

src/Codec/CBOR/ByteArray/Sliced.hs:44:1: warning: [-Wunused-imports]
    The qualified import of ‘Data.ByteString.Short.Internal’ is redundant
      except perhaps to import instances from ‘Data.ByteString.Short.Internal’
    To import instances alone, use: import Data.ByteString.Short.Internal()
   |
44 | import qualified Data.ByteString.Short.Internal as BSS
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ 3 of 14] Compiling Codec.CBOR.ByteArray ( src/Codec/CBOR/ByteArray.hs, /data/artem/hask/cborg-0.2.7.0/dist-newstyle/build/x86_64-linux/ghc-9.2.2/cborg-0.2.7.0/build/Codec/CBOR/ByteArray.p_o )

src/Codec/CBOR/ByteArray.hs:39:1: warning: [-Wunused-imports]
    The qualified import of ‘Data.ByteString.Short.Internal’ is redundant
      except perhaps to import instances from ‘Data.ByteString.Short.Internal’
    To import instances alone, use: import Data.ByteString.Short.Internal()
   |
39 | import qualified Data.ByteString.Short.Internal as BSS
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ 4 of 14] Compiling Codec.CBOR.Decoding ( src/Codec/CBOR/Decoding.hs, /data/artem/hask/cborg-0.2.7.0/dist-newstyle/build/x86_64-linux/ghc-9.2.2/cborg-0.2.7.0/build/Codec/CBOR/Decoding.p_o )
[ 5 of 14] Compiling Codec.CBOR.Encoding[boot] ( src/Codec/CBOR/Encoding.hs-boot, /data/artem/hask/cborg-0.2.7.0/dist-newstyle/build/x86_64-linux/ghc-9.2.2/cborg-0.2.7.0/build/Codec/CBOR/Encoding.p_o-boot )
[ 6 of 14] Compiling Codec.CBOR.FlatTerm[boot] ( src/Codec/CBOR/FlatTerm.hs-boot, /data/artem/hask/cborg-0.2.7.0/dist-newstyle/build/x86_64-linux/ghc-9.2.2/cborg-0.2.7.0/build/Codec/CBOR/FlatTerm.p_o-boot )
[ 7 of 14] Compiling Codec.CBOR.Encoding ( src/Codec/CBOR/Encoding.hs, /data/artem/hask/cborg-0.2.7.0/dist-newstyle/build/x86_64-linux/ghc-9.2.2/cborg-0.2.7.0/build/Codec/CBOR/Encoding.p_o )
[ 8 of 14] Compiling Codec.CBOR.Magic ( src/Codec/CBOR/Magic.hs, /data/artem/hask/cborg-0.2.7.0/dist-newstyle/build/x86_64-linux/ghc-9.2.2/cborg-0.2.7.0/build/Codec/CBOR/Magic.p_o )
[ 9 of 14] Compiling Codec.CBOR.Read  ( src/Codec/CBOR/Read.hs, /data/artem/hask/cborg-0.2.7.0/dist-newstyle/build/x86_64-linux/ghc-9.2.2/cborg-0.2.7.0/build/Codec/CBOR/Read.p_o )
ghc: panic! (the 'impossible' happened)
  (GHC version 9.2.2:
	Unknown call method

Please report this as a GHC bug:  https://www.haskell.org/ghc/reportabug

I also tried to run it with --ghc-options=v3, and the tail of it looks like that:

!!! CorePrep [Codec.CBOR.Read]: finished in 255.35 milliseconds, allocated 134.808 megabytes
*** Stg2Stg:
*** CodeGen [Codec.CBOR.Read]:
*** Deleting temp files:
Deleting: /tmp/ghc969059_0/ghc_71.s /tmp/ghc969059_0/ghc_72.s /tmp/ghc969059_0/ghc_73.c /tmp/ghc969059_0/ghc_1.hscpp /tmp/ghc969059_0/ghc_11.hscpp /tmp/ghc969059_0/ghc_13.hscpp /tmp/ghc969059_0/ghc_15.hscpp /tmp/ghc969059_0/ghc_17.hscpp /tmp/ghc969059_0/ghc_19.hscpp /tmp/ghc969059_0/ghc_21.hscpp /tmp/ghc969059_0/ghc_26.s /tmp/ghc969059_0/ghc_28.p_o /tmp/ghc969059_0/ghc_3.hscpp /tmp/ghc969059_0/ghc_34.s /tmp/ghc969059_0/ghc_36.p_o /tmp/ghc969059_0/ghc_42.s /tmp/ghc969059_0/ghc_44.p_o /tmp/ghc969059_0/ghc_5.hscpp /tmp/ghc969059_0/ghc_50.s /tmp/ghc969059_0/ghc_52.p_o /tmp/ghc969059_0/ghc_58.s /tmp/ghc969059_0/ghc_60.p_o /tmp/ghc969059_0/ghc_66.s /tmp/ghc969059_0/ghc_68.p_o /tmp/ghc969059_0/ghc_7.hscpp /tmp/ghc969059_0/ghc_9.hscpp
Warning: deleting non-existent /tmp/ghc969059_0/ghc_71.s
*** Deleting temp dirs:
Deleting: /tmp/ghc969059_0
ghc: panic! (the 'impossible' happened)
  (GHC version 9.0.2:
	Unknown call method

Expected behavior

Build finishes or fails without a panic.

Environment

  • GHC version used: 9.2.2, same with 9.0.2

Optional:

  • Operating System: Ubuntu 20.04, NixOS Unstable
  • System Architecture: x86_64
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking