[GHC] #10661: Regression: hp2ps reports `integer unexpected` on new style package keys

#10661: Regression: hp2ps reports `integer unexpected` on new style package keys -------------------------------------+------------------------------------- Reporter: thomie | Owner: Type: bug | Status: new Priority: high | Milestone: 7.12.1 Component: Profiling | Version: 7.11 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: concurrent/prog002/concprog002 | Blocking: | Related Tickets: Differential Revisions: | -------------------------------------+------------------------------------- hp2ps reports `integer unexpected` when run on a profile file created with HEAD. The profile file contains entries such as the following: {{{ $ grep System.Random Test.hp 9Kgekc9yEaLHLNUuw6paWL:System.Random.StdGen 24 9Kgekc9yEaLHLNUuw6paWL:System.Random.StdGen 24 9Kgekc9yEaLHLNUuw6paWL:System.Random.StdGen 24 9Kgekc9yEaLHLNUuw6paWL:System.Random.StdGen 24 }}} To reproduce, first install random (there might be a simpler way, but this one is required to run `make TEST=concprog002 WAY=threaded2_hT`, which is failing at the moment): {{{ $ cabal install random==1.1 --with-ghc=ghc-7.11.20150711 -v0 }}} Note the package key for random starts with a number: {{{ $ ghc-pkg --package-db=.ghc/x86_64-linux-7.11.20150711/package.conf.d/ describe random | grep key key: 9Kgekc9yEaLHLNUuw6paWL }}} Then create a heap profile for the following program with `-hT`, and try to run `hp2ps` on it: {{{ $ cat Test.hs import System.Random main = sequence $ replicate 1000 (randomIO :: IO Int) $ ghc-7.11.20150711 Test.hs -rtsopts -fforce-recomp -v0 $ ./Test +RTS -hT -i0.001 $ hp2ps Test.hp hp2ps: Test.hp, line 12: integer unexpected }}} Note that in the profile file the entries for libraries like `base`, `ghc- prim` and `integer-gmp` don't contain package keys (maybe the entries for random shouldn't either?): {{{ base:Data.Dynamic.Dynamic 24 integer-gmp:GHC.Integer.Type.Jp# 16 ghc-prim:GHC.Types.: 24 }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10661 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10661: Regression: hp2ps reports `integer unexpected` on new style package keys -------------------------------------+------------------------------------- Reporter: thomie | Owner: Type: bug | Status: new Priority: high | Milestone: 7.12.1 Component: Profiling | Version: 7.11 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | concurrent/prog002/concprog002 Blocked By: | Blocking: Related Tickets: #10550 | Differential Revisions: -------------------------------------+------------------------------------- Changes (by thomie): * related: => #10550 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10661#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10661: Regression: hp2ps reports `integer unexpected` on new style package keys
-------------------------------------+-------------------------------------
Reporter: thomie | Owner:
Type: bug | Status: new
Priority: high | Milestone: 7.12.1
Component: Profiling | Version: 7.11
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
| concurrent/prog002/concprog002
Blocked By: | Blocking:
Related Tickets: #10550 | Differential Revisions:
-------------------------------------+-------------------------------------
Comment (by Thomas Miedema

#10661: Regression: hp2ps reports `integer unexpected` on new style package keys -------------------------------------+------------------------------------- Reporter: thomie | Owner: Type: bug | Status: patch Priority: high | Milestone: 7.12.1 Component: Profiling | Version: 7.11 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | concurrent/prog002/concprog002 Blocked By: | Blocking: Related Tickets: #10550 | Differential Revisions: Phab:D1175 -------------------------------------+------------------------------------- Changes (by Yuras): * status: new => patch * differential: => Phab:D1175 Comment: `PackageKey` is a package name for wired-in packages, and a hash for other packages. So lets fix `hp2ps`. Probably better solution should be rewriting it in haskell... -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10661#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10661: Regression: hp2ps reports `integer unexpected` on new style package keys -------------------------------------+------------------------------------- Reporter: thomie | Owner: Type: bug | Status: patch Priority: high | Milestone: 7.12.1 Component: Profiling | Version: 7.11 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | concurrent/prog002/concprog002 Blocked By: | Blocking: Related Tickets: #10550 | Differential Revisions: Phab:D1175 -------------------------------------+------------------------------------- Comment (by thomie): Is this fix still needed? I installed a package in the user package database with ghc-7.11.20150809, and its package key was `rando_7xz1XSr7300DdrwOq0nUDQ`. Note the `rando` prefix. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10661#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10661: Regression: hp2ps reports `integer unexpected` on new style package keys -------------------------------------+------------------------------------- Reporter: thomie | Owner: Type: bug | Status: patch Priority: high | Milestone: 7.12.1 Component: Profiling | Version: 7.11 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | concurrent/prog002/concprog002 Blocked By: | Blocking: Related Tickets: #10550 | Differential Revisions: Phab:D1175 -------------------------------------+------------------------------------- Comment (by Yuras): Replying to [comment:4 thomie]:
Is this fix still needed? I installed a package in the user package database with ghc-7.11.20150809, and its package key was `rando_7xz1XSr7300DdrwOq0nUDQ`. Note the `rando` prefix.
AFAIK, `Cabal` is responsible generating package keys, see https://github.com/haskell/cabal/pull/2671 Probably you are using old version of `Cabal`? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10661#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10661: Regression: hp2ps reports `integer unexpected` on new style package keys -------------------------------------+------------------------------------- Reporter: thomie | Owner: Type: bug | Status: patch Priority: high | Milestone: 7.12.1 Component: Profiling | Version: 7.11 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | concurrent/prog002/concprog002 Blocked By: | Blocking: Related Tickets: #10550 | Differential Revisions: Phab:D1175 -------------------------------------+------------------------------------- Comment (by thomie): Ok, that would explain it. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10661#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10661: Regression: hp2ps reports `integer unexpected` on new style package keys
-------------------------------------+-------------------------------------
Reporter: thomie | Owner:
Type: bug | Status: patch
Priority: high | Milestone: 7.12.1
Component: Profiling | Version: 7.11
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
| concurrent/prog002/concprog002
Blocked By: | Blocking:
Related Tickets: #10550 | Differential Revisions: Phab:D1175
-------------------------------------+-------------------------------------
Comment (by Ben Gamari

#10661: Regression: hp2ps reports `integer unexpected` on new style package keys -------------------------------------+------------------------------------- Reporter: thomie | Owner: Type: bug | Status: closed Priority: high | Milestone: 7.12.1 Component: Profiling | Version: 7.11 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | concurrent/prog002/concprog002 Blocked By: | Blocking: Related Tickets: #10550 | Differential Revisions: Phab:D1175 -------------------------------------+------------------------------------- Changes (by bgamari): * status: patch => closed * resolution: => fixed Comment: Merged. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10661#comment:8 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC