Projet

Général

Profil

Bug #55510

Memory leak when using "dump" in Perl binding

Ajouté par Maxime Besson il y a presque 3 ans. Mis à jour il y a presque 3 ans.

Statut:
Nouveau
Priorité:
Normal
Assigné à:
-
Catégorie:
Binding perl
Version cible:
-
Début:
10 juillet 2021
Echéance:
% réalisé:

0%

Temps estimé:
Patch proposed:
Non
Planning:
Non

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.


Fichiers

leak.c (1,12 ko) leak.c A C test case that does not leak Maxime Besson, 10 juillet 2021 13:12
leak.pl (851 octets) leak.pl A Perl code that leaks. Comment the "dump" call to stop it from leaking Maxime Besson, 10 juillet 2021 13:12

Historique

#1

Mis à jour par Benjamin Dauvergne il y a presque 3 ans

  • Assigné à Benjamin Dauvergne supprimé

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

Mis à jour par Clément Oudot il y a presque 3 ans

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

Mis à jour par Maxime Besson il y a presque 3 ans

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

Mis à jour par Benjamin Dauvergne il y a presque 3 ans

Ok, sorry for the rant.

Formats disponibles : Atom PDF