[GHC] #16182: Retainer Profiling is broken

GHC ghc-devs at haskell.org
Mon Jan 14 22:41:50 UTC 2019


#16182: Retainer Profiling is broken
-------------------------------------+-------------------------------------
        Reporter:  crockeea          |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.6.3
      Resolution:                    |             Keywords:  profiling
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  Runtime crash     |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------
Description changed by crockeea:

Old description:

> I had a large program which I was trying to profile, and I noticed that
> the program always ran into a segfault when running with `+RTS -hr`. I
> was able to able to reliably get segfaults in both the `warp-tls` and
> `http-client-tls` packages, as well as a third large and independent
> package with essentially no overlapping dependencies. This led me to
> believe that the bug is in the retainer profiler itself, and is not
> (much) dependent on the code being profiled. To that point, I was able to
> reproduce the bug with the `bytestring` test suites.
>
> I've modified bytestring (attached) enough to make it compile with GHC
> 8.6.3*. To reproduce the segfault, run
>
> {{{
> $ stack build --profile
> $ stack exec prop-compiled -- +RTS -hr
> }}}
>
> * Renamed the package to bytestring2 to avoid circular packages.
> * Removed a duplicate instance in tests/QuickCheckUtils.hs
> * Changed all test-suites to executables in the cabal file so that they
> could be compiled with profiling.
>
> I have confirmed the problem on Linux (Ubuntu 18.04), where prop-compiled
> quickly segfaults, and on Windows 10, where the program just hangs. [I
> observed the same behavior in all the other programs I tested: Linux
> sefaulted, and Windows just hung.]

New description:

 I had a large program which I was trying to profile, and I noticed that
 the program always ran into a segfault when running with `+RTS -hr`. I was
 able to able to reliably get segfaults in both the `warp-tls` and `http-
 client-tls` packages, as well as a third large and independent package
 with essentially no overlapping dependencies. This led me to believe that
 the bug is in the retainer profiler itself, and is not (much) dependent on
 the code being profiled. To that point, I was able to reproduce the bug
 with the `bytestring` test suites.

 I've modified bytestring (attached) enough to make it compile with GHC
 8.6.3. To reproduce the segfault, run

 {{{
 $ stack build --profile
 $ stack exec prop-compiled -- +RTS -hr
 }}}

 I have confirmed the problem on Linux (Ubuntu 18.04), where prop-compiled
 quickly segfaults, and on Windows 10, where the program just hangs. [I
 observed the same behavior in all the other programs I tested: Linux
 segfaulted, and Windows just hung.]

 Changes to bytestring:
 1. Renamed the package to bytestring2 to avoid circular packages.
 2. Removed a duplicate instance in tests/QuickCheckUtils.hs
 3. Changed all test-suites to executables in the cabal file so that they
 could be compiled with profiling.

--

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/16182#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list