Bug 1012075 - diff -Z hangs
Summary: diff -Z hangs
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: diffutils
Version: 19
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Tim Waugh
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-09-25 16:23 UTC by Eric Blake
Modified: 2013-11-10 07:49 UTC (History)
4 users (show)

Fixed In Version: diffutils-3.3-4.fc19
Clone Of:
: 1022417 (view as bug list)
Environment:
Last Closed: 2013-10-29 03:34:00 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Eric Blake 2013-09-25 16:23:30 UTC
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 17:22:17 UTC
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 14:03:22 UTC
I've just hit this too, simpler reproducer is:
diff -Z <(echo "a") <(echo -n "a")

Comment 3 Fedora Update System 2013-10-23 11:26:43 UTC
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 11:27:26 UTC
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-24 00:54:51 UTC
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 07:49:17 UTC
fixed with diffutils-3.3-4.f20

Comment 7 Fedora Update System 2013-10-29 03:34:00 UTC
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 07:49:26 UTC
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.