zonefiles in map format larger than 2 GiB cannot be read but can be written (data loss)
Large zones written in
masterfile-format map; with files larger than 2 GiB cannot be read.
BIND version used
It affects latest commits on all supported branches:
Steps to reproduce
- Generate a zone file which results in map file larger than 2 GiB:
perl bin/tests/startperf/mkzonefile.pl test 8000000 > /tmp/text
- Convert text zone file into
named-compilezone -i none -k ignore -m ignore -M ignore -n ignore -r ignore -S ignore -T ignore -W ignore -f text -F map -o /tmp/map test /tmp/text
- Attempt to read the zone:
named-checkzone -i none -k ignore -m ignore -M ignore -n ignore -r ignore -S ignore -T ignore -W ignore -f map test /tmp/map
What is the current bug behavior?
zone test/IN: loading from master file /tmp/map failed: invalid file zone test/IN: not loaded due to errors.
What is the expected correct behavior?
Zone can be read and the data are intact, obviously.
The main question is how much we want to invest into the
map format. If we decide to remove RBTDB map format in favor of a different data structure, we might consider a low-cost option: Limit file size to make it "safe" and remove the format a bit later.