Large number of small zones in `map` format cannot be loaded
Summary
Large number of small zones in map
format cannot be loaded.
BIND version used
Steps to reproduce
- Generate 100k small zones using a script in our repo:
sh setup.sh 100000 5 > named.conf
- Convert all zones into map format:
cd zones/
for F in *.db; do echo named-compilezone -f text -F map -o ${F}.map `basename $F .db` "$F"; done | parallel -j64
- Modify named.conf to use
map
format:
options {
masterfile-format map;
};
sed -i 's/\.db/.db.map/' named.conf
What is the current bug behavior?
named log on all versions:
zone jfyultzehh.example/IN: loading from master file zones/jfyultzehh.example.db.map failed: failure
On a 64-bit Linux machine with 32 GB of RAM named loads 65 352 of our zones and the rest ends up with this error. Additionally main
branch coredumps while exiting named by SIGINT with a memory allocation error.
Loading the same zones from text and raw format works.
What is the expected correct behavior?
Well, I guess it should load all the zones :-)