[xml/sgml-pkgs] Bug#649745: closed by Mike Hommey <mh at glandium.org> (Re: Bug#649745: libxml2: memory leak when use xmlDocDumpFormatMemoryEnc in a multithread daemon)

olivier chirossel olivier.chirossel at gmail.com
Wed Nov 23 20:02:26 UTC 2011


Thank for your reply but :

I put
             xmlInitParser();

at the begining
and
             xmlCleanupThreads();
             xmlCleanupParser();
just before exit;


when i make a test with valgrind  i do a test with 1 request and another
with 5 requests and compare valgrind output.
i'm oblige for the moment to use 2.6.x version of libxml2 ...

Regards

Olivier




On Wed, Nov 23, 2011 at 7:30 PM, Debian Bug Tracking System <
owner at bugs.debian.org> wrote:

> This is an automatic notification regarding your Bug report
> which was filed against the libxml2 package:
>
> #649745: libxml2: memory leak when use xmlDocDumpFormatMemoryEnc in a
> multithread daemon
>
> It has been closed by Mike Hommey <mh at glandium.org>.
>
> Their explanation is attached below along with your original report.
> If this explanation is unsatisfactory and you have not received a
> better one in a separate message then please contact Mike Hommey <
> mh at glandium.org> by
> replying to this email.
>
>
> --
> 649745: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=649745
> Debian Bug Tracking System
> Contact owner at bugs.debian.org with problems
>
>
> ---------- Forwarded message ----------
> From: Mike Hommey <mh at glandium.org>
> To: olivier chirossel <olivier.chirossel at gmail.com>,
> 649745-done at bugs.debian.org
> Date: Wed, 23 Nov 2011 19:27:08 +0100
> Subject: Re: [xml/sgml-pkgs] Bug#649745: libxml2: memory leak when use
> xmlDocDumpFormatMemoryEnc in a multithread daemon
> On Wed, Nov 23, 2011 at 07:10:19PM +0100, olivier chirossel wrote:
> > Package: libxml2
> > Version: 2.7.8.dfsg-5
> > Severity: important
> >
> > Dear Maintainer,
> > *** Please consider answering these questions, where appropriate ***
> >
> >    * What led up to the situation?
> >    * What exactly did you do (or not do) that was effective (or
> >      ineffective)?
> >    * What was the outcome of this action?
> >    * What outcome did you expect instead?
> >
> > *** End of the template - remove these lines ***
> >
> >
> > -- System Information:
> > Debian Release: wheezy/sid
> >   APT prefers unstable
> >   APT policy: (500, 'unstable')
> > Architecture: amd64 (x86_64)
> >
> > Kernel: Linux 3.0.0-1-amd64 (SMP w/2 CPU cores)
> > Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8) (ignored:
> LC_ALL set to fr_FR.UTF-8)
> > Shell: /bin/sh linked to /bin/dash
> >
> > Versions of packages libxml2 depends on:
> > ii  libc6   2.13-21
> > ii  zlib1g  1:1.2.3.4.dfsg-3
> >
> > Versions of packages libxml2 recommends:
> > ii  xml-core  0.13
> >
> > libxml2 suggests no packages.
> >
> > -- no debconf information
> >
> > valgrind trace
> >
> > ==9688== 968 bytes in 1 blocks are definitely lost in loss record 35 of
> 63
> > ==9688==    at 0x4C2779D: malloc (in
> /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
> > ==9688==    by 0x50F2D11: xmlGetGlobalState (threads.c:584)
> > ==9688==    by 0x50F21B4: __xmlDefaultBufferSize (globals.c:814)
> > ==9688==    by 0x50A4A52: xmlBufferCreate (tree.c:6870)
> > ==9688==    by 0x50AB89C: xmlAllocOutputBuffer (xmlIO.c:2320)
> > ==9688==    by 0x5158382: xmlDocDumpFormatMemoryEnc (xmlsave.c:2286)
> > ==9688==    by 0x416935: admin_function (admin.c:205)
> > ==9688==    by 0x4E33B3F: start_thread (pthread_create.c:304)
>
> That wouldn't happen if your program used xmlCleanupThreads at the end,
> which it should.
>
> Mike
>
>
>
> ---------- Forwarded message ----------
> From: olivier chirossel <olivier.chirossel at gmail.com>
> To: Debian Bug Tracking System <submit at bugs.debian.org>
> Date: Wed, 23 Nov 2011 19:10:19 +0100
> Subject: libxml2: memory leak when use xmlDocDumpFormatMemoryEnc in a
> multithread daemon
> Package: libxml2
> Version: 2.7.8.dfsg-5
> Severity: important
>
> Dear Maintainer,
> *** Please consider answering these questions, where appropriate ***
>
>   * What led up to the situation?
>   * What exactly did you do (or not do) that was effective (or
>     ineffective)?
>   * What was the outcome of this action?
>   * What outcome did you expect instead?
>
> *** End of the template - remove these lines ***
>
>
> -- System Information:
> Debian Release: wheezy/sid
>  APT prefers unstable
>  APT policy: (500, 'unstable')
> Architecture: amd64 (x86_64)
>
> Kernel: Linux 3.0.0-1-amd64 (SMP w/2 CPU cores)
> Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8) (ignored:
> LC_ALL set to fr_FR.UTF-8)
> Shell: /bin/sh linked to /bin/dash
>
> Versions of packages libxml2 depends on:
> ii  libc6   2.13-21
> ii  zlib1g  1:1.2.3.4.dfsg-3
>
> Versions of packages libxml2 recommends:
> ii  xml-core  0.13
>
> libxml2 suggests no packages.
>
> -- no debconf information
>
> valgrind trace
>
> ==9688== 968 bytes in 1 blocks are definitely lost in loss record 35 of 63
> ==9688==    at 0x4C2779D: malloc (in
> /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
> ==9688==    by 0x50F2D11: xmlGetGlobalState (threads.c:584)
> ==9688==    by 0x50F21B4: __xmlDefaultBufferSize (globals.c:814)
> ==9688==    by 0x50A4A52: xmlBufferCreate (tree.c:6870)
> ==9688==    by 0x50AB89C: xmlAllocOutputBuffer (xmlIO.c:2320)
> ==9688==    by 0x5158382: xmlDocDumpFormatMemoryEnc (xmlsave.c:2286)
> ==9688==    by 0x416935: admin_function (admin.c:205)
> ==9688==    by 0x4E33B3F: start_thread (pthread_create.c:304)
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/debian-xml-sgml-pkgs/attachments/20111123/e21dc20e/attachment.html>


More information about the debian-xml-sgml-pkgs mailing list