Skip Menu |
 

This queue is for tickets about the Params-Classify CPAN distribution.

Report information
The Basics
Id: 72743
Status: open
Priority: 0/
Queue: Params-Classify

People
Owner: Nobody in particular
Requestors: jesse [...] paradisosolutions.com
Cc:
AdminCc:

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



Subject: XS breaks (for me in mod_perl)
Download (untitled) / with headers
text/plain 392b
Classify.xs breaks in mod_perl (at least that is where I experience it). I have tracked this down to using DateTime in two application modules. So they load DateTime::TimeZone::Locale which uses Class::Load which uses Module::Runtime which uses Params::Classify. Appearently this double loading causes the breakage. I solved the problem on my end by deleting the xs stuff forcing usage of .pm
CC: undisclosed-recipients: ;
Subject: Re: [rt.cpan.org #72743] XS breaks (for me in mod_perl)
Date: Sun, 27 Nov 2011 15:30:20 +0000
To: Jesse Shy via RT <bug-Params-Classify [...] rt.cpan.org>
From: Zefram <zefram [...] fysh.org>
Download (untitled) / with headers
text/plain 475b
Jesse Shy via RT wrote: Show quoted text
>Classify.xs breaks in mod_perl (at least that is where I experience it).
It works for me. I use Params::Classify heavily in my employer's codebase, the bulk of which runs under mod_perl, and we've never had trouble. In fact, I wrote the XS version of P:C, and later the custom-ops iteration of the XS, especially to support the performance requirements of that codebase. In what way does it break for you? What misbehaviour do you see? -zefram
Subject: Re: [rt.cpan.org #72743] XS breaks (for me in mod_perl)
Date: Mon, 28 Nov 2011 08:59:21 -0300
To: bug-Params-Classify [...] rt.cpan.org
From: Jesse Shy <jesse [...] paradisosolutions.com>
Sorry, I should have been more detailed: Specifically, the problem exists around line 629, I say around because sometime gdb shows apache hanging at line 629, 630 or 631. This appears to be a problem when DateTime gets used or even required (as I have tried it both ways) in two different application modules. I did find mention of this on Perl Monks. http://www.perlmonks.org/?node_id=886909 If you haven't seen this, you should probably ready it. Thanks. On Sun, Nov 27, 2011 at 12:30 PM, Zefram via RT < bug-Params-Classify@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=72743 > > > Jesse Shy via RT wrote:
> >Classify.xs breaks in mod_perl (at least that is where I experience it).
> > It works for me. I use Params::Classify heavily in my employer's > codebase, the bulk of which runs under mod_perl, and we've never > had trouble. In fact, I wrote the XS version of P:C, and later the > custom-ops iteration of the XS, especially to support the performance > requirements of that codebase. > > In what way does it break for you? What misbehaviour do you see? > > -zefram > >
CC: undisclosed-recipients: ;
Subject: Re: [rt.cpan.org #72743] XS breaks (for me in mod_perl)
Date: Mon, 28 Nov 2011 12:09:25 +0000
To: "jesse [...] paradisosolutions.com via RT" <bug-Params-Classify [...] rt.cpan.org>
From: Zefram <zefram [...] fysh.org>
Download (untitled) / with headers
text/plain 386b
The perlmonks thread explains that the problem is that Params::Classify isn't thread safe. This is indeed a fault in Params::Classify. I didn't bother to make it thread safe because it appeared that in practice no one was using threads. Your case is the first bug report I've had about any of my modules not being thread safe, and shows that I do actually need to fix this. -zefram
Subject: Re: [rt.cpan.org #72743] XS breaks (for me in mod_perl)
Date: Mon, 28 Nov 2011 09:19:39 -0300
To: bug-Params-Classify [...] rt.cpan.org
From: Jesse Shy <jesse [...] paradisosolutions.com>
Download (untitled) / with headers
text/plain 635b
Sorry to be the bearer of bad news man. Thanks for having put time into this. On Mon, Nov 28, 2011 at 9:09 AM, Zefram via RT < bug-Params-Classify@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=72743 > > > The perlmonks thread explains that the problem is that Params::Classify > isn't thread safe. This is indeed a fault in Params::Classify. I didn't > bother to make it thread safe because it appeared that in practice no > one was using threads. Your case is the first bug report I've had about > any of my modules not being thread safe, and shows that I do actually > need to fix this. > > -zefram > >
Download (untitled) / with headers
text/plain 1.1k
On Mon Nov 28 07:09:46 2011, zefram@fysh.org wrote: Show quoted text
> The perlmonks thread explains that the problem is that Params::Classify > isn't thread safe. This is indeed a fault in Params::Classify. I didn't > bother to make it thread safe because it appeared that in practice no > one was using threads. Your case is the first bug report I've had about > any of my modules not being thread safe, and shows that I do actually > need to fix this.
In practice, almost nobody is intentionally using threads. However forking servers on win32 (which is often true of web framework dev servers) and the mpm_winnt and mpm_worker apache modules tend to result in them using threads anyway. Of course the original reporter would likely get better performance and avoid all sorts of other hilarity by switching to mpm_prefork, but the bug still stands. That does however mean that you could consider simply disabling the XS version in every thread except for the first one the module is used in, since anybody using mpm_worker is likely suffering from far worse performance problems as a result of doing so than this would cause, and anybody on win32 already has plenty of other problems.
Download (untitled) / with headers
text/plain 430b
We've recently been having problems with the XS version of this module under mod_perl, but using mpm_prefork. Not sure if this is a related issue, or an entirely new one. The pure perl version works for us and we don't see any detectable performance changes. -- Ivan Kohler President and Head Geek, Freeside Internet Services, Inc. http://freeside.biz/ Debian GNU/Linux developer | CPAN author | cat person | ski addict


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.