From: Michał Kępień Date: Wed, 5 Aug 2020 07:04:53 +0000 (+0200) Subject: Set "max-cache-size" in the "geoip2" system test X-Git-Tag: v9.17.4~12^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4292d5bdfe6a0ff1de64e0aee6cb3975dd7ef085;p=thirdparty%2Fbind9.git Set "max-cache-size" in the "geoip2" system test The named configuration files used in the "geoip2" system test cause a rather large number of views (6-8) to be set up in each tested named instance. Each view has its own cache. Commit e24bc324b455d9cad7b51acd3d5c7b4e40c66187 caused the RBT hash table to be pre-allocated to a size derived from "max-cache-size", so that it never needs to be rehashed. The size of that hash table is not expected to be significant enough to cause memory use issues in typical conditions even for large "max-cache-size" settings. However, these two factors combined can cause memory exhaustion issues in GitLab CI, where we run multiple "instances" of the test suite in parallel on the same runner, each test suite executes multiple system tests concurrently, and each system test may potentially start multiple named instances at the same time. In practice, this problem currently only seems to be affecting the "geoip2" system test, which is failing intermittently due to named instances used by that test getting killed by oom-killer. Prevent the "geoip2" system test from failing intermittently by setting "max-cache-size" in named configuration files used in that test to a low value in order to keep memory usage at bay even with a large number of views configured. --- diff --git a/bin/tests/system/geoip2/ns2/named1.conf.in b/bin/tests/system/geoip2/ns2/named1.conf.in index 2838b28fce5..dfb6f0e86b0 100644 --- a/bin/tests/system/geoip2/ns2/named1.conf.in +++ b/bin/tests/system/geoip2/ns2/named1.conf.in @@ -22,6 +22,7 @@ options { recursion no; dnssec-validation no; geoip-directory "../data"; + max-cache-size 1M; }; key rndc_key { diff --git a/bin/tests/system/geoip2/ns2/named10.conf.in b/bin/tests/system/geoip2/ns2/named10.conf.in index f809d04d999..15b23c4deca 100644 --- a/bin/tests/system/geoip2/ns2/named10.conf.in +++ b/bin/tests/system/geoip2/ns2/named10.conf.in @@ -22,6 +22,7 @@ options { recursion no; dnssec-validation no; geoip-directory "../data"; + max-cache-size 1M; }; key rndc_key { diff --git a/bin/tests/system/geoip2/ns2/named11.conf.in b/bin/tests/system/geoip2/ns2/named11.conf.in index 0a4892599c3..d1c5fa0afe9 100644 --- a/bin/tests/system/geoip2/ns2/named11.conf.in +++ b/bin/tests/system/geoip2/ns2/named11.conf.in @@ -22,6 +22,7 @@ options { recursion no; dnssec-validation no; geoip-directory "../data"; + max-cache-size 1M; }; key rndc_key { diff --git a/bin/tests/system/geoip2/ns2/named12.conf.in b/bin/tests/system/geoip2/ns2/named12.conf.in index a968c8a91e1..3fd54cb274a 100644 --- a/bin/tests/system/geoip2/ns2/named12.conf.in +++ b/bin/tests/system/geoip2/ns2/named12.conf.in @@ -27,6 +27,7 @@ options { dnssec-validation no; geoip-directory "../data"; blackhole { blocking; }; + max-cache-size 1M; }; key rndc_key { diff --git a/bin/tests/system/geoip2/ns2/named2.conf.in b/bin/tests/system/geoip2/ns2/named2.conf.in index 8794cbbd956..df1656f733a 100644 --- a/bin/tests/system/geoip2/ns2/named2.conf.in +++ b/bin/tests/system/geoip2/ns2/named2.conf.in @@ -22,6 +22,7 @@ options { recursion no; dnssec-validation no; geoip-directory "../data"; + max-cache-size 1M; }; key rndc_key { diff --git a/bin/tests/system/geoip2/ns2/named3.conf.in b/bin/tests/system/geoip2/ns2/named3.conf.in index ecd758c1a6b..0aed3b5f341 100644 --- a/bin/tests/system/geoip2/ns2/named3.conf.in +++ b/bin/tests/system/geoip2/ns2/named3.conf.in @@ -22,6 +22,7 @@ options { recursion no; dnssec-validation no; geoip-directory "../data"; + max-cache-size 1M; }; key rndc_key { diff --git a/bin/tests/system/geoip2/ns2/named4.conf.in b/bin/tests/system/geoip2/ns2/named4.conf.in index e5c88284fd9..a6a6ff69bd8 100644 --- a/bin/tests/system/geoip2/ns2/named4.conf.in +++ b/bin/tests/system/geoip2/ns2/named4.conf.in @@ -22,6 +22,7 @@ options { recursion no; dnssec-validation no; geoip-directory "../data"; + max-cache-size 1M; }; key rndc_key { diff --git a/bin/tests/system/geoip2/ns2/named5.conf.in b/bin/tests/system/geoip2/ns2/named5.conf.in index 0b535200189..cd37c95eeae 100644 --- a/bin/tests/system/geoip2/ns2/named5.conf.in +++ b/bin/tests/system/geoip2/ns2/named5.conf.in @@ -22,6 +22,7 @@ options { recursion no; dnssec-validation no; geoip-directory "../data"; + max-cache-size 1M; }; key rndc_key { diff --git a/bin/tests/system/geoip2/ns2/named6.conf.in b/bin/tests/system/geoip2/ns2/named6.conf.in index 56e17b3820c..aa1afd6ff47 100644 --- a/bin/tests/system/geoip2/ns2/named6.conf.in +++ b/bin/tests/system/geoip2/ns2/named6.conf.in @@ -22,6 +22,7 @@ options { recursion no; dnssec-validation no; geoip-directory "../data"; + max-cache-size 1M; }; key rndc_key { diff --git a/bin/tests/system/geoip2/ns2/named7.conf.in b/bin/tests/system/geoip2/ns2/named7.conf.in index 93e6a2c712a..e39ef106e58 100644 --- a/bin/tests/system/geoip2/ns2/named7.conf.in +++ b/bin/tests/system/geoip2/ns2/named7.conf.in @@ -22,6 +22,7 @@ options { recursion no; dnssec-validation no; geoip-directory "../data"; + max-cache-size 1M; }; key rndc_key { diff --git a/bin/tests/system/geoip2/ns2/named8.conf.in b/bin/tests/system/geoip2/ns2/named8.conf.in index ebf17659d60..2e835310893 100644 --- a/bin/tests/system/geoip2/ns2/named8.conf.in +++ b/bin/tests/system/geoip2/ns2/named8.conf.in @@ -22,6 +22,7 @@ options { recursion no; dnssec-validation no; geoip-directory "../data"; + max-cache-size 1M; }; key rndc_key { diff --git a/bin/tests/system/geoip2/ns2/named9.conf.in b/bin/tests/system/geoip2/ns2/named9.conf.in index a9161c0f75d..f86583bf487 100644 --- a/bin/tests/system/geoip2/ns2/named9.conf.in +++ b/bin/tests/system/geoip2/ns2/named9.conf.in @@ -22,6 +22,7 @@ options { recursion no; dnssec-validation no; geoip-directory "../data"; + max-cache-size 1M; }; key rndc_key {