Skip Menu |
 

This queue is for tickets about the threads CPAN distribution.

Report information
The Basics
Id: 60460
Status: resolved
Priority: 0/
Queue: threads

People
Owner: Nobody in particular
Requestors: ppisar [...] redhat.com
Cc:
AdminCc:

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



Download (untitled) / with headers
text/plain 1.2k
When sending signal to thread that has undefined handler, the Perl interpreter segfaults in threads.so. The reproduced is attached. However if handler is defined for other signal than you send later, then it will not segfault. I thought it's bug in threads module, but I found it depends on perl include path: petr@dhcp-0-146:/tmp/threads-1.77-build/usr/lib64/perl5 $ find . ./threads.pm ./auto ./auto/threads ./auto/threads/.packlist ./auto/threads/threads.bs ./auto/threads/threads.so ./perllocal.pod petr@dhcp-0-146:/tmp/threads-1.77-build/usr/lib64/perl5 $ perl -I . /tmp/perl_thread_kill Perl exited with active threads: 1 running and unjoined 0 finished and unjoined 0 running and detached petr@dhcp-0-146:/tmp/threads-1.77-build/usr/lib64/perl5 $ perl -I $PWD /tmp/perl_thread_kill Segmentation fault I verified perl opened the same files using strace tool. I can reproduce it on x86_64 Fedora Linux distribution (perl-5.10.0, 5.10.1, 5.12.1 with threads 1.72, 1.75, 1.77), and on i586 in Debian (perl-5.10.1, threads-1.72). I think problem is in perl itself rather than threads module. Do you have any idea what's wrong? Can you reproduce it? Some debugging can be foun on <https://bugzilla.redhat.com/show_bug.cgi?id=622190>.
Subject: perl_thread_kill
Download perl_thread_kill
application/octet-stream 277b

Message body not shown because it is not plain text.

Subject: Thread segfault with no signal handler
Download (untitled) / with headers
text/plain 212b
On Wed Aug 18 05:18:26 2010, ppisar wrote: Show quoted text
> When sending signal to thread that has undefined handler, the Perl > interpreter segfaults in threads.so. The reproduced is attached.
Fixed with v1.78 posted to CPAN.
Subject: Re: [rt.cpan.org #60460] Thread segfault with no signal handler
Date: Mon, 27 Sep 2010 17:39:53 +0200
To: "Jerry D. Hedden via RT" <bug-threads [...] rt.cpan.org>
From: Petr Pisar <ppisar [...] redhat.com>
Download (untitled) / with headers
text/plain 754b
On Wed, Sep 22, 2010 at 10:05:51PM -0400, Jerry D. Hedden via RT wrote: Show quoted text
> Fixed with v1.78 posted to CPAN.
Unfortunatelly it does not seem so: t/kill2.t .......... 1/3 # PROG: # use threads; # my $test = sub { # $SIG{'STOP'} = sub { threads->exit() }; # while(1) { sleep(1) } # }; # my $thr = threads->create($test); # threads->yield(); # $thr->detach(); # eval { # $thr->kill('STOP'); # }; # print((! $@) ? 'ok' : 'not ok'); # EXPECTED: # ok # GOT: # not ok # STATUS: 0 # Failed at t/kill2.t line 51 t/kill2.t .......... Failed 1/3 subtests Tested with perl v5.10.1 and v5.12.2 on x86_64 (Fedora 13, Fedora 14). What perl version do you use or which data do you need from me? -- Petr
Subject: Re: [rt.cpan.org #60460] Thread segfault with no signal handler
Date: Mon, 27 Sep 2010 11:51:56 -0400
To: bug-threads [...] rt.cpan.org
From: "Jerry D. Hedden" <jdhedden [...] cpan.org>
This is an issue with the tests and not the code. I fixed them with v1.79. Try that. On Mon, Sep 27, 2010 at 11:40, Petr Pisar via RT <bug-threads@rt.cpan.org> wrote: Show quoted text
>       Queue: threads >  Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=60460 > > > On Wed, Sep 22, 2010 at 10:05:51PM -0400, Jerry D. Hedden via RT wrote:
>> Fixed with v1.78 posted to CPAN.
> > Unfortunatelly it does not seem so: > > t/kill2.t .......... 1/3 # PROG: > #     use threads; > #     my $test = sub { > #         $SIG{'STOP'} = sub { threads->exit() }; > #         while(1) { sleep(1) } > #     }; > #     my $thr = threads->create($test); > #     threads->yield(); > #     $thr->detach(); > #     eval { > #         $thr->kill('STOP'); > #     }; > #     print((! $@) ? 'ok' : 'not ok'); > # EXPECTED: > # ok > # GOT: > # not ok > # STATUS: 0 > # Failed at t/kill2.t line 51 > t/kill2.t .......... Failed 1/3 subtests > > Tested with perl v5.10.1 and v5.12.2 on x86_64 (Fedora 13, Fedora 14). > > What perl version do you use or which data do you need from me? > > -- Petr > >
Subject: Re: [rt.cpan.org #60460] Thread segfault with no signal handler
Date: Fri, 8 Oct 2010 13:55:46 +0200
To: "Jerry D. Hedden via RT" <bug-threads [...] rt.cpan.org>
From: Petr Pisar <ppisar [...] redhat.com>
Download (untitled) / with headers
text/plain 459b
On Mon, Sep 27, 2010 at 11:52:36AM -0400, Jerry D. Hedden via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=60460 > > > This is an issue with the tests and not the code. I fixed them with > v1.79. Try that. >
Thanks. The test in 1.79 works for me. Also I'm not able to reproduce the `-I .' versus `-I $PWD' schism. I do not know why. Feel free to close this bug are resolved as the unhandled signal does not segfault perl anymore. -- Petr


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.