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 1408168

Summary: tar hangs with --extract --xattrs --skip-old-files
Product: Red Hat Enterprise Linux 7 Reporter: Pavel Raiskup <praiskup>
Component: tarAssignee: Pavel Raiskup <praiskup>
Status: CLOSED ERRATA QA Contact: Vaclav Danek <vdanek>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.2CC: databases-maint, extras-qa, hhorak, kdudka, ovasik, pkubat, praiskup, psklenar, vdanek
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: tar-1.26-33.el7 Doc Type: Bug Fix
Doc Text:
Cause: Tar mistakenly tried to extract extended attributes also for files which were not expected to be extracted. Consequence: Tar got stuck in busy loop, repeatedly trying to restore extended file attributes. Fix: The extended attribute extraction method was fixed to respect --skip-old-files option. Result: Tar now behaves properly with --xattrs and --skip-old-files.
Story Points: ---
Clone Of: 1399036 Environment:
Last Closed: 2018-04-10 11:30:49 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: 1399036    
Bug Blocks:    

Description Pavel Raiskup 2016-12-22 11:04:43 UTC
The busy hang is IMO worth fixing in RHEL 7, too.

+++ This bug was initially created as a clone of Bug #1399036 +++)

Steps to reproduce:

$ tar tvf a.tar --xattrs
-rw-------* praiskup/praiskup 0 2016-11-28 07:06 a
$ touch a
$ tar xf a.tar --xattrs --skip-old-files
[busy loop..]

Upstream report:
http://www.mail-archive.com/bug-tar@gnu.org/msg05184.html

Upstream fix:
597b0ae509 and ca9399d4e

Comment 1 Tomas Repik 2017-01-05 08:16:15 UTC
(In reply to Pavel Raiskup from comment #0)

Tried to reproduce it but I'm not able to.
I'm not sure how to get this output line:
> -rw-------* praiskup/praiskup 0 2016-11-28 07:06 a

expecialy the star in file mode.

Comment 2 Pavel Raiskup 2017-01-05 08:25:41 UTC
Some files in archive need to have xattrs set.

Comment 14 Vaclav Danek 2017-12-15 10:33:21 UTC
143: xattrs: basic functionality                     ok
144: xattrs: change directory with -C option         ok
146: xattrs: s/open/openat/ regression               ok
147: xattrs: keywords with '=' and '%'               ok
148: xattrs: exclude xattrs on create                ok
149: xattrs: xattrs and --skip-old-files             ok
=> Verified

Comment 17 errata-xmlrpc 2018-04-10 11:30:49 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://access.redhat.com/errata/RHBA-2018:0716