Bug 958821 - Threaded glob segfaults
Summary: Threaded glob segfaults
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: perl
Version: 19
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jitka Plesnikova
QA Contact: Fedora Extras Quality Assurance
URL: https://rt.perl.org:443/rt3/Ticket/Di...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-05-02 13:10 UTC by Petr Pisar
Modified: 2015-01-12 06:19 UTC (History)
11 users (show)

Fixed In Version: perl-5.18.2-289.fc20
Clone Of:
Environment:
Last Closed: 2015-01-12 06:19:09 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Petr Pisar 2013-05-02 13:10:13 UTC
Since 5.16.0, perl segfaults when using glob in multi-threaded environment. This has been reported to upstream as <https://rt.perl.org:443/rt3/Ticket/Display.html?id=117823>. Tests case:

use warnings;
use strict;

use threads;
use threads::shared;

my $nthread = 20;

sub work {
    foreach (1..10000) {
        my @files = <*.supp>;
    }
}

my @threads;
foreach my $i (1..$nthread) {
    push @threads, threads->create(\&work);
}

foreach my $t (@threads) {
    $t->join();
}

Comment 1 Fedora Admin XMLRPC Client 2013-08-12 11:53:12 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 2 Petr Pisar 2013-09-25 09:33:48 UTC
The fix is emerging in <https://rt.perl.org/rt3/Public/Bug/Display.html?id=119897>.

Comment 3 Petr Pisar 2013-10-02 07:31:26 UTC
Upstream fix is in blead now:

commit facf34ef484d62d15b2da11ee03d01942a22ff15
Author: Brian Fraser <fraserbn>
Date:   Sat Sep 21 03:19:52 2013 -0300

    File::Glob: Dup glob state in CLONE()
    
    This solves [perl #119897] and [perl #117823], and restores the
    behavior of glob() in conjunction with threads of 5.14 and older.
    
    Since 5.16, code that used glob() inside a thread had been
    unintentionally sharing state between threads, which lead to things
    like this crashing and failing assertions:
    
    ./perl -Ilib -Mthreads -e 'scalar glob("*"); threads->create(sub { glob("*")

Comment 4 Fedora End Of Life 2013-12-21 15:30:29 UTC
This message is a reminder that Fedora 18 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 18. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '18'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 18's end of life.

Thank you for reporting this issue and we are sorry that we may not be 
able to fix it before Fedora 18 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior to Fedora 18's end of life.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 5 Petr Pisar 2014-01-02 06:58:37 UTC
Issue in F19 too. We have patch which should be applied.

Comment 6 Jitka Plesnikova 2014-03-06 09:16:51 UTC
The fix has been in 5.18.2 (perl-5.18.2-289.fc20).

Comment 7 Fedora End Of Life 2015-01-09 22:06:37 UTC
This message is a notice that Fedora 19 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 19. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained. Approximately 4 (four) weeks from now this bug will
be closed as EOL if it remains open with a Fedora 'version' of '19'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 19 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.


Note You need to log in before you can comment on or make changes to this bug.