Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1223045

Summary: glob in threads is broken
Product: Red Hat Enterprise Linux 7 Reporter: Paulo Andrade <pandrade>
Component: perlAssignee: Petr Šabata <psabata>
Status: CLOSED ERRATA QA Contact: Martin Kyral <mkyral>
Severity: medium Docs Contact: Lenka Špačková <lkuprova>
Priority: medium    
Version: 7.1CC: isenfeld, mkyral, ovasik, ppisar, psabata
Target Milestone: rcKeywords: Patch
Target Release: ---   
Hardware: All   
OS: All   
URL: https://rt.perl.org/Public/Bug/Display.html?id=117823
Whiteboard:
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-04 00:15:43 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1203710, 1289025, 1295829, 1313485    
Attachments:
Description Flags
File::Glob: Dup glob state in CLONE() none

Description Paulo Andrade 2015-05-19 16:46:32 UTC
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 15:43:33 UTC
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 15:04:58 UTC
Pushed as perl-5.16.3-287.el7.

Comment 12 errata-xmlrpc 2016-11-04 00:15:43 UTC
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