[GHC] #13668: Space leak re-introduced

GHC ghc-devs at haskell.org
Tue May 9 07:34:47 UTC 2017


#13668: Space leak re-introduced
-------------------------------------+-------------------------------------
           Reporter:  simonpj        |             Owner:  (none)
               Type:  bug            |            Status:  new
           Priority:  normal         |         Milestone:
          Component:  Compiler       |           Version:  8.0.1
           Keywords:                 |  Operating System:  Unknown/Multiple
       Architecture:                 |   Type of failure:  None/Unknown
  Unknown/Multiple                   |
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 Test `perf/compiler/T9675` is failing for me on a clean HEAD
 {{{
 =====> T9675(optasm) 1 of 1 [0, 0, 0]
 cd "./T9675.run" &&  "/5playpen/simonpj/HEAD-5/inplace/test   spaces/ghc-
 stage2" -c T9675.hs -no-user-package-db -rtsopts -fno-warn-missed-
 specialisations -fshow-warning-groups -fdiagnostics-color=never -fno-
 diagnostics-show-caret -dno-debug-output +RTS -G1 -RTS -O -fasm  +RTS -V0
 -tT9675.comp.stats --machine-readable
 -RTS"/5playpen/simonpj/HEAD-5/inplace/test   spaces/ghc-stage2" -c
 T9675.hs -no-user-package-db -rtsopts -fno-warn-missed-specialisations
 -fshow-warning-groups -fdiagnostics-color=never -fno-diagnostics-show-
 caret -dno-debug-output +RTS -G1 -RTS -O -fasm  +RTS -V0
 -tT9675.comp.stats --machine-readable -RTS
 max_bytes_used value is too high:
     Expected    T9675(optasm) max_bytes_used: 17675240 +/-15%
     Lower bound T9675(optasm) max_bytes_used: 15023954
     Upper bound T9675(optasm) max_bytes_used: 20326526
     Actual      T9675(optasm) max_bytes_used: 25571248
     Deviation   T9675(optasm) max_bytes_used:     44.7 %
 peak_megabytes_allocated value is too high:
     Expected    T9675(optasm) peak_megabytes_allocated: 63 +/-15%
     Lower bound T9675(optasm) peak_megabytes_allocated: 53
     Upper bound T9675(optasm) peak_megabytes_allocated: 73
     Actual      T9675(optasm) peak_megabytes_allocated: 93
     Deviation   T9675(optasm) peak_megabytes_allocated: 47.6 %
 *** unexpected stat test failure for T9675(optasm)
 }}}
 Compiling with `-RTS -S` gives
 {{{
     Alloc    Copied     Live     GC     GC      TOT      TOT  Page Flts
     bytes     bytes     bytes   user   elap     user     elap
   1139048     56288    158880  0.028  0.028    0.032    0.032    0    0
 (Gen:  0)
   1036832     99080    193448  0.018  0.018    0.052    0.052    0    0
 (Gen:  0)
   1036784    137552    223696  0.018  0.018    0.073    0.073    0    0
 (Gen:  0)
   1015208    145088    231232  0.018  0.018    0.094    0.094    0    0
 (Gen:  0)
   1084448    505864    636944  0.019  0.019    0.116    0.116    0    0
 (Gen:  0)
   1039312    660432    783288  0.020  0.020    0.137    0.137    0    0
 (Gen:  0)
   1377128    845976   1001624  0.020  0.020    0.159    0.159    0    0
 (Gen:  0)
   1707720   1168392   1352664  0.024  0.024    0.186    0.186    0    0
 (Gen:  0)
   2411008   1554360   1764288  0.023  0.023    0.214    0.214    0    0
 (Gen:  0)
   3128632   1885104   2164224  0.021  0.021    0.239    0.240    0    0
 (Gen:  0)
   3891928   3029560   3501264  0.025  0.025    0.271    0.272    0    0
 (Gen:  0)
   6618768   4554248   5412752  0.031  0.031    0.312    0.313    0    0
 (Gen:  0)
   8966136   5509176   6359368  0.033  0.033    0.358    0.359    0    0
 (Gen:  0)
  10948736   6299736   7158072  0.034  0.034    0.409    0.410    0    0
 (Gen:  0)
  12489360   8415312   9277728  0.043  0.044    0.466    0.468    0    0
 (Gen:  0)
  16486944   7800096   8662512  0.043  0.043    0.528    0.529    0    0
 (Gen:  0)
  15450408   9812088  10674504  0.044  0.044    0.590    0.591    0    0
 (Gen:  0)
  19459168  11429320  12291736  0.054  0.054    0.671    0.673    0    0
 (Gen:  0)
  22684384   8611624   9474040  0.046  0.046    0.745    0.747    0    0
 (Gen:  0)
  17026576  10661064  11523480  0.045  0.045    0.810    0.812    0    0
 (Gen:  0)
  21146552   9790592  10653008  0.044  0.044    0.882    0.884    0    0
 (Gen:  0)
  19421144   9891256  10753672  0.045  0.045    0.955    0.957    0    0
 (Gen:  0)
  19622512   8678360   9540776  0.042  0.042    1.026    1.028    0    0
 (Gen:  0)
  17212344   9845688  10708104  0.042  0.042    1.088    1.091    0    0
 (Gen:  0)
  19568256   9928304  10790720  0.045  0.045    1.159    1.162    0    0
 (Gen:  0)
  19673096   8159672   9022088  0.040  0.040    1.223    1.226    0    0
 (Gen:  0)
  16172824   9362616  10225032  0.039  0.039    1.277    1.280    0    0
 (Gen:  0)
  18536544  10809776  11672192  0.051  0.051    1.347    1.350    0    0
 (Gen:  0)
  21412128  15177144  16039560  0.065  0.065    1.434    1.437    0    0
 (Gen:  0)
  30181520  16438872  17301288  0.071  0.071    1.541    1.544    0    0
 (Gen:  0)
  32568088  11742016  12604432  0.053  0.053    1.633    1.636    0    0
 (Gen:  0)
  23285000  13139928  14002344  0.054  0.054    1.714    1.718    0    0
 (Gen:  0)
  26054072  15188040  16050456  0.060  0.060    1.803    1.807    0    0
 (Gen:  0)
  30184528  10990656  11853072  0.050  0.050    1.890    1.894    0    0
 (Gen:  0)
  21814064  12636584  13499000  0.050  0.050    1.961    1.965    0    0
 (Gen:  0)
  25295544  13754616  14812696  0.059  0.059    2.048    2.052    0    0
 (Gen:  0)
  27448728  16160496  17210352  0.066  0.066    2.147    2.151    0    0
 (Gen:  0)
  30295624  22372880  24471344  0.090  0.090    2.279    2.283    0    0
 (Gen:  0)
  44477824  24497712  25572240  0.092  0.092    2.431    2.436    0    0
 (Gen:  0)
  48692880   2937512   3436608  0.017  0.017    2.548    2.571    0    0
 (Gen:  0)
      1840                      0.000  0.000

      662,063,640 bytes allocated in the heap
      334,683,080 bytes copied during GC
       25,572,240 bytes maximum residency (40 sample(s))
        1,194,192 bytes maximum slop
               93 MB total memory in use (0 MB lost due to fragmentation)

                                      Tot time (elapsed)  Avg pause  Max
 pause
   Gen  0        40 colls,     0 par    1.684s   1.685s     0.0421s
 0.0924s

   TASKS: 4 (1 bound, 3 peak workers (3 total), using -N1)

   SPARKS: 0 (0 converted, 0 overflowed, 0 dud, 0 GC'd, 0 fizzled)

   INIT    time    0.001s  (  0.001s elapsed)
   MUT     time    0.862s  (  0.885s elapsed)
   GC      time    1.684s  (  1.685s elapsed)
   EXIT    time    0.001s  (  0.009s elapsed)
   Total   time    2.549s  (  2.581s elapsed)

   Alloc rate    767,692,191 bytes per MUT second

   Productivity  33.9% of total user, 34.6% of total elapsed
 }}}
 It looks as if a space leak has come back; space usage on this benchmark
 dropped by half when Reid fixed the `CoreTidy` leak.

 I don't know which commit re-introduced it.

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


More information about the ghc-tickets mailing list