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 1107542 - Perl core-dumps if a hash is tied to SDBM_File before spawning a thread
Summary: Perl core-dumps if a hash is tied to SDBM_File before spawning a thread
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: perl
Version: 7.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: rc
: ---
Assignee: Petr Pisar
QA Contact: Martin Kyral
URL: https://rt.perl.org/Ticket/Display.ht...
Whiteboard:
Depends On:
Blocks: 1113520
TreeView+ depends on / blocked
 
Reported: 2014-06-10 07:26 UTC by Petr Pisar
Modified: 2015-03-05 07:55 UTC (History)
5 users (show)

Fixed In Version: perl-5.16.3-284.el7
Doc Type: Bug Fix
Doc Text:
Cause: Spawning threads after tying a variable to an SDBM database using SDBM_File Perl module. Consequence: Perl interpreter crashes when terminating Perl threads. Fix: GDBM_File, NDBM_File, ODBM_File, and SDBM_File Perl modules have been modified to destroy their objects only from thread context which created the objects. Result: GDBM_File, NDBM_File, ODBM_File, and SDBM_File object destructors are thread-safe now. Please note that it does not mean that any other operations on the objects can be called from other threads. The GDBM_File, NDBM_File, ODBM_File, and SDBM_File Perl modules remain thread-unsafe in general.
Clone Of: 1104827
: 1107543 1107728 (view as bug list)
Environment:
Last Closed: 2015-03-05 07:55:19 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Proposed fix rebased to 5.16.3 (5.92 KB, patch)
2014-06-10 07:55 UTC, Petr Pisar
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 905703 0 None None None Never
Red Hat Product Errata RHBA-2015:0338 0 normal SHIPPED_LIVE perl bug fix update 2015-03-05 12:22:38 UTC

Description Petr Pisar 2014-06-10 07:26:57 UTC
+++ This bug was initially created as a clone of Bug #1104827 +++

Description of problem:

Perl script using SDBM_File module is core dumping. Seems to match this upstream bug:  https://rt.perl.org/Public/Bug/Display.html?id=61912#txn-515026

[...]

Steps to Reproduce:

Create reproducer test script sdbm_test.pl containing the following lines, as described in the upstream bug report:

	#!/usr/bin/perl
	
	use strict;
	use Fcntl;
	use SDBM_File;
	use threads;
	use threads::shared;
	
	my %dbtest;
	tie(%dbtest, 'SDBM_File', "test.db", O_RDWR|O_CREAT, 0666);
	
	for (1 .. 2)
	{
	        my $thr = threads->new(\&testThread, $_);
	        $thr->detach();
	}
	sleep 4;
	
	sub testThread
	{
	        my $n = shift;
	        print "thread #" . $n . " started\n";
	}

Make script executable and run which produces the following output:

	[root@util6vm ~]# chmod u+x sdbm_test.pl 
	[root@util6vm ~]# ./sdbm_test.pl 

Expected results:

No errors.

Actual results:

	thread #1 started
	thread #2 started
	*** glibc detected *** /usr/bin/perl: double free or corruption (out): 0x0000000000e2c2c0 ***
	======= Backtrace: =========
	/lib64/libc.so.6[0x3d2ca76166]
	/lib64/libc.so.6[0x3d2ca78c93]
	/usr/lib64/perl5/auto/SDBM_File/SDBM_File.so(XS_SDBM_File_DESTROY+0xc0)[0x7f9d58fb06f0]

[...]

--- Additional comment from Petr Pisar on 2014-06-05 05:56:58 GMT ---

This happens with any perl, even the development version.

----

RHEL-7 (perl-5.16.3-283.el7) is affected.

Comment 1 Petr Pisar 2014-06-10 07:55:46 UTC
Created attachment 907089 [details]
Proposed fix rebased to 5.16.3

Comment 2 Petr Pisar 2014-06-13 08:00:33 UTC
Automated test attached to bug #1104827.

Comment 8 errata-xmlrpc 2015-03-05 07:55:19 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-2015-0338.html


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