Bug 1012075 - diff -Z hangs
diff -Z hangs
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: diffutils (Show other bugs)
19
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Tim Waugh
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-25 12:23 EDT by Eric Blake
Modified: 2013-11-10 02:49 EST (History)
4 users (show)

See Also:
Fixed In Version: diffutils-3.3-4.fc19
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1022417 (view as bug list)
Environment:
Last Closed: 2013-10-28 23:34:00 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)

  None (edit)
Description Eric Blake 2013-09-25 12:23:30 EDT
Description of problem:
I was trying to compare two files with mixed-mode line endings, and assumed that 'diff -Z' would ignore the trailing carriage returns and thus give me a sane diff.

Version-Release number of selected component (if applicable):
diffutils-3.3-1.fc19.x86_64

How reproducible:
100%

Steps to Reproduce:
1. $ diff -Z <(printf 'a\nb\n') <(printf 'a\nb\n'); echo $?
2. $ timeout 10s diff -Z <(printf 'a\r\nb\n') <(printf 'a\nb\r\n'); echo $?

Actual results:
step 1 completes almost instantly, printing 0.  Step 2 runs 10 seconds, then prints 124 because it timed out.

Expected results:
both steps should complete almost instantly, with status 0.

Additional info:
Comment 1 Eric Blake 2013-09-25 13:22:17 EDT
A self-compiled build from upstream's 3.3 tarball does NOT suffer this problem, so it appears that it may be a bug in a downstream-only patch.  But I didn't investigate further than that.
Comment 2 Pavel Holica 2013-10-22 10:03:22 EDT
I've just hit this too, simpler reproducer is:
diff -Z <(echo "a") <(echo -n "a")
Comment 3 Fedora Update System 2013-10-23 07:26:43 EDT
diffutils-3.3-4.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/diffutils-3.3-4.fc20
Comment 4 Fedora Update System 2013-10-23 07:27:26 EDT
diffutils-3.3-4.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/diffutils-3.3-4.fc19
Comment 5 Fedora Update System 2013-10-23 20:54:51 EDT
Package diffutils-3.3-4.fc19:
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing diffutils-3.3-4.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-19806/diffutils-3.3-4.fc19
then log in and leave karma (feedback).
Comment 6 lnie 2013-10-24 03:49:17 EDT
fixed with diffutils-3.3-4.f20
Comment 7 Fedora Update System 2013-10-28 23:34:00 EDT
diffutils-3.3-4.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 8 Fedora Update System 2013-11-10 02:49:26 EST
diffutils-3.3-4.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

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