Large NSEC3 responses cause failure in adding records to ncache and, eventually, FORMERR (instead of NXDOMAIN)
For domain thisdoesnotexists.babia-gora.pl:
dig +dnssec @a-dns.pl txt thisdoesnotexists.babia-gora.pl
;; Truncated, retrying in TCP mode.
; <<>> DiG 9.11.4-3ubuntu5-Ubuntu <<>> +dnssec @a-dns.pl txt thisdoesnotexists.babia-gora.pl
; (2 servers found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 16322
;; flags: qr aa rd; QUERY: 1, ANSWER: 0, AUTHORITY: 32, ADDITIONAL: 1
;; WARNING: recursion requested but not available
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags: do; udp: 4096
;; QUESTION SECTION:
;thisdoesnotexists.babia-gora.pl. IN TXT
;; AUTHORITY SECTION:
babia-gora.pl. 3600 IN SOA a-dns.pl. dnsmaster.nask.pl. 1546441604 900 300 2592000 3600
babia-gora.pl. 3600 IN RRSIG SOA 8 2 86400 20190131120000 20190101120000 31890 babia-gora.pl. Mt067zg8mmrwC+ZpJPIH59ESLP5k2PHgGLuv3gdAjBnN6ht1WWZ36FTL F8IGDOWNtEg2sw19QLvIwV43FtCLz0/iopXpkRq2CBKyf7k8wUwWe0Oj F+GBnsxBNhvaLvZ96vFZVwI6dpE92qFfsl+6FhefdjAmtFf0BeC61+tS huo=
babia-gora.pl. 3600 IN RRSIG SOA 8 2 86400 20190131120000 20190101120000 32179 babia-gora.pl. L2ditJ5q9RT+CUMAgzI8xT8Lj3eCva9ZSdQ47jkBST/iVxcZTZP3qAq4 J0dcFY7gPCMI10YhGox46xC7cVdEVvOFbTtUuLPrSzCz5zGNHQe95JKj osBvrWgbXsU77h3lPZrJGvR6Kd6krgKaqlPG493lypoPcaxS0+uOSr7A FGQ=
babia-gora.pl. 3600 IN RRSIG SOA 8 2 86400 20190131120000 20190101120000 42873 babia-gora.pl. W1r84T+5FQosqONDdiZ2SijppNkJt69aRObajC2j04N0Ti9uNWm4HlLD 23M7nNGKBkH4dmbWS5V5dofSqKNOih8k8KZNO/CDQYlr5AOXRjx+ZBXS MClAD7cWLKbEPB/nOEN6lJzGvBAcASp90uf0JBJMt6OaqxsMW/y39Tu1 c5E=
babia-gora.pl. 3600 IN RRSIG SOA 8 2 86400 20190131120000 20190101120000 46966 babia-gora.pl. GJBQ74muCuWytIiAUZICEbibYNOapjPT2FcoX//Laz78NxHMA9aOP6+E 7cbf5+3ae/2Pjee8LJFf1aeISOTIN4zVr3+SRagIQdP2IkhA3dhjUk1k YA+1UKCB3kPgZlCK5airI+ycCAc/mPRYADOBKlUR3ktm6a5lOArhl1ea 4vA=
babia-gora.pl. 3600 IN RRSIG SOA 8 2 86400 20190131120000 20190101120000 55579 babia-gora.pl. MWwMhmNrMK00Uij8yd2NitxFP/p3Fq9MGkYt4AiYGEDt66uEYV4CFBVq 3XxD9NAbs8r88o7RgsidA/wk80URVZZngASGc7zgMv2vnO9uc3goSH7r DT7bUaU4INB3Ti9hiOtwrhW2TryzrWfBoezW5Zjpwx+ZaypJvJD+bTNz uqA=
babia-gora.pl. 3600 IN RRSIG SOA 8 2 86400 20190131120000 20190101120000 62605 babia-gora.pl. GxBivwU7JTHb2oZpJbWKoGafWZRbv57hszFtN8956FG41N3Vggy2msiV J9n0DrGtLzzeAYEokMypQVvOv04zJ292YMD1acqZpvV/BQoP1MEuP2A8 I5/6zGihds93jBgyw9eB4bs1LdmL8OCWRIGnEj6pbOYHRgfcQScCgThN z4w=
babia-gora.pl. 3600 IN RRSIG SOA 8 2 86400 20190131120000 20190101120000 64591 babia-gora.pl. BY9oVmScGCt1cEnCzNzkpzWoSWA2GvkkGqUsqMFe+CnRm6M1dHGra7ub O2Tn+GloWgGlpftITvlbAyTrBFhM5p5OfevPvYHiVSFOVUjm7reuFOaI wq5X486F4JZ7mMJ0qUrke03Zzv6v9+UP18W6OXpbdjb6RwNuus5Bh8Q6 46s=
AJUOKMESP92CHQ0JOAVBSK21GLTSIDF9.babia-gora.pl. 3600 IN NSEC3 1 1 12 4D9E4F753F707B862BC9 ALURHI1IT1C1D71U7UVH918Q1PUVRS42 NS SOA RRSIG DNSKEY NSEC3PARAM
AJUOKMESP92CHQ0JOAVBSK21GLTSIDF9.babia-gora.pl. 3600 IN RRSIG NSEC3 8 3 3600 20190131120000 20190101120000 31890 babia-gora.pl. KTA2m8yzTTkGJXcw75PxD3EPp7U2bzyOM0QomPB0ZEd4hIQdUr3qB0GY 54UbKnFiu7zHUd7e1BfZ4+N/MuKgQAxK0bB0eRN5+0JHgppWHWnXfT+U UWnQ8YhJG5brrKCOV8lQ+RWvZje4/vUK9MsvqJ+bJmdEvh2aqqgzTVl8 I4A=
AJUOKMESP92CHQ0JOAVBSK21GLTSIDF9.babia-gora.pl. 3600 IN RRSIG NSEC3 8 3 3600 20190131120000 20190101120000 32179 babia-gora.pl. YA6T4blF9gyhp5XBpmUjYEib5rsubWXwP5B6e5A6Z6YkfdUnudQqmTWi lLNKJnEltKndE68GT114CNQE5NbJHGB1nuffpb/1uRS8SZ0mKotsocT/ 9kZRSBaYVfRq3EW13a0qAeYXbV+fGeoaRWbxo90rmVK6sgJs9RqEZ2Gd snQ=
AJUOKMESP92CHQ0JOAVBSK21GLTSIDF9.babia-gora.pl. 3600 IN RRSIG NSEC3 8 3 3600 20190131120000 20190101120000 42873 babia-gora.pl. RRgFWJQ6mEg3/CNPsZmbgM9Chp7gnwCXdA4auY/RRZKK9RcmTS65f4jl KQpFXnQcINTHpGExYJPucrJ2DE8PRhKXN+OH7Z+JKUJ2xJV7oaKiutI7 epMALjfwxNC1iEi0101ru1Vp0zgwcHzH1BUyDzk13f6zgP0Gv5QSymww zaM=
AJUOKMESP92CHQ0JOAVBSK21GLTSIDF9.babia-gora.pl. 3600 IN RRSIG NSEC3 8 3 3600 20190131120000 20190101120000 46966 babia-gora.pl. cA9WhsqxZcgrWTbsSVzHMAygdLZEKkrd5wfSfT9zW9agLd1le9fgcDle bNqJcNz3+HFbKQ5MAMeJbPqYvzQ7w+ZNWOYgD0QpiNWKbn1maVOYGRP/ HgMT7S5AxCijuak6g1mXHmoMvPJlfKjGoAaDOUWA0QYYPC+uNePeHvu2 g6M=
AJUOKMESP92CHQ0JOAVBSK21GLTSIDF9.babia-gora.pl. 3600 IN RRSIG NSEC3 8 3 3600 20190131120000 20190101120000 55579 babia-gora.pl. fFJmwEdPJzPi/VDXHyWN+6xI32yz5nQ1+jDukytCQOF40lTF0gMl9fl6 VAcVuFtwaE4k34YzLw0XldGYhvMOpNFlPc1E9k13reckPTE+F7wxw5wN dj3/oB52fVC1pXVFyD/wPFxc24uSjg5BwDf2qpUkbhawOzP2tdMOMe9U A74=
AJUOKMESP92CHQ0JOAVBSK21GLTSIDF9.babia-gora.pl. 3600 IN RRSIG NSEC3 8 3 3600 20190131120000 20190101120000 62605 babia-gora.pl. OhB632SAL1g9AT0kJSay/N4MqeC12Vc3+FP+xqmnFfHW+DiUVKBHDoC3 GrrlTb1vRM6caYkP2l2Y3Ccl+DTXiGKVfAiu1sVrC+1ygXIRzFv2Ql/w x6RTIvo3FmaZs5uJq2+Hwy8yOWmZctq7yXW1br012pTgYSpy48KY1CcZ jj4=
AJUOKMESP92CHQ0JOAVBSK21GLTSIDF9.babia-gora.pl. 3600 IN RRSIG NSEC3 8 3 3600 20190131120000 20190101120000 64591 babia-gora.pl. ibCFLdAaJsJjxFqDUCBPJ41gHoDab1z6RTALu4JpG2AJhTEjNShw9REz jN3jdjda3VQ/5J4XJ77XIWu1lNXsuowa5fzugKGn1bCkdWAmIQdmltkb OJeQ2+SJPIElc2nhvZ/d0f5J3RI0B8ZjeIxJvD+ldD520WZWPAkt95x+ i6Q=
6EO2LDGHHD7BNU1UL3DJ52R44DE8IN90.babia-gora.pl. 3600 IN NSEC3 1 1 12 4D9E4F753F707B862BC9 8CTEOJ4H5K2UJ7TR0JDIL33OOL7FUCUS NS DS RRSIG
6EO2LDGHHD7BNU1UL3DJ52R44DE8IN90.babia-gora.pl. 3600 IN RRSIG NSEC3 8 3 3600 20190131120000 20190101120000 31890 babia-gora.pl. QK4wvjWTTlcTIAyUnFjC9IXKwo6Kvk7Focl+LIyGrBKFGBL1R6s5x1Vy 4jBSyj7nqSckBHJclTa818Kdse3l7m2vuApfqqHnqOEZOLmLaosuw1Z2 ANgA2Gjx8QUuzSarCEKN2la8nHPalVA5uQH/3PxmJjqt0diQ3vHj3+e1 UoM=
6EO2LDGHHD7BNU1UL3DJ52R44DE8IN90.babia-gora.pl. 3600 IN RRSIG NSEC3 8 3 3600 20190131120000 20190101120000 32179 babia-gora.pl. Zt3xPj3i+urydBiHYucICIwjCO6+TzFlYzS+qgq+1tpP2Rxb0Eqn9Mgk 5n12ulcTJ7ZhSARjrsWyejFWXjktv0jhqyQR4XcVuFALJxBgwzcBo+mb kuaOGSx8rPN/yA5c5kURCteaFeU3CoB0HA7iVOUyJ0wYc7p8J7BLbUoE klk=
6EO2LDGHHD7BNU1UL3DJ52R44DE8IN90.babia-gora.pl. 3600 IN RRSIG NSEC3 8 3 3600 20190131120000 20190101120000 42873 babia-gora.pl. pSmmm+mMxhq88KoFhg22/lBSWV3z7adZnX+5Z0xRGqVHh864akmgvYw2 YSoT73h7Z4ntVejRRSk5+//eaxtRMTX9amrXl4bhxPnJRI/PShKhMulu ll5HV2lv2muQ2iawF1Ma1BdixmIar9h9qJhUrDvqZr2mIZxpJBCrFYaI Pw8=
6EO2LDGHHD7BNU1UL3DJ52R44DE8IN90.babia-gora.pl. 3600 IN RRSIG NSEC3 8 3 3600 20190131120000 20190101120000 46966 babia-gora.pl. WhGTQ3Kzr7nwwUlj0dNegETF7OD26yX9CNs9OE6E+K5wvT8kCgT+RMzx scWPShuQVviUWR77AhWRlu92MXvoLc7yhasfw9TU327NAVclTQ9r/ZHp ysx7iXfFDuePUSmImpi3FEFqYiA8nyCX9ShlyTrurPVnPoNxnosL4w7c fws=
6EO2LDGHHD7BNU1UL3DJ52R44DE8IN90.babia-gora.pl. 3600 IN RRSIG NSEC3 8 3 3600 20190131120000 20190101120000 55579 babia-gora.pl. AkSD6hbOMjIdvAC0eQGqZtljR6prfYMTCf/1BDEUtcwVkwicY7s2jRJp fYZS0bvwMna2bwhPpSXIfk6eQUN+y2yoGByQvbDfdqsH3I+5RMu8Iz7O zW/7BSZzaPF3e9pFeMk21zZ3VH5iGzAPjQERH+Nn4qIrpDDTCLZJVkMR y98=
6EO2LDGHHD7BNU1UL3DJ52R44DE8IN90.babia-gora.pl. 3600 IN RRSIG NSEC3 8 3 3600 20190131120000 20190101120000 62605 babia-gora.pl. DUQx5HorPX5nZocRjU4GVXYHmr3oBgCCqPreW6Ij1vJWHslq/pfmQ69W Ed/3TfxOyKAuTb5emTyLF4HMH89ExFS1gPg1pWEmhjuDC6jcrVFtizvW JZVxpzj5FcHx6twHawLMy6aT0WyRAXux4ngh64bntw+TTKypjWayIteb h2E=
6EO2LDGHHD7BNU1UL3DJ52R44DE8IN90.babia-gora.pl. 3600 IN RRSIG NSEC3 8 3 3600 20190131120000 20190101120000 64591 babia-gora.pl. TdwmMTc2HFmEAql3Ui/oBwOwhVsPdW9fPSS/NF0ruFNoHeRMw32myPsu p8d2OhJwZrcDGt8YnQeiluPadyYNzcFfhF3Zdlkz5FOKZYM8ycURDPK4 AbGwEgS1ix8Rj+mvt5PxAsWvFvgs0/VzVXPBU8+y5Z8vg/+HPX3whOxm ExA=
UR7TE6N6HAERGQGCU3NI75I2USAJABUJ.babia-gora.pl. 3600 IN NSEC3 1 1 12 4D9E4F753F707B862BC9 VJNIP8QUE08SE4FAOSNOFS4OQB45G9CV NS DS RRSIG
UR7TE6N6HAERGQGCU3NI75I2USAJABUJ.babia-gora.pl. 3600 IN RRSIG NSEC3 8 3 3600 20190131120000 20190101120000 31890 babia-gora.pl. UrRMviVAuLp8aBp8nsAzNlXjlzHA7R9AGSyQziBW4aA29I0CeSYyuDLq 28TxSqYyXFpH0C/8+O6dmZS/fV3edr1kjLtZ0VISVu41V8BVtxXXhHig wl5FuXd6a2kkyGV4H/LE3Z7oXiryHlwW1AOvYplR3zrO1l6emuu9iutS hmA=
UR7TE6N6HAERGQGCU3NI75I2USAJABUJ.babia-gora.pl. 3600 IN RRSIG NSEC3 8 3 3600 20190131120000 20190101120000 32179 babia-gora.pl. Bv5bgrUJVQXM4kT82cz3meyVZ+2lqLEbu6lpOF2MG8yieCYFfJPkGuYA BwTfqIdlBUureYAQOsah3m8Egkrb8LcmQjDqK/Wp4qWzYaN3eXQwLBvh V4oUCHVILw4+Avo7dDiGa08+7njimaX/nWUV5oqglHi0pwdY00ACtpcq gNA=
UR7TE6N6HAERGQGCU3NI75I2USAJABUJ.babia-gora.pl. 3600 IN RRSIG NSEC3 8 3 3600 20190131120000 20190101120000 42873 babia-gora.pl. h/4mRQWFvP0eYStaRIswvcgogn1KyimeGGDBIvK5DkMlvenQ9A3nkzHT 2qPVKbxwDXW4DSivQyUQ6b4qVtXc1OWP/1loENW24vHOQP55JFj7hNjv rIFKuN79CM0USYqK8aIKVMu53GbY0C9gZifwFqng5iAfk8L6rmyTD4WH pq0=
UR7TE6N6HAERGQGCU3NI75I2USAJABUJ.babia-gora.pl. 3600 IN RRSIG NSEC3 8 3 3600 20190131120000 20190101120000 46966 babia-gora.pl. doUDB9cbEFat+xI/NLpCpXltwNhihNcf/dOgPnTCqQM/pG93TqletHEx ppC/HrDUJFhykw2mz5nnQv4+KHONl5HMb93HvABl6xRuDshcs701JLGU pdAAhyW8dymlyTMVREuD+6v8Mlv4DRJGoWdCykPzbcww78F0oM+I8169 dLw=
UR7TE6N6HAERGQGCU3NI75I2USAJABUJ.babia-gora.pl. 3600 IN RRSIG NSEC3 8 3 3600 20190131120000 20190101120000 55579 babia-gora.pl. OxmDTZwn94JOche3g/iJPLERAAdHLLIsLvgumBuKj1kcz/t1XLZEh1wX 3U9QnDPpv5tGqEWMh0nJBDn2yYnke32clxDWlmSTtX2OGHmgb4FdcXMx zOiiuDqxDy6LHs26acfXAFXV7lBDaRbY+OdqaBYH0kUVZSMtmM6N3w+z TDg=
UR7TE6N6HAERGQGCU3NI75I2USAJABUJ.babia-gora.pl. 3600 IN RRSIG NSEC3 8 3 3600 20190131120000 20190101120000 62605 babia-gora.pl. IPsonORo3dmA8PQj+EOYUSWSc3as2C/iYtak2epYqY+u/MEqc2NZ3X+f qsAKKkneho+HWqE9MpCscKgeUdQpXuppFCot2K5H0osFCiz3Bm+HZZjv YU1Nb7oJEKD+9WOQYbuethlFyjYCuCwVtI39A3EtdJJRPhU7/6xxT9q7 3ug=
UR7TE6N6HAERGQGCU3NI75I2USAJABUJ.babia-gora.pl. 3600 IN RRSIG NSEC3 8 3 3600 20190131120000 20190101120000 64591 babia-gora.pl. j0qiPHDZ6P6R+VEcOS6ZjagidqXVmhZvu3WreRcK7drnjibYTUKdZnx/ dBIe3EjJLhJVfSXSj6Jc1Q4Tv1jwn9rRz8UCnOYwPK/A9krZ0VKUcsI/ X1OuHzgUUz5gzgdlo7yX+nwEgdfocPNmMTQjdBOAQplhtXvZmw+kyCJu vU8=
;; Query time: 15 msec
;; SERVER: 2001:a10:121:1::156#53(2001:a10:121:1::156)
;; WHEN: śro sty 02 19:27:46 CET 2019
;; MSG SIZE rcvd: 5229
When trying to query bind (master):
; <<>> DiG 9.11.4-3ubuntu5-Ubuntu <<>> @127.0.0.1 -p 5300 thisdoesnotexists.babia-gora.pl
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: FORMERR, id: 21911
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
; COOKIE: 8562f61a18d02bed97d3fc7e5c2d02ec982d7abedc1792c9 (good)
;; QUESTION SECTION:
;thisdoesnotexists.babia-gora.pl. IN A
;; Query time: 84 msec
;; SERVER: 127.0.0.1#5300(127.0.0.1)
;; WHEN: śro sty 02 19:29:00 CET 2019
;; MSG SIZE rcvd: 88
The underlying issue is that copy_rdataset called by addoptout in lib/dns/ncache.c runs out of space and returns ISC_R_NOSPACE - this result code however should never be passed upstream as failure to add to ncache does not influence the query processing in any way (and definitely is not a FORMERR from client side).