[krbdev.mit.edu #2862] Memory leak in krb5-libs up to 1.3.6

Tom Yu via RT rt-comment at krbdev.mit.edu
Mon Jan 10 20:12:01 EST 2005


>>>>> "Bojan" == Bojan Smojver via RT <rt-comment at krbdev.mit.edu> writes:

Bojan> Quoting Tom Yu via RT <rt-comment at krbdev.mit.edu>:
>> Do the above errors occur when running with one of the 1.4 beta
>> releases, or with the 1.3.6 release?

Bojan> This is Fedora Core 3 1.3.6-2 RPM.

krb5-1.3.x and earlier are known to have thread-safety issues.  Also,
I believe that the memory leak in the ccache code is still present in
krb5-1.3.6.

>> Do the invalid free() and double-free errors occur when you change the
>> code to not attempt to close an invalid ccache handle?

Bojan> Well, this is not actually my code (I never call any krb5
Bojan> functions from code).  It is whatever PostgreSQL 7.4.6 does
Bojan> when it closes the connection. So, I honestly wouldn't know.

I have looked at the code in postgresql-7.4.5 (I don't have 7.4.6
handy), as well as at the krb5 ccache code, and it seems that the
failure you're seeing is "impossible".  Since you appear to be running
a multi-threaded application, I strongly suggest that you try out the
krb5-1.4 beta release.  Releases prior to krb5-1.4 are known to have
thread-safety issues, which may be part of your problem.

>> Stack traces would be useful.

Bojan> OK. I'll run the whole thing inside gdb and I'll also make sure
Bojan> I have debugging symbols installed. This should give you a
Bojan> clearer picture where things are going wrong. It may take a few
Bojan> days for me to do that due to some other stuff I'm working on.

Does the new glibc give stack traces on double-free and other
memory-management error conditions if debugging symbols are available?
Or do you need to use something like valgrind?

---Tom



More information about the krb5-bugs mailing list