Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 1223045 - glob in threads is broken
glob in threads is broken
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: perl (Show other bugs)
7.1
All All
medium Severity medium
: rc
: ---
Assigned To: Petr Šabata
Martin Kyral
Lenka Špačková
https://rt.perl.org/Public/Bug/Displa...
: Patch
Depends On:
Blocks: 1203710 1313485 1289025 1295829
  Show dependency treegraph
 
Reported: 2015-05-19 12:46 EDT by Paulo Andrade
Modified: 2016-11-03 20:15 EDT (History)
5 users (show)

See Also:
Fixed In Version: perl-5.16.3-287.el7
Doc Type: Release Note
Doc Text:
Perl interpreter no longer crashes when using glob() with a threaded program Previously, when calling the Perl glob() function after spawning a thread, the Perl interpreter terminated unexpectedly with a segmentation fault. An upstream patch has been applied to clone glob() interpreter-wide data, and using Perl glob() with a threaded program now works as expected.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-11-03 20:15:43 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
File::Glob: Dup glob state in CLONE() (4.55 KB, patch)
2015-09-02 11:43 EDT, Petr Šabata
no flags Details | Diff


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:2191 normal SHIPPED_LIVE perl bug fix update 2016-11-03 09:19:19 EDT

  None (edit)
Description Paulo Andrade 2015-05-19 12:46:32 EDT
Upstream bug report:
https://rt.perl.org/Public/Bug/Display.html?id=119897

Upstream patch:
http://perl5.git.perl.org/perl.git/commitdiff_plain/facf34e?hp=ce3470dcce263170c48127c11bb2a47ca92f2616

For easier visualization, and cut&paste, reproducer
repeated here:

---8<---
#!/usr/bin/perl
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();
}
---8<---
Comment 3 Petr Šabata 2015-09-02 11:43:33 EDT
Created attachment 1069481 [details]
File::Glob: Dup glob state in CLONE()

Backport of the proposed patch for 5.16.3.
Comment 5 Petr Šabata 2016-03-02 10:04:58 EST
Pushed as perl-5.16.3-287.el7.
Comment 12 errata-xmlrpc 2016-11-03 20:15:43 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2016-2191.html

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