Report information
The Basics
Id:
48110
Status:
open
Priority:
Low/Low
Queue:

People
Owner:
Nobody in particular
Cc:
AdminCc:

BugTracker
Version Fixed:
(no value)
Version Found:
(no value)
Versions Affected:
(no value)
Versions Planned:
4.4.2
Priority:
P2 Normal
Severity:
S2 Normal
CVSS Score:
(no value)
CVE ID:
(no value)
Component:
(no value)
Area:
Other

Dates
Created:Thu, 23 Aug 2018 03:14:23 -0400
Updated:Wed, 29 Aug 2018 09:18:08 -0400
Closed:Not set



This bug tracker is no longer active.

Please go to our Gitlab to submit issues (both feature requests and bug reports) for active projects maintained by Internet Systems Consortium (ISC).

Due to security and confidentiality requirements, full access is limited to the primary maintainers.

Subject: PATCH: Do not ;load leases into memory if replay is not needed
Date: Thu, 23 Aug 2018 09:14:09 +0200
From: "Pavel Zhukov" <pzhukov@redhat.com>
To: dhcp-bugs@isc.org
In current implementation dhcpd tries to dmalloc() memory for leases file if it's compiled with --enable-tracing (default) even if playpack is not enabled. There're two problems: 1) useless malloc consumes memory 2) dhcpd failed to start if leases files is greater that 3GB (i.e. server was flooded with DHCPREQUEST prior to shutdown/crash) Disabling of tracing is not really an option because software is shipped in binary form and not supposed to be recompiled by end user. diff --git a/server/confpars.c b/server/confpars.c index d79489b..c20d618 100644 --- a/server/confpars.c +++ b/server/confpars.c @@ -134,6 +134,11 @@ isc_result_t read_conf_file (const char *filename, struct group *group, cfile = (struct parse *)0; #if defined (TRACING) + // No need to dmalloc huge memory region if we're not going to re-play + if (!trace_playback()){ + status = new_parse(&cfile, file, NULL, 0, filename, 0); + goto noreplay; + }; flen = lseek (file, (off_t)0, SEEK_END); if (flen < 0) { boom: @@ -174,6 +179,7 @@ isc_result_t read_conf_file (const char *filename, struct group *group, #else status = new_parse(&cfile, file, NULL, 0, filename, 0); #endif + noreplay: if (status != ISC_R_SUCCESS || cfile == NULL) return status; diff --git a/server/confpars.c b/server/confpars.c index 3aecd05..5be4ab1 100644 --- a/server/confpars.c +++ b/server/confpars.c @@ -176,6 +176,7 @@ isc_result_t read_conf_file (const char *filename, struct group *group, if (trace_record ()) trace_write_packet (ttype, ulen + tflen + 1, dbuf, MDL); status = new_parse(&cfile, -1, fbuf, ulen, filename, 0); /* XXX */ + dfree(dbuf, MDL); #else status = new_parse(&cfile, file, NULL, 0, filename, 0); #endif @@ -188,9 +189,6 @@ isc_result_t read_conf_file (const char *filename, struct group *group, else status = conf_file_subparse (cfile, group, group_type); end_parse (&cfile); -#if defined (TRACING) - dfree (dbuf, MDL); -#endif return status; }
Hello Pavel: Thanks for submitting the patch for this. We do not get a lot if issues reported against playback, largely because only our most sophisticated users employ it. I've marked it for inclusion in 4.4.2. We have not yet decided on a release date for it. Regards, Thomas Markwalder ISC Software Engineering
From: "Pavel Zhukov" <pzhukov@redhat.com>
Date: Wed, 29 Aug 2018 15:00:13 +0200
Subject: Re: [ISC-Bugs #48110] PATCH: Do not ;load leases into memory if replay is not needed
To: "Thomas Markwalder via RT" <dhcp-public@isc.org>
Hello Thomas, Just for clarification. I know that tracing is not very popular feature. But the problem is users are affected by the problem even if they don't employ tracing but dhcp is compiled with enabled tracing (which is by default unless --disable-tracing specified) and leases file is greater than 3GB. "Thomas Markwalder via RT" <dhcp-public@isc.org> writes: > Hello Pavel: > > Thanks for submitting the patch for this. We do not get a lot if > issues reported against playback, largely because only our most > sophisticated users employ it. I've marked it for inclusion in 4.4.2. > We have not yet decided on a release date for it. > > Regards, > > Thomas Markwalder > ISC Software Engineering -- PAVEL ZHUKOV SOFTWARE ENGINEER, RHCE, RHCVA Red Hat pzhukov@redhat.com IM: IRC: landgraf
Hi Pavel: Yes, upon closer inspection I did notice that after my initial reply to you. I can only surmise that 3G lease files are not all that common or we would have had complaints of this more frequently. Regards, Thaoms On Wed Aug 29 13:00:20 2018, pzhukov@redhat.com wrote: > Hello Thomas, > > Just for clarification. > I know that tracing is not very popular feature. But the problem is > users are affected by the problem even if they don't employ tracing but > dhcp is compiled with enabled tracing (which is by default unless > --disable-tracing specified) and leases file is greater than 3GB. > > "Thomas Markwalder via RT" <dhcp-public@isc.org> writes: > > > Hello Pavel: > > > > Thanks for submitting the patch for this. We do not get a lot if > > issues reported against playback, largely because only our most > > sophisticated users employ it. I've marked it for inclusion in 4.4.2. > > We have not yet decided on a release date for it. > > > > Regards, > > > > Thomas Markwalder > > ISC Software Engineering >