From 7a8b4907e2d5fe95b31e8f4f1cb1f176419fa9d7 Mon Sep 17 00:00:00 2001 From: Bas van Dijk Date: Mon, 8 Nov 2021 17:28:41 +0000 Subject: djbdns: fix crash due to data ulimit This fixes: https://github.com/NixOS/nixpkgs/issues/119066. When `djbdns` is repeatedly queried it will crash with: ``` mmap: tinydns (842): VmData 331776 exceed data ulimit 300000. Update limits or use boot option ignore_rlimit_data. ``` So we increase the softlimit from 300000 to 4500000 as suggested in the issue. The `tinydns` NixOS test has been extended with testing for the faulty behaviour. --- nixos/tests/tinydns.nix | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'nixos/tests') diff --git a/nixos/tests/tinydns.nix b/nixos/tests/tinydns.nix index b80e3451700a..3e3b682f2b91 100644 --- a/nixos/tests/tinydns.nix +++ b/nixos/tests/tinydns.nix @@ -21,6 +21,20 @@ import ./make-test-python.nix ({ lib, ...} : { testScript = '' nameserver.start() nameserver.wait_for_unit("tinydns.service") - nameserver.succeed("host bla.foo.bar 192.168.1.1 | grep '1\.2\.3\.4'") + + # We query tinydns a few times to trigger the bug: + # + # nameserver # [ 6.105872] mmap: tinydns (842): VmData 331776 exceed data ulimit 300000. Update limits or use boot option ignore_rlimit_data. + # + # which was reported in https://github.com/NixOS/nixpkgs/issues/119066. + # Without the patch + # it fails on the 10th iteration. + nameserver.succeed( + """ + for i in {1..15}; do + host bla.foo.bar 192.168.1.1 | grep '1\.2\.3\.4' + done + """ + ) ''; }) -- cgit v1.2.3 From b0a18479993fc7d504f96c5d00cdcca586f6c044 Mon Sep 17 00:00:00 2001 From: Bas van Dijk Date: Mon, 8 Nov 2021 21:35:29 +0000 Subject: nixos/tests/tinydns.nix: test a few more queries --- nixos/tests/tinydns.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nixos/tests') diff --git a/nixos/tests/tinydns.nix b/nixos/tests/tinydns.nix index 3e3b682f2b91..124508bc004b 100644 --- a/nixos/tests/tinydns.nix +++ b/nixos/tests/tinydns.nix @@ -31,7 +31,7 @@ import ./make-test-python.nix ({ lib, ...} : { # it fails on the 10th iteration. nameserver.succeed( """ - for i in {1..15}; do + for i in {1..100}; do host bla.foo.bar 192.168.1.1 | grep '1\.2\.3\.4' done """ -- cgit v1.2.3