diff options
author | Ben Radford <benradf@users.noreply.github.com> | 2023-04-10 14:12:10 +0100 |
---|---|---|
committer | Ben Radford <benradf@users.noreply.github.com> | 2023-04-11 11:15:34 +0100 |
commit | 7f5ca6192d091090bc71ab7bf96dd4acf0f1d376 (patch) | |
tree | 2c3e5c0c6876f2a2eb6fc15f979197ad860b980d | |
parent | 45ca4e6432ac78ba7960962c024e21f3ab31bcd9 (diff) |
Add script to reproduce issue by inducing heavy load.
-rwxr-xr-x | repro-7998.sh | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/repro-7998.sh b/repro-7998.sh new file mode 100755 index 000000000..b022d31ab --- /dev/null +++ b/repro-7998.sh @@ -0,0 +1,33 @@ +#!/usr/bin/env bash +set -eux +LOG_FILE=/tmp/repro-7998.log +rm -f "$LOG_FILE" +for i in {1..8}; do + ( + while true; do + nix-build \ + --argstr uuid $(uuidgen) \ + --arg drvCount $((RANDOM % 256)) \ + -E ' + { uuid ? "00000000-0000-0000-0000-000000000000", drvCount ? 0 }: + with import <nixpkgs> { }; + let + mkDrv = name: buildInputs: + stdenv.mkDerivation { + inherit name; + inherit buildInputs; + unpackPhase = "date +\"${uuid} %F %T\" >date.txt"; + installPhase = "mkdir -p $out; cp date.txt $out/"; + }; + mkDrvs = n: + let + name = "repro-7998-${toString n}"; + buildInputs = if n == 0 then [ ] else [ (mkDrvs (n - 1)) ]; + in mkDrv name buildInputs; + in mkDrvs drvCount + ' + done 2>&1 | tee -a "$LOG_FILE" + ) & +done +read # Press enter to stop +pkill -KILL -f repro-7998.sh |