Reported by Pavel Březina <pbrezina@redhat.com>. From the Samba-technical list: From: Pavel Březina <pbrezina@redhat.com> To: samba-technical@lists.samba.org Subject: tevent memory leak? User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 Hi, we are dealing with user-reported memory leak in sssd and I can see in talloc report that there are ~140k if struct sigaction: struct tevent_sig_state contains 21149312 bytes in 139123 blocks (ref 6) 0x7f0b97781990 struct sigaction contains 152 bytes in 1 blocks (ref 0) 0x7f0b9c1d9f10 struct sigaction contains 152 bytes in 1 blocks (ref 0) 0x7f0b9c195f80 struct sigaction contains 152 bytes in 1 blocks (ref 0) 0x7f0b9c195e80 struct sigaction contains 152 bytes in 1 blocks (ref 0) 0x7f0b9c195d80 ... Looking into tevent code, it comes from tevent_common_add_signal(): sig_state->oldact[signum] = talloc(sig_state, struct sigaction); if (sig_state->oldact[signum] == NULL) { talloc_free(se); return NULL; } But it is nowhere freed. I would expect it to be freed in signal destructor after restoring the original sigaction. Is it intentional or a bug? ------------------------------------------------------------- Patch to follow.
Created attachment 11849 [details] git-am fix for 4.4.0, 4.3.next, 4.2.next. Cherry-picked from master.
Comment on attachment 11849 [details] git-am fix for 4.4.0, 4.3.next, 4.2.next. We need to backport tevent-0.9.28 completely. I'll do that tomorrow...
Fixed in tevent-0.9.28