GNU bug report logs -
#35214
[Bug][diff][3.3] diff showing difference when there is none
Previous Next
To reply to this bug, email your comments to 35214 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-diffutils <at> gnu.org
:
bug#35214
; Package
diffutils
.
(Wed, 10 Apr 2019 06:16:03 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
方然 <ufo2243 <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-diffutils <at> gnu.org
.
(Wed, 10 Apr 2019 06:16:04 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi,All:
I think I encounter a bug about diff.
reproduce:
diff -w -B 3.log 4.log | grep '<' | grep -v 12
< 6 17 23
< 1 8 11
< 0 16 6
< 2 22 8
< 9 14 17
< 7 14 18
< 1 22 14
< 24 6 0
< 16 1 21
< 1 22 16
[image: image.png]
it is a same line! and if I delete some lines above and below this line
then diff again it shows no difference as I expect.
and not only this line all these lines in the first screenshot are same
lines but show difference in diff.
also use vimdiff to check. and show no difference in vimdiff.
[image: image.png]
the log file is attached in the mail.
Fang
[Message part 2 (text/html, inline)]
[image.png (image/png, inline)]
[image.png (image/png, inline)]
[4.log (application/octet-stream, attachment)]
[3.log (application/octet-stream, attachment)]
Information forwarded
to
bug-diffutils <at> gnu.org
:
bug#35214
; Package
diffutils
.
(Wed, 10 Apr 2019 11:47:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 35214 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On 4/9/19 11:03 PM, 方然 wrote:
> [image: image.png]
> it is a same line! and if I delete some lines above and below this line
> then diff again it shows no difference as I expect.
> and not only this line all these lines in the first screenshot are same
> lines but show difference in diff.
> also use vimdiff to check. and show no difference in vimdiff.
> [image: image.png]
Please don't ever send 9 megabytes of screenshots and sample files to a
mailing list (actually, I was a bit surprised that your images were
relatively small compared to the bulk of your log files, although it
would still have been a better use of bandwidth to just paste the text
from your window rather than capturing screenshots). You caused a lot of
unnecessary load on the mail server as it multiplied your message out to
every list recipient. Ideally, you should have minimized your problem
down to much smaller files - although the nature of the reported problem
in diff'ing large files may have indeed required the full log files to
reproduce (where trimming things would have made the problem disappear);
but even then, hosting your files externally and merely posting a URL in
the mail is more considerate when you would otherwise be sending more
than 100k to the list.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org
[signature.asc (application/pgp-signature, attachment)]
Information forwarded
to
bug-diffutils <at> gnu.org
:
bug#35214
; Package
diffutils
.
(Wed, 10 Apr 2019 11:53:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 35214 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On 4/10/19 6:46 AM, Eric Blake wrote:
> On 4/9/19 11:03 PM, 方然 wrote:
>
>> [image: image.png]
>> it is a same line! and if I delete some lines above and below this line
>> then diff again it shows no difference as I expect.
>> and not only this line all these lines in the first screenshot are same
>> lines but show difference in diff.
>> also use vimdiff to check. and show no difference in vimdiff.
>> [image: image.png]
>
> Please don't ever send 9 megabytes of screenshots and sample files to a
> mailing list (actually, I was a bit surprised that your images were
> relatively small compared to the bulk of your log files, although it
> would still have been a better use of bandwidth to just paste the text
> from your window rather than capturing screenshots). You caused a lot of
> unnecessary load on the mail server as it multiplied your message out to
> every list recipient. Ideally, you should have minimized your problem
> down to much smaller files - although the nature of the reported problem
> in diff'ing large files may have indeed required the full log files to
> reproduce (where trimming things would have made the problem disappear);
> but even then, hosting your files externally and merely posting a URL in
> the mail is more considerate when you would otherwise be sending more
> than 100k to the list.
That said, when I use diff 3.6, I cannot reproduce the problem:
17172,17174c17172,17174
< 3 12 17
< 8 12 0
< 12 8 1
---
> 3 11 17
> 8 13 0
> 11 8 1
17186c17186
And the output that you reported, while annoying that it is not minimal,
is not _wrong_ per se (applying the diff still results in the correct
patched file, even if it required one line more effort than strictly
required).
The NEWS file mentions for 4.4:
diff's default algorithm has been adjusted to output higher-quality
results at somewhat greater computational cost, as CPUs have gotten
faster since the algorithm was last tweaked in diffutils-2.6 (1993).
so it could have been those fixes that improved diff in the meantime.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org
[signature.asc (application/pgp-signature, attachment)]
Information forwarded
to
bug-diffutils <at> gnu.org
:
bug#35214
; Package
diffutils
.
(Thu, 11 Apr 2019 14:40:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 35214 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
---------- Forwarded message ---------
发件人: 方然 <ufo2243 <at> gmail.com>
Date: 2019年4月11日周四 上午10:24
Subject: Re: [bug-diffutils] bug#35214: [Bug][diff][3.3] diff showing
difference when there is none
To: Eric Blake <eblake <at> redhat.com>
Hi Eric Blake
Still not I expected. the log file is result of a consistent hashing
algorithm before and after removing No.12 node.
`
[fangran <at> inspur_5118_new build]$ diff 3.log 4.log | grep '<' | grep -v 12
< 16 13 1
< 24 16 1
[fangran <at> inspur_5118_new build]$ diff 3.log 4.log | vim -
Vim: Reading from stdin...
`
I still got
136683 252954,252958c252954,252958
136684 < 12 24 19
136685 < 8 17 12
136686 < 12 6 16
136687 < 16 13 1
136688 < 24 16 1
136689 ---
136690 > 11 24 19
136691 > 8 17 13
136692 > 11 6 16
136693 > 16 13 1
136694 > 24 16 1
the result is different in diff 3.6. but still '16 13 1' '24 16 1' it is
the same line.
Fang
方然 <ufo2243 <at> gmail.com> 于2019年4月11日周四 上午9:50写道:
> Hi Eric Blake
> Sorry for the inconvenience about the size of the mail. and this is
> running in diff 3.3 as I mentioned in title of the previous email. I will
> update diff to 3.6 and have a try.
> Fang
>
[Message part 2 (text/html, inline)]
This bug report was last modified 6 years and 63 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.