Skip to content
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

nixos/release-combined: adds aarch64-linux as supported #52534

Merged
merged 3 commits into from Dec 21, 2018

Conversation

samueldr
Copy link
Member

@samueldr samueldr commented Dec 19, 2018

Motivation for this change

This was previously removed in 74c4e30 .

This will allow hydra to build iso and sd images for aarch64-linux, and share a common channel with the x86-based platforms.

Additionally build iso_minimal_new_kernel on aarch64-linus too.

With #51397 merged, the UEFI iso images build for aarch64-linux too.

Things done
  • ✔️ Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • ✔️ NixOS
    • ⬜ macOS
    • ⬜ other Linux distributions
  • ✔️ Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • ⬜ Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • ⬜ Tested execution of all binary files (usually in ./result/bin/)
  • ⬜ Determined the impact on package closure size (by running nix path-info -S before and after)
  • ✔️ Assured whether relevant documentation is up to date
  • ✔️ Fits CONTRIBUTING.md.

Tested this way:

~/tmp/nixpkgs/nixpkgs $ time nix-instantiate nixos/release-combined.nix --show-trace
warning: dumping very large path (> 256 MiB); this may run out of memory
trace: Default desktop manager (gnome-xorg) not found at evaluation time.
These are the known valid session names:
  services.xserver.desktopManager.default = "xterm";
  services.xserver.desktopManager.default = "none";
It's also possible the default can be found in one of these packages:
  gnome-session-3.30.1

warning: you did not specify '--add-root'; the result might be removed by the garbage collector
/nix/store/nyii59byg1fs2isl3vbhxdhf88vz96g9-nixos-19.03pre56789.gfedcba.drv

 → exit status: 0
 → user: 439.03, system: 17.78, elapsed: 6:19.25
 → cpu: 120%, max mem: 12231108, avg mem: 0, unshared: 0
 → I/O: <I:0 O:0>, sock: <r:0 s:0>

The trace seen here is also present on the branch this is based-off from. The time it took, though, was 4:33.09.


cc @edolstra

This was previously removed in 74c4e30.

This will allow hydra to build iso and sd images for aarch64-linux, and
share a common channel with the x86-based platforms.
@grahamc
Copy link
Member

grahamc commented Dec 19, 2018

cc @vielmetti

And filters out JDK which can't be built on aarch64-linux.
@samueldr samueldr changed the title [WIP] nixos/release-combined: adds aarch64-linux as supported nixos/release-combined: adds aarch64-linux as supported Dec 20, 2018
@samueldr
Copy link
Member Author

samueldr commented Dec 20, 2018

I'm not entirely pleased with the use of except everywhere.

First, there is the gnome3 test, which already is described as x86_64-linux elsewhere. Not sure if anything can be done while still keeping the list strict.

Then, there are some tests that are not "anything except aarch64-linux", but better described as "only i686-linux and x86_64-linux". For the latter case, adding something like x86LegacyBootable = [ "i686-linux" "x86_64-linux" ]; and a function only which would lib.intersectLists its parameter with the supported platforms may be an good solution. It would document the platforms better like (only x86LegacyBootable nixos.tests.boot.biosCdrom)

(except ["aarch64-linux"] nixos.tests.boot.biosCdrom)
#(except ["aarch64-linux"] nixos.tests.boot.biosUsb) # disabled due to issue #15690
(except ["aarch64-linux"] nixos.tests.boot.uefiCdrom)
(except ["aarch64-linux"] nixos.tests.boot.uefiUsb)
Copy link
Member

@grahamc grahamc Dec 20, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:/ bummer to see all these excepted. What's the scoop?

Copy link
Member Author

@samueldr samueldr Dec 20, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is done so to fast-track this PR, while keeping the channel advancing, while working on making them work.

Right now the issue is that the trace stops at the map function, and I need to dig to see what's the issue. (Except for bios* tests which obviously won't work.) Here's using all nixos.tests.boot.uefiUsb.

~/tmp/nixpkgs/nixpkgs $ time nix-instantiate nixos/release-combined.nix --show-trace
warning: dumping very large path (> 256 MiB); this may run out of memory
error: while evaluating 'hydraJob' at /Users/samuel/tmp/nixpkgs/nixpkgs/lib/customisation.nix:157:14, called from /Users/samuel/tmp/nixpkgs/nixpkgs/nixos/release-combined.nix:41:12:
while evaluating the attribute 'drvPath' at /Users/samuel/tmp/nixpkgs/nixpkgs/lib/customisation.nix:174:13:
while evaluating the attribute 'drvPath' at /Users/samuel/tmp/nixpkgs/nixpkgs/lib/customisation.nix:141:13:
while evaluating the attribute 'constituents' of the derivation 'nixos-19.03pre56789.gfedcba' at /Users/samuel/tmp/nixpkgs/nixpkgs/pkgs/stdenv/generic/make-derivation.nix:185:11:
while evaluating anonymous function at /Users/samuel/tmp/nixpkgs/nixpkgs/nixos/release-combined.nix:50:35, called from undefined position:
attribute 'aarch64-linux' missing, at /Users/samuel/tmp/nixpkgs/nixpkgs/nixos/release-combined.nix:50:43
Command exited with non-zero status 1

I think (hope) that all of the installer and boot tests that could work on aarch64 are currently failing on a common issue. They all fail with what looks like the same error "attribute 'aarch64-linux' missing", which could realistically be from a common cause.

@@ -63,24 +65,24 @@ in rec {
nixos.tests.chromium.x86_64-linux or []
(all nixos.tests.firefox)
(all nixos.tests.firewall)
(all nixos.tests.gnome3)
(except ["aarch64-linux"] nixos.tests.gnome3)
nixos.tests.installer.zfsroot.x86_64-linux or [] # ZFS is 64bit only
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if this can be extended to aarch64

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Though this is already documented here why it fails.

# libsmbios is unsupported on aarch64

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean the aarch64 + zfs test :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

~/tmp/nixpkgs/nixpkgs 130 $ time nix-instantiate nixos/release-combined.nix
warning: dumping very large path (> 256 MiB); this may run out of memory
error: Non-EFI boot methods are only supported on i686 / x86_64
(use '--show-trace' to show detailed location information)
Command exited with non-zero status 1

This would be part of the work needed.

Copy link
Member

@grahamc grahamc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. It'd be maybe good to add a comment indicating we'd like to extend those test blocks to include aarch64, but not sure it is specifically needed.

@samueldr samueldr merged commit 7b2b5b3 into NixOS:master Dec 21, 2018
@samueldr
Copy link
Member Author

This "broke" eval. Or more rightly so: this strained eval to its tipping point.

Using time and TIME set as such:

TIME=\n → exit status: %x\n → user: %U, system: %S, elapsed: %E\n → cpu: %P, max mem: %M, avg mem: %t, unshared: %D\n → I/O: <I:%I O:%O>, sock: <r:%r s:%s>

With this PR applied:

time nix-instantiate nixos/release-combined.nix --show-trace
 → exit status: 0
 → user: 462.59, system: 18.94, elapsed: 6:59.52
 → cpu: 114%, max mem: 11461328, avg mem: 0, unshared: 0
 → I/O: <I:0 O:0>, sock: <r:0 s:0>

mem is supposed to be in KiBs, so about 10.93 GiB required

Contrast this to before this PR was applied

time nix-instantiate nixos/release-combined.nix --show-trace
 → exit status: 0
 → user: 281.35, system: 13.88, elapsed: 4:32.57
 → cpu: 108%, max mem: 8727624, avg mem: 0, unshared: 0
 → I/O: <I:0 O:0>, sock: <r:0 s:0>

Where it took GiB 8.32


The course of action for backtracking this PR, if no other solution can be implemented quickly:

diff --git a/nixos/release-combined.nix b/nixos/release-combined.nix
index 429afe2b145..00750a6f20e 100644
--- a/nixos/release-combined.nix
+++ b/nixos/release-combined.nix
@@ -4,8 +4,8 @@
 
 { nixpkgs ? { outPath = (import ../lib).cleanSource ./..; revCount = 56789; shortRev = "gfedcba"; }
 , stableBranch ? false
-, supportedSystems ? [ "x86_64-linux" "aarch64-linux" ]
-, limitedSupportedSystems ? [ "i686-linux" ]
+, supportedSystems ? [ "x86_64-linux" ]
+, limitedSupportedSystems ? [ "i686-linux" "aarch64-linux" ]
 }:
 
 let

This will allow release-combined.nix to happen, still, for aarch64-linux, but won't use it for tested. That is true since I forgot to add the iso images for aarch64-linux and sd image to the tested set. (Something I'll need to fix anyway.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants