Skip to content

Commit

Permalink
NixOS tests: Increase hung_task_timeout_secs
Browse files Browse the repository at this point in the history
This hopefully fixes intermittent test failures like

  http://hydra.nixos.org/build/29962437

  router# [  240.128835] INFO: task mke2fs:99 blocked for more than 120 seconds.
  router# [  240.130135]       Not tainted 3.18.25 NixOS#1-NixOS
  router# [  240.131110] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.

assuming that these are caused by high load on the host.

(cherry picked from commit 6d02d7e)
  • Loading branch information
adrianpk committed Jan 4, 2016
1 parent 5ed1e92 commit b12eed8
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
1 change: 1 addition & 0 deletions nixos/modules/system/boot/stage-1-init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ done


# Create device nodes in /dev.
@preDeviceCommands@
echo "running udev..."
mkdir -p /etc/udev
ln -sfn @udevRules@ /etc/udev/rules.d
Expand Down
11 changes: 10 additions & 1 deletion nixos/modules/system/boot/stage-1.nix
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ let
inherit (config.boot) resumeDevice devSize runSize;

inherit (config.boot.initrd) checkJournalingFS
preLVMCommands postDeviceCommands postMountCommands kernelModules;
preLVMCommands preDeviceCommands postDeviceCommands postMountCommands kernelModules;

resumeDevices = map (sd: if sd ? device then sd.device else "/dev/disk/by-label/${sd.label}")
(filter (sd: sd ? label || hasPrefix "/dev/" sd.device) config.swapDevices);
Expand Down Expand Up @@ -303,6 +303,15 @@ in
'';
};

boot.initrd.preDeviceCommands = mkOption {
default = "";
type = types.lines;
description = ''
Shell commands to be executed before udev is started to create
device nodes.
'';
};

boot.initrd.postDeviceCommands = mkOption {
default = "";
type = types.lines;
Expand Down
5 changes: 5 additions & 0 deletions nixos/modules/testing/test-instrumentation.nix
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ let kernel = config.boot.kernelPackages.kernel; in
# into thinking they're running interactively.
environment.variables.PAGER = "";

boot.initrd.preDeviceCommands =
''
echo 600 > /proc/sys/kernel/hung_task_timeout_secs
'';

boot.initrd.postDeviceCommands =
''
# Using acpi_pm as a clock source causes the guest clock to
Expand Down

0 comments on commit b12eed8

Please sign in to comment.