Opened 5 years ago

Closed 5 years ago

Last modified 11 months ago

#10090 closed bug (worksforme)

Building ghc with "make -jN" gives different base ABI hashes for N<=8 and N>8

Reported by: juhpetersen Owned by:
Priority: normal Milestone:
Component: Build System (make) Version: 7.8.4
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: #4012 Differential Rev(s):
Wiki Page:

Description (last modified by juhpetersen)

While building ghc-7.8.4 for Fedora 22 (devel) I found that doing highly parallel make builds of ghc affects the ABI hash of base, etc.

The threshold seems to be between -j8 and -j12, which likely changes the build order of some modules causing changes to ABI hashes.

While it is not hard to workaround, it is not really nice so it would be good to track this down IMHO. I haven't seen this kind of issue since 7.4.2 anyway so it may be an indirect buildsystem "regression" with ghc-7.8?

Change History (8)

comment:1 Changed 5 years ago by juhpetersen

Description: modified (diff)

comment:2 Changed 5 years ago by int-e

I could reproduce this with ghc-7.8.4 (for example, I obtained 3 different ABI hashes for the haskell98 package from building ghc 6 times, with -j1, -j4, -j8, -j12, -j16 and -j24).

On the other hand, ghc-7.10 RC2 produced identical ABI hashes in the same scenario. So this appears to have been fixed, at least for the libraries in ghc.

PS. These builds were done on an x86_64 linux server with CentOS 6.4, using ghc-7.6.2 for bootstrapping, and gcc-4.4.7. I used the 'perf' settings, so no llvm was involved. So take the results with a grain of salt.

Last edited 5 years ago by int-e (previous) (diff)

comment:3 Changed 5 years ago by int-e

comment:4 Changed 5 years ago by juhpetersen

Summary: Building ghc with "make -j12" gives different ABI hashes for base to "make -j8"Building ghc with "make -jN" gives different base ABI hashes for N<=8 and N>8

comment:5 Changed 5 years ago by juhpetersen

Thanks int-e for looking into this - much appreciated. :)

It is encouraging indeed that this should be fixed with ghc-7.10, hopefully it won't appear again in the future. :)

comment:6 in reply to:  2 Changed 5 years ago by thomie

Resolution: worksforme
Status: newclosed

Replying to int-e:

... ghc-7.10 RC2 produced identical ABI hashes in the same scenario. So this appears to have been fixed, at least for the libraries in ghc.

@juhpetersen: please reopen if you still have problems with 7.10.

comment:7 Changed 4 years ago by juhpetersen

Okay thanks.

Just for the record s390 seems to be ABI unstable on -j4.

comment:8 Changed 11 months ago by bgamari

Component: Build SystemBuild System (make)

The new Hadrian build system has been merged. Relabeling the tickets concerning the legacy make build system to prevent confusion.

Note: See TracTickets for help on using tickets.