You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Rick Jansen <ri...@rockingstone.nl> on 2004/03/11 09:19:12 UTC

Segmentation fault when using threads

Hi,

I'm trying to run a little test script here under mod_perl.
When I request the script, all apache childs die with sig11:
[Thu Mar 11 09:04:39 2004] [notice] child pid 957 exit signal
Segmentation fault (11)
[Thu Mar 11 09:04:39 2004] [notice] child pid 1009 exit signal
Segmentation fault (11)
[Thu Mar 11 09:04:39 2004] [notice] child pid 1267 exit signal
Segmentation fault (11)
[Thu Mar 11 09:04:39 2004] [notice] child pid 1268 exit signal
Segmentation fault (11)
[Thu Mar 11 09:04:40 2004] [notice] child pid 1269 exit signal
Segmentation fault (11)
[Thu Mar 11 09:04:40 2004] [notice] child pid 1270 exit signal
Segmentation fault (11)
[Thu Mar 11 09:04:40 2004] [notice] child pid 1271 exit signal
Segmentation fault (11)
[Thu Mar 11 09:04:41 2004] [notice] child pid 1272 exit signal
Segmentation fault (11)
[Thu Mar 11 09:04:41 2004] [notice] child pid 1273 exit signal
Segmentation fault (11)
[Thu Mar 11 09:04:41 2004] [notice] child pid 1274 exit signal
Segmentation fault (11)
[Thu Mar 11 09:04:42 2004] [notice] child pid 1276 exit signal
Segmentation fault (11)

Here is the script in question:
#!/usr/bin/perl -w

use threads;
use strict;

print "Content-type: text/plain\n\n";

my $thread = threads->new(\&foo);
$thread->join();

sub foo {
	my $time = localtime();
	print "Hello at $time\n";
}

What could be causing this? I thought mod_perl was supposed to be
threads safe :|

I'm building a debugging-symbols enabled mod_perl atm so if there is the
need I can provide a stack backtrace later.

Kind regards,
Rick Jansen
-- 
Systems Administrator for Rockingstone IT, Netherlands.
PGP Public Key: http://www.rockingstone.nl/rick/pubkey.asc

Re: Segmentation fault when using threads

Posted by Rick Jansen <ri...@rockingstone.nl>.
The problem is fixed by upgrading to perl 5.8.3. I was using 5.8.0.

Rick

On Thu, Mar 11, 2004 at 12:26:48AM -0800, Stas Bekman wrote:
> Rick Jansen wrote:
> >Hi,
> >
> >I'm trying to run a little test script here under mod_perl.
> >When I request the script, all apache childs die with sig11:
> 
> Report problems: http://perl.apache.org/bugs/
> __________________________________________________________________
> Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
> http://stason.org/     mod_perl Guide ---> http://perl.apache.org
> mailto:stas@stason.org http://use.perl.org http://apacheweek.com
> http://modperlbook.org http://apache.org   http://ticketmaster.com
> 
> -- 
> Report problems: http://perl.apache.org/bugs/
> Mail list info: http://perl.apache.org/maillist/modperl.html
> List etiquette: http://perl.apache.org/maillist/email-etiquette.html

-- 
Systems Administrator for Rockingstone IT, Netherlands.
PGP Public Key: http://www.rockingstone.nl/rick/pubkey.asc

Re: Segmentation fault when using threads

Posted by Stas Bekman <st...@stason.org>.
Rick Jansen wrote:
> Hi,
> 
> I'm trying to run a little test script here under mod_perl.
> When I request the script, all apache childs die with sig11:

Report problems: http://perl.apache.org/bugs/
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html