New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
haskell: re-enable aarch64, disable parallel builds on that arch. #44482
Conversation
Attempt to work around unreliable Haskell builds on aarch64. See https://ghc.haskell.org/trac/ghc/ticket/15449
The drawback may be fatal on Hydra, as the machine there is weak in single-core performance (but it has 96 cores). I suppose we can just try that and increase the timeout if needed, like we did for chromium #44225. I just now started the final ghc build on |
@@ -87,7 +87,8 @@ stdenv.mkDerivation rec { | |||
sha256 = "1z05vkpaj54xdypmaml50hgsdpw29dhbs2r7magx0cm199iw73mv"; | |||
}; | |||
|
|||
enableParallelBuilding = true; | |||
# https://ghc.haskell.org/trac/ghc/ticket/15449 | |||
enableParallelBuilding = !buildPlatform.isAarch64; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be targetPlatform if it is happening during codegen.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for reviewing. Can we get a confirmation on this from @Ericson2314?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
buildPlatform
sounds correct since according the ticket the problem happens when running multithreaded Haskell code on aarch64.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah ok- I read the codegen part and thought it was talking about the target.
enableParallelBuilding = (versionOlder "7.8" ghc.version && !hasActiveLibrary) || versionOlder "8.0.1" ghc.version; | ||
# | ||
# Currently disabled for aarch64. See https://ghc.haskell.org/trac/ghc/ticket/15449. | ||
enableParallelBuilding = ((versionOlder "7.8" ghc.version && !hasActiveLibrary) || versionOlder "8.0.1" ghc.version) && !(buildPlatform.isAarch64); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be hostPlatform.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto here, please review @Ericson2314
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: unnecessary parenthesis around buildPlatform.isAarch64
.
Those both are correct. The issue would probably both to running the stage 1 compiler building stage 2, and running the the stage 0 bootstrap compiler, so it doesn't matter what the host platform is. |
Hi @Ericson2314, thank you for reviewing this! To clarify, do you mean that the original patch is correct, or that both of @matthewbauer's corrections are correct? |
|
@Ericson2314 Thanks! So assuming I make @dezgeg's small correction to the original patch, is there interest in merging this, despite the potential Hydra impact? |
We might want to set hydraPlatforms so that it doesn't build everything on aarch64. The aarch64 tend to be the slowest of the 3 systems which holds up the queue. |
I agree that it shouldn't be in the critical path for the other jobs, but wouldn't it be worth setting up a new Hydra job for |
I mean that will make the problem worse. We build everything so we have to wait for those 1 core jobs to finish for a release. But it may be worth doing anyway just because it is such a pain to build GHC. |
@matthewbauer Maybe I didn't explain myself clearly. What I am proposing is to create a new jobset, one that no other jobsets are dependent on, that builds edit Additionally, this new jobset could be made lower priority, run less often, etc. |
Ok sorry i misunderstood |
Can we make a separate issue for whether Hydra builds Haskell stuff for aarch64? Making it uncached but at least buildable sounds like a step in the right direction. |
Actually, wait, the trac issue claims it's an issue with GHC's |
Hydra keeps trying already: https://hydra.nixos.org/job/nixpkgs/trunk/haskell.compiler.ghc843.aarch64-linux |
@vcunat Huh. That build failure seems unrelated to the
|
Hi all, I'm sorry for the confusion. I first made this PR in early August. It languished and by the time I revisited the issue in my own fork, my changes had to be re-done because of changes in upstream. In the process, I forgot that I'd made this PR and made a new one here: That was merged 10 days ago and that is why Hydra is now trying to build GHC on I'm going to close this PR now as it's no longer relevant. Probably the discussion about what to do with Hydra and GHC on |
Attempt to work around unreliable Haskell builds on
aarch64
. Seehttps://ghc.haskell.org/trac/ghc/ticket/15449
Motivation for this change
ghc843
builds fine onaarch64-linux
if you disable parallel builds, and the resulting binary is also capable of building many Haskell packages without issues (again, if parallel builds are disabled).The only drawback to this fix is that
ghc
itself takes a very long time to build (~24h on my Jetson TX1).Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)