about summary refs log tree commit diff
path: root/pkgs/applications/science
diff options
context:
space:
mode:
authorTimo Kaufmann <timokau@zoho.com>2019-08-16 23:50:55 +0200
committerTimo Kaufmann <timokau@zoho.com>2019-08-16 23:50:55 +0200
commit41bb3194622637aa26fe5a28880165d9ecb2f2df (patch)
tree2b99d1e6cc31315c835e1e24466f04b3e443ecd9 /pkgs/applications/science
parent69d9700c61ff1648f5094f997ca2d754299441ae (diff)
downloadnixlib-41bb3194622637aa26fe5a28880165d9ecb2f2df.tar
nixlib-41bb3194622637aa26fe5a28880165d9ecb2f2df.tar.gz
nixlib-41bb3194622637aa26fe5a28880165d9ecb2f2df.tar.bz2
nixlib-41bb3194622637aa26fe5a28880165d9ecb2f2df.tar.lz
nixlib-41bb3194622637aa26fe5a28880165d9ecb2f2df.tar.xz
nixlib-41bb3194622637aa26fe5a28880165d9ecb2f2df.tar.zst
nixlib-41bb3194622637aa26fe5a28880165d9ecb2f2df.zip
sage: avoid running out of memory during tests
Diffstat (limited to 'pkgs/applications/science')
-rw-r--r--pkgs/applications/science/math/sage/sage-tests.nix4
1 files changed, 4 insertions, 0 deletions
diff --git a/pkgs/applications/science/math/sage/sage-tests.nix b/pkgs/applications/science/math/sage/sage-tests.nix
index 591fa192d563..0cd5b5d976a1 100644
--- a/pkgs/applications/science/math/sage/sage-tests.nix
+++ b/pkgs/applications/science/math/sage/sage-tests.nix
@@ -51,6 +51,10 @@ stdenv.mkDerivation rec {
     export HOME="$TMPDIR/sage-home"
     mkdir -p "$HOME"
 
+    # avoid running out of memory with many threads in subprocesses, see
+    # https://github.com/NixOS/nixpkgs/pull/65802
+    export GLIBC_TUNABLES=glibc.malloc.arena_max=4
+
     echo "Running sage tests with arguments ${timeSpecifier} ${patienceSpecifier} ${testArgs}"
     "sage" -t --nthreads "$NIX_BUILD_CORES" --optional=sage ${timeSpecifier} ${patienceSpecifier} ${testArgs}
   '';