Debian Bug report logs - #568607
libogg-vorbis-perl: dup syscall yields fd leak

version graph

Package: libogg-vorbis-perl; Maintainer for libogg-vorbis-perl is (unknown);

Reported by: Vincent Lefevre <vincent@vinc17.net>

Date: Sat, 6 Feb 2010 03:36:02 UTC

Severity: important

Tags: patch

Found in version libogg-vorbis-perl/0.05.ds1-1+b1

Fixed in version 0.05.ds1-1+rm

Done: Alexander Reichle-Schmehl <tolimar@debian.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Debian Perl Group <pkg-perl-maintainers@lists.alioth.debian.org>:
Bug#568607; Package libxml-libxml-perl. (Sat, 06 Feb 2010 03:36:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Vincent Lefevre <vincent@vinc17.net>:
New Bug report received and forwarded. Copy sent to Debian Perl Group <pkg-perl-maintainers@lists.alioth.debian.org>. (Sat, 06 Feb 2010 03:36:05 GMT) Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Vincent Lefevre <vincent@vinc17.net>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: libxml-libxml-perl: memory leak / segmentation fault
Date: Sat, 6 Feb 2010 04:32:37 +0100
Package: libxml-libxml-perl
Version: 1.70.ds-1
Severity: important

I have a script that uses XML::LibXML that takes more and more memory
and ends up with a segmentation fault (before the memory is exhausted,
though).

Note: I have the same memory leak problem under Mac OS X (with
perl 5.8 -- so, perl 5.10 is not the cause) without the segmentation
fault, while I had no such problems in the past.

If this is not a known bug, I'll have do to more tests, but it will be
a bit difficult to produce a simple testcase.

-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.31-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=POSIX, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages libxml-libxml-perl depends on:
ii  libc6                   2.10.2-5         Embedded GNU C Library: Shared lib
ii  libxml-namespacesupport 1.09-3           Perl module for supporting simple 
ii  libxml-sax-perl         0.96+dfsg-2      Perl module for using and building
ii  libxml2                 2.7.6.dfsg-2+b1  GNOME XML library
ii  perl                    5.10.1-9         Larry Wall's Practical Extraction 
ii  perl-base [perlapi-5.10 5.10.1-9         minimal Perl system
ii  zlib1g                  1:1.2.3.4.dfsg-3 compression library - runtime

libxml-libxml-perl recommends no packages.

libxml-libxml-perl suggests no packages.

-- no debconf information




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Perl Group <pkg-perl-maintainers@lists.alioth.debian.org>:
Bug#568607; Package libxml-libxml-perl. (Sat, 06 Feb 2010 21:03:08 GMT) Full text and rfc822 format available.

Acknowledgement sent to Vincent Lefevre <vincent@vinc17.net>:
Extra info received and forwarded to list. Copy sent to Debian Perl Group <pkg-perl-maintainers@lists.alioth.debian.org>. (Sat, 06 Feb 2010 21:03:08 GMT) Full text and rfc822 format available.

Message #10 received at 568607@bugs.debian.org (full text, mbox):

From: Vincent Lefevre <vincent@vinc17.net>
To: 568607@bugs.debian.org
Subject: libogg-vorbis-perl: dup syscall yields fd leak
Date: Sat, 6 Feb 2010 21:59:24 +0100
reassign 568607 libogg-vorbis-perl
found 568607 libogg-vorbis-perl/0.05.ds1-1+b1
thanks

On 2010-02-06 04:32:37 +0100, Vincent Lefevre wrote:
> I have a script that uses XML::LibXML that takes more and more memory
> and ends up with a segmentation fault (before the memory is exhausted,
> though).
> 
> Note: I have the same memory leak problem under Mac OS X (with
> perl 5.8 -- so, perl 5.10 is not the cause) without the segmentation
> fault, while I had no such problems in the past.
> 
> If this is not a known bug, I'll have do to more tests, but it will be
> a bit difficult to produce a simple testcase.

In fact it seems that the problem (at least the segmentation fault)
comes from libogg-vorbis-perl.

With the following testcase, if I provide any (non-corrupt) ogg file
as an argument, I get a segmentation fault after the number 1021 is
printed. Actually the cause is that a file descriptor is created by
the dup syscall at each iteration and is never closed, as shown by
strace.

----------------------------------------
#!/usr/bin/env perl

use strict;
use Ogg::Vorbis;

my $oggfile = shift;
my $ctr = 0;
while (1)
  {
    print ++$ctr, "\n";
    open OGG, '<', $oggfile or die;
    my $ogg = Ogg::Vorbis->new;
    $ogg->open(*OGG);
    my $com = $ogg->comment;
    close OGG or die;
  }
----------------------------------------

-- 
Vincent Lefèvre <vincent@vinc17.net> - Web: <http://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / Arénaire project (LIP, ENS-Lyon)




Bug reassigned from package 'libxml-libxml-perl' to 'libogg-vorbis-perl'. Request was from Vincent Lefevre <vincent@vinc17.net> to control@bugs.debian.org. (Sat, 06 Feb 2010 21:03:11 GMT) Full text and rfc822 format available.

Bug No longer marked as found in versions libxml-libxml-perl/1.70.ds-1. Request was from Vincent Lefevre <vincent@vinc17.net> to control@bugs.debian.org. (Sat, 06 Feb 2010 21:03:12 GMT) Full text and rfc822 format available.

Bug Marked as found in versions libogg-vorbis-perl/0.05.ds1-1+b1. Request was from Vincent Lefevre <vincent@vinc17.net> to control@bugs.debian.org. (Sat, 06 Feb 2010 21:03:13 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Perl Group <pkg-perl-maintainers@lists.alioth.debian.org>:
Bug#568607; Package libogg-vorbis-perl. (Sat, 06 Feb 2010 21:12:12 GMT) Full text and rfc822 format available.

Acknowledgement sent to Vincent Lefevre <vincent@vinc17.net>:
Extra info received and forwarded to list. Copy sent to Debian Perl Group <pkg-perl-maintainers@lists.alioth.debian.org>. (Sat, 06 Feb 2010 21:12:12 GMT) Full text and rfc822 format available.

Message #21 received at 568607@bugs.debian.org (full text, mbox):

From: Vincent Lefevre <vincent@vinc17.net>
To: 568607@bugs.debian.org
Subject: Re: libogg-vorbis-perl: dup syscall yields fd leak
Date: Sat, 6 Feb 2010 22:08:32 +0100
retitle 568607 libogg-vorbis-perl: dup syscall yields fd leak




Changed Bug title to 'libogg-vorbis-perl: dup syscall yields fd leak' from 'libxml-libxml-perl: memory leak / segmentation fault' Request was from Vincent Lefevre <vincent@vinc17.net> to control@bugs.debian.org. (Sat, 06 Feb 2010 21:12:13 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Perl Group <pkg-perl-maintainers@lists.alioth.debian.org>:
Bug#568607; Package libogg-vorbis-perl. (Sat, 06 Feb 2010 23:00:08 GMT) Full text and rfc822 format available.

Acknowledgement sent to Vincent Lefevre <vincent@vinc17.net>:
Extra info received and forwarded to list. Copy sent to Debian Perl Group <pkg-perl-maintainers@lists.alioth.debian.org>. (Sat, 06 Feb 2010 23:00:08 GMT) Full text and rfc822 format available.

Message #28 received at 568607@bugs.debian.org (full text, mbox):

From: Vincent Lefevre <vincent@vinc17.net>
To: 568607@bugs.debian.org
Subject: Re: libogg-vorbis-perl: dup syscall yields fd leak
Date: Sat, 6 Feb 2010 23:48:39 +0100
On 2010-02-06 21:59:24 +0100, Vincent Lefevre wrote:
> With the following testcase, if I provide any (non-corrupt) ogg file
> as an argument, I get a segmentation fault after the number 1021 is
> printed. Actually the cause is that a file descriptor is created by
> the dup syscall at each iteration and is never closed, as shown by
> strace.

The dup is probably caused by Debian patch

  bts389571_give-ov_open-duplicate-handle.patch

which has:

+       dupfile = fdopen(dup(fileno(file)), "r");

-- 
Vincent Lefèvre <vincent@vinc17.net> - Web: <http://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / Arénaire project (LIP, ENS-Lyon)




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Perl Group <pkg-perl-maintainers@lists.alioth.debian.org>:
Bug#568607; Package libogg-vorbis-perl. (Sun, 07 Feb 2010 01:12:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Vincent Lefevre <vincent@vinc17.net>:
Extra info received and forwarded to list. Copy sent to Debian Perl Group <pkg-perl-maintainers@lists.alioth.debian.org>. (Sun, 07 Feb 2010 01:12:02 GMT) Full text and rfc822 format available.

Message #33 received at 568607@bugs.debian.org (full text, mbox):

From: Vincent Lefevre <vincent@vinc17.net>
To: 568607@bugs.debian.org
Subject: Re: libogg-vorbis-perl: dup syscall yields fd leak
Date: Sun, 7 Feb 2010 02:09:09 +0100
[Message part 1 (text/plain, inline)]
tags 568607 patch
thanks

Actually, $ogg->clear solves the problem. But then, the clear method
should be called when the object is destroyed. I've attached a patch.
This patch calls ov_clear directly, but this seems to work even when
ov_clear has already been called (doing $ogg->clear twice is allowed
and does the same thing anyway).

-- 
Vincent Lefèvre <vincent@vinc17.net> - Web: <http://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / Arénaire project (LIP, ENS-Lyon)
[bts568607_clear-at-destroy.patch (text/plain, attachment)]

Added tag(s) patch. Request was from Vincent Lefevre <vincent@vinc17.net> to control@bugs.debian.org. (Sun, 07 Feb 2010 01:12:04 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Perl Group <pkg-perl-maintainers@lists.alioth.debian.org>:
Bug#568607; Package libogg-vorbis-perl. (Sun, 07 Feb 2010 14:48:09 GMT) Full text and rfc822 format available.

Acknowledgement sent to Niko Tyni <ntyni@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian Perl Group <pkg-perl-maintainers@lists.alioth.debian.org>. (Sun, 07 Feb 2010 14:48:09 GMT) Full text and rfc822 format available.

Message #40 received at 568607@bugs.debian.org (full text, mbox):

From: Niko Tyni <ntyni@debian.org>
To: Vincent Lefevre <vincent@vinc17.net>, 568607@bugs.debian.org
Subject: Re: Bug#568607: libogg-vorbis-perl: dup syscall yields fd leak
Date: Sun, 7 Feb 2010 16:45:48 +0200
On Sun, Feb 07, 2010 at 02:09:09AM +0100, Vincent Lefevre wrote:
> tags 568607 patch
> thanks
> 
> Actually, $ogg->clear solves the problem. But then, the clear method
> should be called when the object is destroyed. I've attached a patch.
> This patch calls ov_clear directly, but this seems to work even when
> ov_clear has already been called (doing $ogg->clear twice is allowed
> and does the same thing anyway).

Nice, thanks.

However, I think this package (and libogg-vorbis-header-perl
too for that matter) should rather be removed from Debian as
it's clearly dead upstream and there are maintained alternatives
(libogg-vorbis-header-pureperl-perl and libogg-vorbis-decoder-perl)
available.

Ogg::Vorbis has been failing its test suite without the dup() patch
for a long time.

As you're clearly using Ogg::Vorbis, did you have a particular reason
for choosing it over the others? Is there something it can do and 
the others can't?

@pkg-perl: any opinions?
-- 
Niko Tyni   ntyni@debian.org




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Perl Group <pkg-perl-maintainers@lists.alioth.debian.org>:
Bug#568607; Package libogg-vorbis-perl. (Sun, 07 Feb 2010 16:54:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Vincent Lefevre <vincent@vinc17.net>:
Extra info received and forwarded to list. Copy sent to Debian Perl Group <pkg-perl-maintainers@lists.alioth.debian.org>. (Sun, 07 Feb 2010 16:54:04 GMT) Full text and rfc822 format available.

Message #45 received at 568607@bugs.debian.org (full text, mbox):

From: Vincent Lefevre <vincent@vinc17.net>
To: Niko Tyni <ntyni@debian.org>
Cc: 568607@bugs.debian.org
Subject: Re: Bug#568607: libogg-vorbis-perl: dup syscall yields fd leak
Date: Sun, 7 Feb 2010 17:51:04 +0100
On 2010-02-07 16:45:48 +0200, Niko Tyni wrote:
> As you're clearly using Ogg::Vorbis, did you have a particular reason
> for choosing it over the others? Is there something it can do and 
> the others can't?

The only reason is that I didn't know the other ones (I wonder whether
they existed when I started to use Ogg::Vorbis 6 years ago). I'll try
them.

-- 
Vincent Lefèvre <vincent@vinc17.net> - Web: <http://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / Arénaire project (LIP, ENS-Lyon)




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Perl Group <pkg-perl-maintainers@lists.alioth.debian.org>:
Bug#568607; Package libogg-vorbis-perl. (Sun, 07 Feb 2010 18:24:03 GMT) Full text and rfc822 format available.

Message #48 received at 568607@bugs.debian.org (full text, mbox):

From: Damyan Ivanov <dmn@debian.org>
To: 568607@bugs.debian.org
Subject: Re: Bug#568607: libogg-vorbis-perl: dup syscall yields fd leak
Date: Sun, 7 Feb 2010 20:20:33 +0200
[Message part 1 (text/plain, inline)]
-=| Niko Tyni, Sun, Feb 07, 2010 at 04:45:48PM +0200 |=-
> However, I think this package (and libogg-vorbis-header-perl
> too for that matter) should rather be removed from Debian as
> it's clearly dead upstream and there are maintained alternatives
> (libogg-vorbis-header-pureperl-perl and libogg-vorbis-decoder-perl)
> available.
> 
> Ogg::Vorbis has been failing its test suite without the dup() patch
> for a long time.
> 
> […]
> 
> @pkg-perl: any opinions?

Removing packages that aren't maintained upstream and for which there 
are alternatives looks like a win both for us and for our users.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Perl Group <pkg-perl-maintainers@lists.alioth.debian.org>:
Bug#568607; Package libogg-vorbis-perl. (Mon, 08 Feb 2010 01:09:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Vincent Lefevre <vincent@vinc17.net>:
Extra info received and forwarded to list. Copy sent to Debian Perl Group <pkg-perl-maintainers@lists.alioth.debian.org>. (Mon, 08 Feb 2010 01:09:03 GMT) Full text and rfc822 format available.

Message #53 received at 568607@bugs.debian.org (full text, mbox):

From: Vincent Lefevre <vincent@vinc17.net>
To: Niko Tyni <ntyni@debian.org>
Cc: 568607@bugs.debian.org
Subject: Re: Bug#568607: libogg-vorbis-perl: dup syscall yields fd leak
Date: Mon, 8 Feb 2010 02:06:08 +0100
On 2010-02-07 17:51:04 +0100, Vincent Lefevre wrote:
> On 2010-02-07 16:45:48 +0200, Niko Tyni wrote:
> > As you're clearly using Ogg::Vorbis, did you have a particular reason
> > for choosing it over the others? Is there something it can do and 
> > the others can't?
> 
> The only reason is that I didn't know the other ones (I wonder whether
> they existed when I started to use Ogg::Vorbis 6 years ago). I'll try
> them.

No problems with libogg-vorbis-header-pureperl-perl, which gives the
same results as libogg-vorbis-perl (in the way I use it in my script).

-- 
Vincent Lefèvre <vincent@vinc17.net> - Web: <http://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / Arénaire project (LIP, ENS-Lyon)




Reply sent to Alexander Reichle-Schmehl <tolimar@debian.org>:
You have taken responsibility. (Thu, 02 Sep 2010 09:36:08 GMT) Full text and rfc822 format available.

Notification sent to Vincent Lefevre <vincent@vinc17.net>:
Bug acknowledged by developer. (Thu, 02 Sep 2010 09:36:08 GMT) Full text and rfc822 format available.

Message #58 received at 568607-done@bugs.debian.org (full text, mbox):

From: Alexander Reichle-Schmehl <tolimar@debian.org>
To: 568607-done@bugs.debian.org, 568683-done@bugs.debian.org
Subject: Package got removed
Date: Thu, 2 Sep 2010 11:34:08 +0200
Version: 0.05.ds1-1+rm

Hi!

As the package got removed from Debian's archive (please see
http://bugs.debian.org/594445 for details) I hereby close these bug
reports.


Best Regards,
  Alexander




Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Fri, 01 Oct 2010 07:29:07 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sun Apr 20 23:53:07 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.