Bug #55510

Memory leak when using "dump" in Perl binding

Added by Maxime Besson over 1 year ago. Updated over 1 year ago.

Binding perl
Target version:
Start date:
10 July 2021
Due date:
% Done:


Estimated time:
Patch proposed:


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 (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.


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



Updated by Benjamin Dauvergne over 1 year 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.


Updated by Clément Oudot over 1 year 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.


Updated by Maxime Besson over 1 year 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.


Updated by Benjamin Dauvergne over 1 year ago

Ok, sorry for the rant.

Also available in: Atom PDF