Subject: Re: Memory issue in bind
To: None <tech-net@NetBSD.org>
From: Mipam <mipam@ibb.net>
List: tech-net
Date: 08/19/2005 14:53:32
This message is in MIME format. The first part should be readable text,
while the remaining parts are likely unreadable without MIME-aware tools.
Send mail to mime@docserver.cac.washington.edu for more info.
--0-608565184-1124455826=:22472
Content-Type: TEXT/PLAIN; CHARSET=US-ASCII
Content-ID: <Pine.BSO.4.56.0508191452021.23223@ux11.ltcm.net>
Attached is the patch (based on the patch used in FreeBSD) that should
remedy the below mentioned issue, is it
possible to review it and merge it in if it is descent enough?
Though, importing 9.3.1 would be nice as well, it doesnt resolve the issue
named below but fixes some other important bugs.
Regards,
Mipam.
On Fri, 19 Aug 2005, Mipam wrote:
> Hi,
>
> I encountered this on the FreeBSD list:
>
> http://lists.freebsd.org/pipermail/cvs-src/2005-August/051127.html
>
> It's from august 18th, the message was:
>
> "Update the vendor branch with a patch to this file that was
> researched by glebius, and incorporated by ISC into the next
> version of BIND. Unfortunately, it looks like their release
> will come after the release of FreeBSD 6, so we will bring
> this in now.
>
> The patch addresses a problem with high-load resolvers which
> hit memory barriers. Without this patch, running the resolving
> name server out of memory would lead to "unpredictable results."
>
> Of course, the canonical answer to this problem is to put more
> memory into the system, however that is not always possible, and
> the code should be able to handle this situation gracefully in
> any case."
>
> Unfortunatly, i cannot see the patch from isc, but it might be an idea to
> merge it into 9.3.0 until the release of 9.4.0?
> Bye,
>
> Mipam.
>
--0-608565184-1124455826=:22472
Content-Type: TEXT/PLAIN; CHARSET=US-ASCII; NAME="patch-lib_dns_resolver.c"
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.BSO.4.56.0508191450260.22472@ux11.ltcm.net>
Content-Description:
Content-Disposition: ATTACHMENT; FILENAME="patch-lib_dns_resolver.c"
LS0tIHJlc29sdmVyLmMub3JpZwlGcmkgQXVnIDE5IDE0OjM3OjQ3IDIwMDUN
CisrKyByZXNvbHZlci5jCUZyaSBBdWcgMTkgMTQ6NDQ6MjEgMjAwNQ0KQ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