Opened 4 months ago

Closed 2 months ago

#15246 closed bug (fixed)

-fghci-leak-cheak causes many testsuite failures with the quick build flavour

Reported by: RyanGlScott Owned by:
Priority: normal Milestone: 8.8.1
Component: GHCi Version: 8.5
Keywords: Cc: simonmar
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: #15372 Differential Rev(s):
Wiki Page:

Description

As originally reported on the ghc-devs mailing list, the -fghci-leak-check flag is causing several tests to fail when GHC is built with the quick build flavour. On my machine, here are all the tests that fail:

Unexpected failures:
   ghci/prog001/prog001.run            prog001 [bad stdout] (ghci)
   ghci/prog002/prog002.run            prog002 [bad stdout] (ghci)
   ghci/prog003/prog003.run            prog003 [bad stdout] (ghci)
   ghci/prog010/ghci.prog010.run       ghci.prog010 [bad stdout] (ghci)
   ghci/prog013/prog013.run            prog013 [bad stdout] (ghci)
   ghci/prog012/prog012.run            prog012 [bad stdout] (ghci)
   ghci/prog009/ghci.prog009.run       ghci.prog009 [bad stdout] (ghci)
   ghci/scripts/ghci025.run            ghci025 [bad stdout] (ghci)
   ghci/scripts/ghci038.run            ghci038 [bad stdout] (ghci)
   ghci/scripts/ghci057.run            ghci057 [bad stdout] (ghci)
   ghci/scripts/T2182ghci.run          T2182ghci [bad stdout] (ghci)
   ghci/scripts/ghci058.run            ghci058 [bad stdout] (ghci)
   ghci/scripts/T6106.run              T6106 [bad stdout] (ghci)
   ghci/scripts/T8353.run              T8353 [bad stdout] (ghci)
   ghci/scripts/T9293.run              T9293 [bad stdout] (ghci)
   ghci/scripts/T10989.run             T10989 [bad stdout] (ghci)
   ghci/should_run/T13825-ghci.run     T13825-ghci [bad stdout] (ghci)
   ghci.debugger/scripts/print007.run  print007 [bad stdout] (ghci)
   ghci.debugger/scripts/break009.run  break009 [bad stdout] (ghci)
   ghci.debugger/scripts/break008.run  break008 [bad stdout] (ghci)
   ghci.debugger/scripts/break026.run  break026 [bad stdout] (ghci)
   perf/space_leaks/T4029.run          T4029 [bad stdout] (ghci)

Here is the full test output. Generally, the test output discrepancies are all of the form of extra lines of:

+-fghci-leak-check: HomeModInfo for D is still alive!
+-fghci-leak-check: ModIface is still alive!
+-fghci-leak-check: ModDetails is still alive!
+-fghci-leak-check: Linkable is still alive!

Change History (7)

comment:1 Changed 3 months ago by bgamari

Milestone: 8.6.18.8.1

These won't be addressed in GHC 8.6.

comment:2 Changed 2 months ago by RyanGlScott

comment:3 Changed 2 months ago by RyanGlScott

So #15372 was fixed by simply not turning on -fghci-leak-check when DEBUG is enabled. Simon, could we do the same for the quick build flavor? This is preventing me from running tests in quick mode.

comment:4 Changed 2 months ago by simonmar

There isn't a good way to do that, or at least I couldn't find one. We don't currently have the information about whether the compiler was built without optimisation in the test driver.

comment:5 Changed 2 months ago by Simon Marlow <marlowsd@…>

In 71f6b18/ghc:

Fix space leaks

Summary:
All these were detected by -fghci-leak-check when GHC was
compiled *without* optimisation (e.g. using the "quick" build flavour).

Unfortunately I don't know of a good way to keep this working.  I'd like
to just disable the -fghci-leak-check flag when the compiler is built
without optimisation, but it doesn't look like we have an easy way to do
that. And even if we could, it would be fragile anyway,

Test Plan: `cd testsuite/tests/ghci; make`

Reviewers: bgamari, hvr, erikd, tdammers

Subscribers: tdammers, rwbarton, thomie, carter

GHC Trac Issues: #15246

Differential Revision: https://phabricator.haskell.org/D4872

comment:6 Changed 2 months ago by simonmar

I pushed my fix, hopefully that will help.

comment:7 Changed 2 months ago by RyanGlScott

Resolution: fixed
Status: newclosed

Awesome, the tests now pass for me with quick (excluding perf tests, of course). Thanks, Simon!

It sounds like this is all we can do here, so closing.

Note: See TracTickets for help on using tickets.