Skip Menu |
 

This queue is for tickets about the WWW-Curl CPAN distribution.

Report information
The Basics
Id: 37160
Status: rejected
Priority: 0/
Queue: WWW-Curl

People
Owner: Nobody in particular
Requestors: mark [...] hindley.org.uk
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Segfaults with db4.6
Date: Fri, 27 Jun 2008 09:33:02 +0100
To: bug-WWW-Curl [...] rt.cpan.org
From: Mark Hindley <mark [...] hindley.org.uk>
Download (untitled) / with headers
text/plain 471b
Hi, I maintain Debian apt-cacher which has recently started to use libwww-curl. Since upgrading to version 4.00 and libdb4.6 users (and I) have been getting intermittent segfaults. I haven't managed to nail down a minimal test case. Take a look at Debian bug http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=487789 I have no experience of debugging C/perl bindings, so you will have to tell me how to get the further info you require. Cheers, Mark -- Mark Hindley
Subject: Re: [rt.cpan.org #37160] Segfaults with db4.6
Date: Fri, 27 Jun 2008 17:01:06 +0200
To: "bug-WWW-Curl [...] rt.cpan.org" <bug-WWW-Curl [...] rt.cpan.org>
From: Balint Szilakszi <szbalint [...] cpan.org>
Hi Mark, Mark Hindley via RT wrote: Show quoted text
> Hi, > > I maintain Debian apt-cacher which has recently started to use > libwww-curl. > > Since upgrading to version 4.00 and libdb4.6 users (and I) have been > getting intermittent segfaults. I haven't managed to nail down a minimal > test case.
I've recently released WWW::Curl 4.01 through 4.04, these fix a bunch of bugs. Could you please install 4.04 from CPAN and check whether the issue still occurs? Show quoted text
> Take a look at Debian bug > http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=487789 > > I have no experience of debugging C/perl bindings, so you will have to > tell me how to get the further info you require.
At the moment the only known bug that I know about is duphandle not working correctly on some systems. I haven't seen intermittent segfaults with WWW::Curl yet, in my experience it is either hit or miss, depending on Perl version and platform. I've been slowly improving upon the situation though. If the bug exists in 4.04, then unfortunately it'll be pretty hard to track down, because it depends on some combination of perl, libcurl and WWW::Curl. For example, I'm running WWW::Curl in some pretty demanding environments, where a single process is making 200-300 thousand requests in a few hours' space. I haven't had a segfault yet. Since the latest release, I'm also testing with different combinations of perl and libcurl on debian sid. Btw, I've noticed that you've got this at line 1234 in the file apt-cacher2: $curl->setopt(CURLOPT_WRITEHEADER, [\$response, ($pkfdref ? 1 : 0)]); This parameter expects a filehandle, or a reference to a filehandle. I'm not sure what happens if an arrayref gets assigned, but things could get gravely messed up. In future WWW::Curl versions this will probably croak. Also, please note that WWW::Curl 4.01 fixed the bug where if something was not assigned to CURLOPT_WRITEHEADER, header content appeared on STDOUT. That is no longer the case, however if you do set a filehandle to WRITEHEADER, then you'll get the header output. Regards, Bálint Szilakszi
Subject: Re: [rt.cpan.org #37160] Segfaults with db4.6
Date: Fri, 27 Jun 2008 17:01:06 +0200
To: "bug-WWW-Curl [...] rt.cpan.org" <bug-WWW-Curl [...] rt.cpan.org>
From: Balint Szilakszi <szbalint [...] cpan.org>
Hi Mark, Mark Hindley via RT wrote: Show quoted text
> Hi, > > I maintain Debian apt-cacher which has recently started to use > libwww-curl. > > Since upgrading to version 4.00 and libdb4.6 users (and I) have been > getting intermittent segfaults. I haven't managed to nail down a minimal > test case.
I've recently released WWW::Curl 4.01 through 4.04, these fix a bunch of bugs. Could you please install 4.04 from CPAN and check whether the issue still occurs? Show quoted text
> Take a look at Debian bug > http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=487789 > > I have no experience of debugging C/perl bindings, so you will have to > tell me how to get the further info you require.
At the moment the only known bug that I know about is duphandle not working correctly on some systems. I haven't seen intermittent segfaults with WWW::Curl yet, in my experience it is either hit or miss, depending on Perl version and platform. I've been slowly improving upon the situation though. If the bug exists in 4.04, then unfortunately it'll be pretty hard to track down, because it depends on some combination of perl, libcurl and WWW::Curl. For example, I'm running WWW::Curl in some pretty demanding environments, where a single process is making 200-300 thousand requests in a few hours' space. I haven't had a segfault yet. Since the latest release, I'm also testing with different combinations of perl and libcurl on debian sid. Btw, I've noticed that you've got this at line 1234 in the file apt-cacher2: $curl->setopt(CURLOPT_WRITEHEADER, [\$response, ($pkfdref ? 1 : 0)]); This parameter expects a filehandle, or a reference to a filehandle. I'm not sure what happens if an arrayref gets assigned, but things could get gravely messed up. In future WWW::Curl versions this will probably croak. Also, please note that WWW::Curl 4.01 fixed the bug where if something was not assigned to CURLOPT_WRITEHEADER, header content appeared on STDOUT. That is no longer the case, however if you do set a filehandle to WRITEHEADER, then you'll get the header output. Regards, Bálint Szilakszi
Subject: Re: [rt.cpan.org #37160] Segfaults with db4.6
Date: Fri, 27 Jun 2008 17:55:00 +0100
To: Balint Szilakszi via RT <bug-WWW-Curl [...] rt.cpan.org>
From: Mark Hindley <mark [...] hindley.org.uk>
Download (untitled) / with headers
text/plain 2.2k
On Fri, Jun 27, 2008 at 11:40:26AM -0400, Balint Szilakszi via RT wrote: Show quoted text
> <URL: http://rt.cpan.org/Ticket/Display.html?id=37160 > > > Hi Mark, > > Mark Hindley via RT wrote:
> > Hi, > > > > I maintain Debian apt-cacher which has recently started to use > > libwww-curl. > > > > Since upgrading to version 4.00 and libdb4.6 users (and I) have been > > getting intermittent segfaults. I haven't managed to nail down a minimal > > test case.
> > I've recently released WWW::Curl 4.01 through 4.04, these fix a bunch of > bugs. Could you please install 4.04 from CPAN and check whether the > issue still occurs? >
> > Take a look at Debian bug > > http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=487789 > > > > I have no experience of debugging C/perl bindings, so you will have to > > tell me how to get the further info you require.
> > At the moment the only known bug that I know about is duphandle not > working correctly on some systems. > > I haven't seen intermittent segfaults with WWW::Curl yet, in my > experience it is either hit or miss, depending on Perl version and > platform. I've been slowly improving upon the situation though. > > If the bug exists in 4.04, then unfortunately it'll be pretty hard to > track down, because it depends on some combination of perl, libcurl and > WWW::Curl. For example, I'm running WWW::Curl in some pretty demanding > environments, where a single process is making 200-300 thousand requests > in a few hours' space. I haven't had a segfault yet. Since the latest > release, I'm also testing with different combinations of perl and > libcurl on debian sid.
I'll have a go. Show quoted text
> > Btw, I've noticed that you've got this at line 1234 in the file apt-cacher2: > > $curl->setopt(CURLOPT_WRITEHEADER, [\$response, ($pkfdref ? 1 : 0)]);
That has gone in my development version. Now switched to using WWW::Curl::Multi in a separate process so that I can get DNS caching to work across all requests. My initial hope had been to use Curl::Share. But I couldn't get it to work.Presumably if I used a single WWW::Curl::Share and then used a WWW::Curl::Easy handle in a forked process, the DNS cache in the parent wouldn't get updated and propagted to the next forked WWW::Curl::Easy Thanks, Mark
Download (untitled) / with headers
text/plain 156b
It looks like the apt-cacher problem was resolved. I don't see any indication that this problem is present in the current release, so I'm closing this bug.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.