[19014] in Kerberos_V5_Development

home help back first fref pref prev next nref lref last post

About Memory Leak of kinit with pkinit Plugin

daemon@ATHENA.MIT.EDU (Zhou Yang)
Mon Sep 22 11:32:00 2014

MIME-Version: 1.0
Date: Mon, 22 Sep 2014 16:17:05 +0800
Message-ID: <CAOn+XxCgwMBNd6pApFO_sk=c8WH7HA+eRNkNrBQXv9fAQMSD6w@mail.gmail.com>
From: Zhou Yang <sherice.911@gmail.com>
To: krbdev@mit.edu
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: krbdev-bounces@mit.edu

Dear Team,

I'm trying to transplant kinit (for AS, the lastest version *1.12.2*) into
a daemon program. But when I tested the stability of this feature (by
infinite loop), a memory leak problem was found. And there're some clues
below which may be helpful:

1. When I remove "*pkinit.so*", there will not be memory leak. So I guess
the problem is only associated with pkinit plugin.

2. I also tried to use *valgrind *to locate the problem (both my program
and standard kinit). And the main report is below:
        $valgrind kinit *username *(and then type the password)
                          ...

* 57,328 (176 direct, 57,152 indirect) bytes in 1 blocks are definitely
lost in loss record 568 of 568*

*    at 0x4C2AB80: malloc (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)*

*    by 0x6842D32: ???*

*    by 0x68C88EF: ???*

*    by 0x68CADD6: ???*

*    by 0x68CB0CB: ???*

*    by 0x68CAB0A: ???*

*    by 0x68CB34F: ???*

*    by 0x68CC3D8: ???*

*    by 0x65D0E00: ???*

*    by 0x65CAEB3: ???*

*    by 0x65C6D77: ???*

*    by 0x50DC9C9: k5_init_preauth_context (preauth2.c:154)*

    Here, the "*???*" in the middle may be derived from dlopen-ing shared
object, and I can't trace it deeply.

Would you please fix it ASAP? Thanks.

Best Regards,

Sherice
_______________________________________________
krbdev mailing list             krbdev@mit.edu
https://mailman.mit.edu/mailman/listinfo/krbdev

home help back first fref pref prev next nref lref last post