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

phc-intel: Don't define the package if the assert would fail. #68023

Merged
merged 1 commit into from Sep 4, 2019

Conversation

@ambrop72
Copy link
Contributor

ambrop72 commented Sep 3, 2019

If the kernel is too old one gets the kernel version assertion error, even if that package is not used. Some code must be going through all defined kernel module packages and ends up triggering the assert.

Motivation for this change

Assertion failure in VirtualBox tests, see #67968 (comment).

I just made the packages conditionally defined like a few other packages.

If someone wants to go looking into the cause, here's a backtrace:

error: while evaluating the attribute 'buildCommand' of the derivation 'vm-test-run-virtualbox-headless' at /etc/nixos/nixpkgs/nixos/lib/testing.nix:53:7:
while evaluating the attribute 'testScript' of the derivation 'nixos-test-driver-virtualbox-headless' at /etc/nixos/nixpkgs/pkgs/build-support/trivial-builders.nix:7:14:
while evaluating 'isFunction' at /etc/nixos/nixpkgs/lib/trivial.nix:296:16, called from /etc/nixos/nixpkgs/nixos/lib/testing.nix:111:12:
while evaluating anonymous function at /etc/nixos/nixpkgs/lib/attrsets.nix:234:10, called from undefined position:
while evaluating the attribute 'buildCommand' of the derivation 'virtualbox-image' at /etc/nixos/nixpkgs/pkgs/build-support/trivial-builders.nix:7:14:
while evaluating the attribute 'system.build.kernel' at /etc/nixos/nixpkgs/nixos/modules/system/boot/kernel.nix:192:29:
while evaluating the attribute 'boot.kernelPackages' at undefined position:
while evaluating anonymous function at /etc/nixos/nixpkgs/lib/modules.nix:75:45, called from undefined position:
while evaluating the attribute 'value' at /etc/nixos/nixpkgs/lib/modules.nix:336:9:
while evaluating the option `boot.kernelPackages':
while evaluating 'apply' at /etc/nixos/nixpkgs/nixos/modules/system/boot/kernel.nix:40:15, called from /etc/nixos/nixpkgs/lib/modules.nix:333:35:
while evaluating the attribute 'mergedValue' at /etc/nixos/nixpkgs/lib/modules.nix:368:5:
while evaluating anonymous function at /etc/nixos/nixpkgs/lib/modules.nix:368:32, called from /etc/nixos/nixpkgs/lib/modules.nix:368:19:
while evaluating 'mergeEqualOption' at /etc/nixos/nixpkgs/lib/options.nix:108:27, called from /etc/nixos/nixpkgs/lib/modules.nix:371:8:
while evaluating anonymous function at /etc/nixos/nixpkgs/lib/options.nix:110:23, called from /etc/nixos/nixpkgs/lib/options.nix:110:10:
while evaluating 'callPackageWith' at /etc/nixos/nixpkgs/lib/customisation.nix:108:35, called from /etc/nixos/nixpkgs/pkgs/top-level/all-packages.nix:15898:17:
while evaluating 'makeOverridable' at /etc/nixos/nixpkgs/lib/customisation.nix:67:24, called from /etc/nixos/nixpkgs/lib/customisation.nix:112:8:
while evaluating anonymous function at /etc/nixos/nixpkgs/pkgs/os-specific/linux/phc-intel/default.nix:1:1, called from /etc/nixos/nixpkgs/lib/customisation.nix:69:12:
assertion failed at /etc/nixos/nixpkgs/pkgs/os-specific/linux/phc-intel/default.nix:4:1
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 nix-review --run "nix-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)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
Notify maintainers

cc @flokli

If the kernel is too old one gets the assertion error, even if nothing specifically request that package. Some code must be going through all defined kernel module packages that triggers the assert.
@flokli flokli merged commit af2f81f into NixOS:master Sep 4, 2019
12 checks passed
12 checks passed
Evaluation Performance Report Evaluator Performance Report
Details
grahamcofborg-eval ^.^!
Details
grahamcofborg-eval-check-meta config.nix: checkMeta = true
Details
grahamcofborg-eval-darwin nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A darwin-tested
Details
grahamcofborg-eval-nixos nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release-combined.nix -A tested
Details
grahamcofborg-eval-nixos-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release.nix -A manual
Details
grahamcofborg-eval-nixos-options nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release.nix -A options
Details
grahamcofborg-eval-nixpkgs-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A manual
Details
grahamcofborg-eval-nixpkgs-tarball nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A tarball
Details
grahamcofborg-eval-nixpkgs-unstable-jobset nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A unstable
Details
grahamcofborg-eval-package-list nix-env -qa --json --file .
Details
grahamcofborg-eval-package-list-no-aliases nix-env -qa --json --file . --arg config { allowAliases = false; }
Details
@flokli

This comment has been minimized.

Copy link
Contributor

flokli commented Sep 4, 2019

Thanks!

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

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.