Memory Leak

62 views
Skip to first unread message

Amina MARIE

unread,
Jul 24, 2015, 3:50:09 AM7/24/15
to Unitex-GramLab
Bonjour,

J'ai identifié deux problèmes de fuites de mémoire sur Unitex donc je vous reporte l'anomalie:
Lors de l’exécution de Locate avec les paramètres classiques Valgrind me dit:

==3629== Memcheck, a memory error detector
==3629== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==3629== Using Valgrind-3.10.0.SVN and LibVEX; rerun with -h for copyright info
==3629==
 Command: ./Locate -t /tmp/tmp.snt
/opt/unitex/service_tnp/src/Graphs/main-fr.fst2 -a
/opt/unitex/service_tnp/src/Alphabet.txt -L -R --all -m
/opt/unitex/service_tnp/src/Dela/refprenom.bin -m
/opt/unitex/service_tnp/src/Dela/reftitre.bin -m
/opt/unitex/service_tnp/src/Dela/refpunctuation.bin -m
/opt/unitex/service_tnp/src/Dela/refparticule.bin -m
/opt/unitex/service_tnp/src/Dela/refcomplement.bin -b -Y -q utf8-no-bom
==3629==
==3629== Invalid read of size 4
==3629==    at 0x402B77: unitex::main_Locate(int, char* const*) (in /home/amarie/Projets/Web-Service/Unitex-Core/bin/Locate)
==3629==    by 0x5590EC4: (below main) (libc-start.c:287)
==3629==  Address 0x5c3a24c is 44 bytes inside a block of size 47 alloc'
d
==3629==    at 0x4C2AB80: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==3629==    by 0x55F7839: strdup (strdup.c:42)
==3629==    by 0x4034B3: unitex::main_Locate(int, char* const*) (in /home/amarie/Projets/Web-Service/Unitex-Core/bin/Locate)
==3629==    by 0x5590EC4: (below main) (libc-start.c:287)
==3629==
==3629== Invalid read of size 4
==3629==    at 0x402B61: unitex::main_Locate(int, char* const*) (in /home/amarie/Projets/Web-Service/Unitex-Core/bin/Locate)
==3629==    by 0x5590EC4: (below main) (libc-start.c:287)
==3629==  Address 0x5c3a3c0 is 144 bytes inside a block of size 145 alloc'd
==3629==    at 0x4C2CE8E: realloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==3629==    by 0x402BB2: unitex::main_Locate(int, char* const*) (in /home/amarie/Projets/Web-Service/Unitex-Core/bin/Locate)
==3629==    by 0x5590EC4: (below main) (libc-start.c:287)


Lors de l’exécution de Dico avec les paramètres classiques Valgrind me dit:

==3773== Memcheck, a memory error detector
==3773== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==3773== Using Valgrind-3.10.0.SVN and LibVEX; rerun with -h for copyright info
==3773== Command: ./Dico -t $:/opt/unitex/service_tnp/src/28/tmp.snt -q utf8-no-bom -a /opt/unitex/service_tnp/src/Alphabet.txt -m /opt/unitex/service_tnp/src/Dela/refprenom.bin -m /opt/unitex/service_tnp/src/Dela/reftitre.bin -m /opt/unitex/service_tnp/src/Dela/refpunctuation.bin -m /opt/unitex/service_tnp/src/Dela/refparticule.bin -m /opt/unitex/service_tnp/src/Dela/refcomplement.bin /opt/unitex/service_tnp/src/Dela/refprenom.bin /opt/unitex/service_tnp/src/Dela/reftitre.bin /opt/unitex/service_tnp/src/Dela/refpunctuation.bin /opt/unitex/service_tnp/src/Dela/refparticule.bin /opt/unitex/service_tnp/src/Dela/refcomplement.bin
==3773==
==3773== Invalid read of size 4
==3773==    at 0x402733: unitex::main_Dico(int, char* const*) (in /home/amarie/Projets/Web-Service/Unitex-Core/bin/Dico)
==3773==    by 0x5896EC4: (below main) (libc-start.c:287)
==3773==  Address 0x5c401cc is 44 bytes inside a block of size 47 alloc'
d
==3773==    at 0x4C2AB80: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==3773==    by 0x58FD839: strdup (strdup.c:42)
==3773==    by 0x40345A: unitex::main_Dico(int, char* const*) (in /home/amarie/Projets/Web-Service/Unitex-Core/bin/Dico)
==3773==    by 0x5896EC4: (below main) (libc-start.c:287)
==3773==
==3773== Invalid read of size 4
==3773==    at 0x40271E: unitex::main_Dico(int, char* const*) (in /home/amarie/Projets/Web-Service/Unitex-Core/bin/Dico)
==3773==    by 0x5896EC4: (below main) (libc-start.c:287)
==3773==  Address 0x5c40340 is 144 bytes inside a block of size 145 alloc'd
==3773==    at 0x4C2CE8E: realloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==3773==    by 0x402772: unitex::main_Dico(int, char* const*) (in /home/amarie/Projets/Web-Service/Unitex-Core/bin/Dico)
==3773==    by 0x5896EC4: (below main) (libc-start.c:287)

Merci

Amina

Amina MARIE

unread,
Jul 24, 2015, 8:13:32 AM7/24/15
to Unitex-GramLab, amina...@amabis.fr

L'origine du problème a été detecté,
Le fait d'avoir $:/opt/unitex/service_tnp/src/28/tmp.snt (qui existe..) comme fichier et non pas /opt/unitex/service_tnp/src/28/tmp.snt génère cette erreur..
Merci
Amina

Gilles Vollant

unread,
Jul 24, 2015, 8:14:59 AM7/24/15
to Amina MARIE, Unitex-GramLab

Ok, c’est un leak dans le système de fichier virtuel d’unitex alors

 

De : unitex-...@googlegroups.com [mailto:unitex-...@googlegroups.com] De la part de Amina MARIE
Envoyé : vendredi 24 juillet 2015 14:14
À : Unitex-GramLab
Cc : amina...@amabis.fr
Objet : [Unitex-GramLab] Re: Memory Leak

--
You received this message because you are subscribed to the Google Groups "Unitex-GramLab" group.
To unsubscribe from this group and stop receiving emails from it, send an email to unitex-gramla...@googlegroups.com.
To post to this group, send email to unitex-...@googlegroups.com.
Visit this group at http://groups.google.com/group/unitex-gramlab.
To view this discussion on the web visit https://groups.google.com/d/msgid/unitex-gramlab/436aa7e9-c306-494d-8a70-7159c235af3d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Gilles Vollant

unread,
Sep 23, 2015, 2:29:20 PM9/23/15
to Amina MARIE, Unitex-GramLab, Eric.L...@univ-paris-est.fr

 

En résumé, si il faut supprimer tous les fichiers du système de fichier virtuel $: (ou *) avant de quitter pour ne pas avoir d’alerte mémoire

 

De : unitex-...@googlegroups.com [mailto:unitex-...@googlegroups.com] De la part de Amina MARIE
Envoyé : vendredi 24 juillet 2015 14:14
À : Unitex-GramLab
Cc : amina...@amabis.fr
Objet : [Unitex-GramLab] Re: Memory Leak

 

--

Reply all
Reply to author
Forward
0 new messages