LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   dhcpd: double free or corruption (http://www.linuxquestions.org/questions/linux-newbie-8/dhcpd-double-free-or-corruption-732331/)

bobfromtx 06-11-2009 07:00 PM

dhcpd: double free or corruption
 
After dhcpd (dhcp-3.1.1) is restarted (and it functions well) a few times, it cannot come up because it is killed immediately due to a problem related to this message:

"dhcpd: *** glibc detected *** /usr/local/dhcp3/sbin/dhcpd: double free or corruption (out): 0x00000001200d8e00 ***"

Very likely it happens when dhcpd tries to read dhcpd.leases file. After the file is deleted and a new one is touched, dhcpd starts.

Could somebody tell me how to fix the bug or if there is a patch that fixes it?

Thanks a lot.
Bob

alan_ri 06-13-2009 04:50 AM

If you have searched LQ forums a little you would've find a
Quote:

Recent versions of Linux libc (later than 5.4.23) and GNU libc (2.x) include a malloc implementation which is tunable via environment variables. When MALLOC_CHECK_ is set, a special (less efficient) implementation is used which is designed to be tolerant against simple errors, such as double calls of free() with the same argument, or overruns of a single byte (off-by-one bugs). Not all such errors can be protected against, however, and memory leaks can result. If MALLOC_CHECK_ is set to 0, any detected heap corruption is silently ignored and an error message is not generated; if set to 1, the error message is printed on stderr, but the program is not aborted; if set to 2, abort() is called immediately, but the error message is not generated; if set to 3, the error message is printed on stderr and program is aborted. This can be useful because otherwise a crash may happen much later, and the true cause for the problem is then very hard to track down.
So,the
Code:

export MALLOC_CHECK_=0
should work for you.


All times are GMT -5. The time now is 11:38 AM.