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

linux: Temporary fix for issue #42755 #43115

Merged
merged 1 commit into from Jul 10, 2018
Merged

linux: Temporary fix for issue #42755 #43115

merged 1 commit into from Jul 10, 2018

Conversation

talyz
Copy link
Contributor

@talyz talyz commented Jul 6, 2018

Motivation for this change

These patches fix a serious issue with the xen-netfront driver (used on AWS ec2 t2 instances.) They will be included in an upstream release, so this is just a temporary measure. Issue #42755 goes more into depth about this.

This should preferably be merged to stable too, where it should be applied to all versions of the kernel except 4.15, which doesn't contain the patch that introduced this bug.

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)
  • Fits CONTRIBUTING.md.

# https://github.com/NixOS/nixpkgs/issues/42755
xen-netfront_fix_mismatched_rtnl_unlock = {
name = "xen-netfront_fix_mismatched_rtnl_unlock";
patch = ./xen-netfront_fix_mismatched_rtnl_unlock.patch;
Copy link
Member

Choose a reason for hiding this comment

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

Instead of checking in the patches to nixpkgs you should use fetchpatch:

patch = fetchpatch {
  name = "xen-netfront_fix_mismatched_rtnl_unlock.patch";
  url = "https://github.com/torvalds/linux/commit/cb257783c2927b73614b20f915a91ff78aa6f3e8.patch";
  sha256 = "1288a5irvq2rhfl0aclb0lvhxwmbqp5blcdpx7d7lwz356cwx8xm";
};

@adisbladis
Copy link
Member

Also the commit message should be more descriptive in itself, not just a reference to an issue.

Fix a serious issue with the xen-netfront driver introduced in
upstream commit f599c64fdf7d ("xen-netfront: Fix race between device
setup and open") where the MTU of the device cannot be set
properly. This should be removed once it's included in upstream.
@adisbladis
Copy link
Member

@GrahamcOfBorg test kernel-latest kernel-lts

@adisbladis adisbladis self-assigned this Jul 10, 2018
@adisbladis
Copy link
Member

I'm building these tests manually too in case of @GrahamcOfBorg times out.

@GrahamcOfBorg
Copy link

Failure on x86_64-linux (full log)

Attempted: tests.kernel-latest, tests.kernel-lts

Partial log (click to expand)

cannot build derivation '/nix/store/2kbdn4175jnr484i8qj83njl3bdw6nyn-etc.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/w9ynvxr55wza16z0936jmyysvxqkbfjn-stage-1-init.sh.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/l8r0rdwp3cqjir6nlqjvpgwq7dnqw1mj-initrd.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/ny43cl9y6wpagrwnwf4b6qgm3d4nbr1a-nixos-system-machine-18.09.git.e879374.drv': 5 dependencies couldn't be built
cannot build derivation '/nix/store/mamscdixjdwyc48862rlrwhpnhnasp8k-closure-info.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/5k75n90c5a4ygff2bib7v8lnrydvjswj-run-nixos-vm.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/fx3qva5xhx2ag9s688fn7b8dqg8ak82w-nixos-vm.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/w6y2wqmkdmfmy1842g8kl93dzrng1wbh-nixos-test-driver-kernel-latest.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/mblyvqqklvv23jarnv7yshc91jgvm6hl-vm-test-run-kernel-latest.drv': 1 dependencies couldn't be built
error: build of '/nix/store/4kp0wbh7wgk7j6264qwhin3c0cw5fs7l-vm-test-run-kernel-lts.drv', '/nix/store/mblyvqqklvv23jarnv7yshc91jgvm6hl-vm-test-run-kernel-latest.drv' failed

@GrahamcOfBorg
Copy link

Failure on aarch64-linux (full log)

Attempted: tests.kernel-latest, tests.kernel-lts

Partial log (click to expand)

cannot build derivation '/nix/store/m0jwvvvqmwxw2a2ri1ql64kx4p86n18d-etc.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/ack07jl4yswdczcpskslm1xp9dp96va0-stage-1-init.sh.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/1nsc0lf9nh0c30gj377m0j24rnp8vkz5-initrd.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/02pl44dx662pxx92bw2vpgsv8i8dnfr5-nixos-system-machine-18.09.git.71e76c8.drv': 5 dependencies couldn't be built
cannot build derivation '/nix/store/mpfvfkbn63mc38blyidfh2y1ciihzdqk-closure-info.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/13i5fhyq72ixm6pjp5dnrgf0c2r4vili-run-nixos-vm.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/6cinm9w1l4cj935i7qyxdkcgi9bxrqhw-nixos-vm.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/42zgrndfbmsxy2r09dkmzhh18zkbrs3x-nixos-test-driver-kernel-latest.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/xnfl2cixpq1g4wiqldi0f97x1qmps677-vm-test-run-kernel-latest.drv': 1 dependencies couldn't be built
error: build of '/nix/store/w9why0bzcaghf82dl6xsb48134wd2d2d-vm-test-run-kernel-lts.drv', '/nix/store/xnfl2cixpq1g4wiqldi0f97x1qmps677-vm-test-run-kernel-latest.drv' failed

@adisbladis
Copy link
Member

Tested on latest and lts kernels. Passes on both.
Tested applying the patches on other kernel versions but didn't let the build complete (it takes too much time).

Thanks for your contribution!

@adisbladis adisbladis merged commit 8585cb3 into NixOS:master Jul 10, 2018
@adisbladis
Copy link
Member

cc @NeQuissimus

@adisbladis
Copy link
Member

Backporting to 18.03 is underway. Still building.

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

4 participants