Opened 9 years ago

Closed 8 years ago

#4237 closed bug (fixed)

-dcore-lint error after simplifier iteration 1 when profiling

Reported by: wkahl Owned by:
Priority: high Milestone: 6.12 branch
Component: Compiler Version: 6.12.3
Keywords: profiling, simplifier, core-lint Cc:
Operating System: Linux Architecture: x86_64 (amd64)
Type of failure: Compile-time crash Test Case:
Blocked By: #4172 Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:

Description

This happens with the current development version of Agda, with last change from July 20.

darcs get --lazy http://code.haskell.org/Agda

I did:

./Setup configure -p --prefix=/usr/local/packages/ghc-6.12.3 --ghc-option=-dcore-lint
./Setup build -v > build.log 2>&1

build.log is attached, and shows a core-lint error in the profiling way.

I tried this since I am getting segfaults and other errors in long Agda runs with more than 4GB heap, and have no idea yet how to trim them down.

Wolfram

Attachments (1)

build.log.bz2 (57.8 KB) - added by wkahl 9 years ago.
bild.log (bzip2'ed because of size limit) showing core-ling error in profiling way

Download all attachments as: .zip

Change History (10)

Changed 9 years ago by wkahl

Attachment: build.log.bz2 added

bild.log (bzip2'ed because of size limit) showing core-ling error in profiling way

comment:1 Changed 9 years ago by igloo

Blocked By: 4172, 4186 added
Milestone: 6.14.1
Priority: normalhigh

Thanks for the report. Let's see if fixing either #4186 or #4172 fixes this before looking into it.

comment:2 Changed 9 years ago by simonpj

Status: newinfoneeded

I believe that this patch will cure the problem.

Fri Aug 13 17:31:20 BST 2010  simonpj@microsoft.com
  * Modify FloatOut to fix Trac #4237
  
  The problem was that a strict binding was getting floated
  out into a letrec. This only happened when profiling was
  on.  It exposed a fragility in the floating strategy.  This
  patch makes it more robust.  See
        Note [Avoiding unnecessary floating]

Or, just using the HEAD (after today) should do it.

Can you try it out? It'll be in 6.14.

Simon

comment:3 Changed 9 years ago by wkahl

What does this patch refer to exactly? Is there an easy way to apply it to a 6.12.3 source distribution?

Installing HEAD currently fails with

echo 'pgmgcc="/usr/bin/gcc"'                      >> "/usr/local/packages/ghc-6.13/bin/haddock-6.13.20100813"
cat utils/haddock/haddock.wrapper                         >> "/usr/local/packages/ghc-6.13/bin/haddock-6.13.20100813"
chmod +x                                         "/usr/local/packages/ghc-6.13/bin/haddock-6.13.20100813"
/usr/bin/install -c -m 755 -d "/usr/local/packages/ghc-6.13/share/doc/ghc/html"
"cp" -R utils/haddock/html "/usr/local/packages/ghc-6.13/share/doc/ghc/html"
/usr/bin/install -c -m 755 -d "/usr/local/packages/ghc-6.13/lib/ghc-6.13.20100813/html"
for i in utils/haddock/html/*; do \
	    /usr/bin/install -c -m 644  $i "/usr/local/packages/ghc-6.13/lib/ghc-6.13.20100813/html"; \
	done
/usr/bin/install: omitting directory `utils/haddock/html/Classic.theme'
/usr/bin/install: omitting directory `utils/haddock/html/Ocean.std-theme'
/usr/bin/install: omitting directory `utils/haddock/html/Snappy.theme'
make[1]: *** [install_utils/haddock_data] Error 1
make: *** [install] Error 2

...

Wolfram

comment:4 Changed 9 years ago by wkahl

I found out that what keeps me from trying out HEAD is #4250.

comment:5 Changed 9 years ago by simonpj

"This patch" refers to the patch shown above, namely

Fri Aug 13 17:31:20 BST 2010  simonpj@microsoft.com
  * Modify FloatOut to fix Trac #4237

Get HEAD, pull at least this patch, and try. I hope Ian may look into #4250 for you.

Simon

comment:6 Changed 9 years ago by wkahl

Since I do not know enough darcs to be able to easily turn that information into a patch that could be applied to a GHC-6.12.3 source distribution, I tried HEAD, blindly bumped quite a few upper bounds in Cabal dependency declarations in Agda and in intermediate packages, and used more recent versions of some of the intermediate packages. (In mtl, I also had to comment some MonadError-related instances.) For Agda, I still have exactly the same source as with the original report --- it now compiles without core-lint error.

Wolfram

comment:7 Changed 9 years ago by igloo

Blocked By: 4186 removed

comment:8 Changed 9 years ago by simonpj

Milestone: 6.14.16.12 branch
Status: infoneedednew

Great, thanks. We are not currently planning to release another compiler on the 6.12 branch, and it sounds as if the bug is fixed on the HEAD.

I'll re-milestone it as "6.12 branch" just in case we change our minds about 6.12, and want to apply the patch to 6.12 after all

Simon

comment:9 Changed 8 years ago by batterseapower

Resolution: fixed
Status: newclosed

I think this bug can be closed now since 6.12 is well and truly dormant.

Note: See TracTickets for help on using tickets.