Project

General

Profile

Bug #55510

Memory leak when using "dump" in Perl binding

Added by Maxime Besson over 3 years ago. Updated about 3 years ago.

Status:
Nouveau
Priority:
Normal
Assignee:
-
Category:
Binding perl
Target version:
-
Start date:
10 July 2021
Due date:
% Done:

0%

Estimated time:
Patch proposed:
No
Planning:
No

Description

I use Lasso in the context of the LemonLDAP::NG SSO server. Some of our users notice memory leaks in long term processes, forcing us to periodically restart our processes.

I was able to track down one of these memory leaks to this part of the code:

            if ( $login->is_session_dirty ) {
                $self->logger->debug("Save Lasso session in session");
                $self->p->updateSession( $req,
                    { $self->lsDump => $login->get_session->dump },
                    $session_id );
            }

In particular, the ->dump call on a Lasso::Session object. But it seems like the same issue affects all Lasso types (Identity, etc.)

I have attached a simple reproduction script to this ticket, run leak.pl (against Lasso 2.7.0 for instance) and you will see memory climbing. Run the equivalent leak.c and you will not see any (obvious) leaks, so it seems like the issue comes from the perl binding itself. I have tried the python bindings, and it doesn't seem to be affected either.


Files

leak.c (1.12 KB) leak.c A C test case that does not leak Maxime Besson, 10 July 2021 01:12 PM
leak.pl (851 Bytes) leak.pl A Perl code that leaks. Comment the "dump" call to stop it from leaking Maxime Besson, 10 July 2021 01:12 PM

History

#1

Updated by Benjamin Dauvergne about 3 years ago

  • Assignee deleted (Benjamin Dauvergne)

If you need support on the perl binding, the best way would be to pay for it; until this time do not assign issue to me. Thank you.

#2

Updated by Clément Oudot about 3 years ago

Sorry for the assignement.

This issue report is not a support request. We found an issue in the Perl binding, which is used in LemonLDAP::NG, but maybe other softwares use the Perl binding and will face the same issue.

I understand this is a low priority, of course we are available to help resolving this issue.

#3

Updated by Maxime Besson about 3 years ago

Benjamin, your Redmine is configured to automatically assign new tickets in the "Bindings perl" category to you, I thought it was normal, so I did not remove the assignment, my apologies for the misunderstanding.

#4

Updated by Benjamin Dauvergne about 3 years ago

Ok, sorry for the rant.

Also available in: Atom PDF