Opened 2 years ago

Last modified 3 months ago

#9406 new bug

unexpected failure for T7837(profasm)

Reported by: jrp Owned by:
Priority: normal Milestone:
Component: Profiling Version: 7.8.3
Keywords: T7837 Cc:
Operating System: Unknown/Multiple Architecture: x86_64 (amd64)
Type of failure: Incorrect result at runtime Test Case: T7837
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:

Description (last modified by jrp)

This may be a test suite configuration error as the normal case works (and indeed I get a lot of profiled case failures of other cases). When run with an llvm-perf build of the HEAD, I get:

=====> T7837(normal) 1395 of 4068 [0, 0, 0] 
cd ./indexed-types/should_compile && '/Users/jrp/Projects/haskell/ghc/inplace/bin/ghc-stage2' -fforce-recomp -dcore-lint -dcmm-lint -dno-debug-output -no-user-package-db -rtsopts -fno-ghci-history -c T7837.hs  -O -ddump-rule-firings  >T7837.comp.stderr 2>&1
=====> T7837(profasm) 1395 of 4068 [0, 0, 0] 
cd ./indexed-types/should_compile && '/Users/jrp/Projects/haskell/ghc/inplace/bin/ghc-stage2' -fforce-recomp -dcore-lint -dcmm-lint -dno-debug-output -no-user-package-db -rtsopts -fno-ghci-history -c T7837.hs -O -prof -static -auto-all -O -ddump-rule-firings  >T7837.comp.stderr 2>&1
Actual stderr output differs from expected:
--- ./indexed-types/should_compile/T7837.stderr	2014-08-03 11:36:53.000000000 +0100
+++ ./indexed-types/should_compile/T7837.comp.stderr	2014-08-04 23:16:34.000000000 +0100
@@ -1,3 +1,4 @@
 Rule fired: Class op abs
 Rule fired: Class op signum
 Rule fired: normalize/Double
+Rule fired: Class op /
*** unexpected failure for T7837(profasm)

Unexpected results from:
TEST="T7837"

OVERALL SUMMARY for test run started at Mon Aug  4 23:16:32 2014 BST
 0:00:02 spent to go through
    4068 total tests, which gave rise to
   19536 test cases, of which
   19534 were skipped

       0 had missing libraries
       1 expected passes
       0 expected failures

       0 caused framework failures
       0 unexpected passes
       1 unexpected failures

Unexpected failures:
   indexed-types/should_compile  T7837 [stderr mismatch] (profasm)

Change History (7)

comment:1 Changed 2 years ago by jrp

  • Description modified (diff)

comment:2 Changed 23 months ago by thomie

  • Operating System changed from MacOS X to Unknown/Multiple

Also fails on linux. To run the test manually: LANG=C make fulltest stage=2 TEST=T7837 WAY=prof.

comment:3 Changed 14 months ago by thomie

  • Resolution set to worksforme
  • Status changed from new to closed

This seems now fixed, make TEST=T7837 WAY=prof TEST_HC=ghc-7.10.2 succeeds.

For some reason ghc-7.8 and earlier were firing extra rules when compiled with -prof -auto-all.

module T9406 where

class (Fractional a) => Norm a where
  norm :: a -> a

normalize :: (Norm a) => a -> a
normalize x = x / norm x
$ ghc-7.8.4 -c T9406.hs -fforce-recomp -O -ddump-rule-firings -auto-all -prof
Rule fired: Class op $p1Norm
Rule fired: Class op norm
Rule fired: Class op /
$ ghc-7.8.4 -c T9406.hs -fforce-recomp -O -ddump-rule-firings
$ ghc-7.10.2 -c T9406.hs -fforce-recomp -O -ddump-rule-firings -auto-all -prof
$ ghc-7.10.2 -c T9406.hs -fforce-recomp -O -ddump-rule-firings

I'm not adding this as a test, since we have T7837 already.

comment:4 Changed 7 months ago by thomie

  • Component changed from Test Suite to Profiling
  • Priority changed from low to normal
  • Resolution worksforme deleted
  • Status changed from closed to new

I can absolutely reproduce this with ghc-7.10.3 and HEAD.

$ make TEST=T7837 WAY=prof TEST_HC=/opt/ghc/7.10.3/bin/ghc CLEANUP=1
...
-Rule fired: Class op signum
 Rule fired: Class op abs
+Rule fired: Class op signum
 Rule fired: normalize/Double
-Rule fired: Class op HEq_sc
-Rule fired: Class op HEq_sc
-Rule fired: Class op HEq_sc

With HEAD (2aee41960aa00fe09a2cd1983e02c15e06013037):

 Rule fired: normalize/Double
 Rule fired: Class op HEq_sc
 Rule fired: Class op HEq_sc
-Rule fired: Class op HEq_sc

comment:5 Changed 7 months ago by Thomas Miedema <thomasmiedema@…>

In 90fa8cf2/ghc:

Mark tests for #11643, #11644, #11645 and #9406 expect_broken

For opt_ways or prof_ways only.

indexed-types/should_compile/all.T called setTestOpts to not run
the tests with opt_ways. Since I'm finding regressions for opt_ways, I
removed it. This only makes a difference when running
`./validate --slow` or `make slowtest`.

Update submodule hpc.

comment:6 Changed 7 months ago by Ben Gamari <ben@…>

In 13a801af/ghc:

Revert "Mark tests for #11643, #11644, #11645 and #9406 expect_broken"

This reverts commit 90fa8cf2bf1677545c3f4a8bc967b1674822e90a.

As noted in #11643, these should be fixed.

Updates hpc submodule.

comment:7 Changed 3 months ago by Thomas Miedema <thomasmiedema@…>

In 3fb9837/ghc:

Testsuite: mark tests expect_broken

* T7837 is still broken for prof_ways (#9406)
* T11627b is broken on Windows for WAY=prof_hc_hb (#12236)
* T8089 is also broken for WAY=profasm on Windows
Note: See TracTickets for help on using tickets.