ISC DHCP 4.2.0-P2 failover memory leak

sscdvp at gmail.com sscdvp at gmail.com
Wed Jan 12 18:58:06 UTC 2011


Hi.

It seems that at least ISC DHCP version 4.2.0-P2 has a memory leak when
being configured in failover mode and the failover partner is down.
The problem stays in omapip/connection.c when omapi_connect_list() calls for
omapi_connection_register() (while TRACING ifdef compiled in) which
allocates memory and never frees it.
When failover TCP connection is broken, DHCP tries to reconnect it every 90
secs. But because omapi_connection_object_t is referenced in
omapi_connections array, omapi_connection_destroy() is never called so every
new connection attempt creates new omapi_connection_object_t while the old
object remains. Futhermore every 10 iterations (10 reconnection attempts in
our case) omapi_connections array is extended leaking more and more memory
(see omapip/array.c omapi_array_set() routine) due to lack of support for
object dereferencing in omapip/array.c. My installation on Solaris 10
exhausts 2 MB every 24h while failover connection being inactive.

The attached patch (which solves the problem - both leaks) against 4.2.0-P2
is proposed.


Best regards,
Serghei Samsi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/dhcp-hackers/attachments/20110112/67eecfa1/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dhcp-4.2.0-P2-failover-twomemleaks.patch
Type: application/octet-stream
Size: 4946 bytes
Desc: not available
URL: <https://lists.isc.org/pipermail/dhcp-hackers/attachments/20110112/67eecfa1/attachment.obj>


More information about the dhcp-hackers mailing list