Project

General

Profile

Actions

Bug #10448

closed

wsdiff explodes on encoding error

Added by Joshua M. Clulow over 2 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
tools - gate/build tools
Start date:
2019-02-25
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

With the recent updates to wsdiff, it seems we've regressed on the ability to correctly diff certain files:

18:34:51 + /opt/onbld/bin/wsdiff -r artefacts/wsdiff.txt previous/proto/root_i386 current/proto/root_i386
18:37:48 platform/i86xpv/kernel/amd64/unix
18:38:27 platform/i86pc/kernel/amd64/unix
18:41:54 etc/motd
18:45:40 usr/sbin/iasl
18:46:14 usr/sbin/acpixtract
18:46:15 usr/sbin/acpidump
19:38:36 usr/lib/spell/hlistb
19:38:36 Exception in thread Thread-2:
19:38:36 Traceback (most recent call last):
19:38:36   File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
19:38:36     self.run()
19:38:36   File "/opt/onbld/bin/wsdiff", line 1233, in run
19:38:36     compareOneFile(base, ptch, False)
19:38:36   File "/opt/onbld/bin/wsdiff", line 1277, in compareOneFile
19:38:36     return compareBasic(base, ptch, quiet, fileType)
19:38:36   File "/opt/onbld/bin/wsdiff", line 1112, in compareBasic
19:38:36     difference(fileName, fileType, diffs)
19:38:36   File "/opt/onbld/bin/wsdiff", line 195, in difference
19:38:36     log_difference(f, dtype, diffs)
19:38:36   File "/opt/onbld/bin/wsdiff", line 212, in log_difference
19:38:36     print(diffs[:diffs_sz_thresh], file=log)
19:38:36 UnicodeEncodeError: 'ascii' codec can't encode characters in position 64-66: ordinal not in range(128)

Note that usr/lib/spell/hlistb, a binary data file, differs by two bytes between the two workspaces:

root@jenkins-oi0:~# diff \
    <(LANG=C od -t x1 /export/jenkins/workspace/wsdiff/previous/proto/root_i386/usr/lib/spell/hlistb) \
    <(LANG=C od -t x1 /export/jenkins/workspace/wsdiff/current/proto/root_i386/usr/lib/spell/hlistb)

416c416
< 0014760 d7 f1 1a 93 1a d8 7e e8 98 bf ff a9 7c de 89 b1
---
> 0014760 d7 f1 1a 93 1a d8 7e e8 98 7f ce a9 7c de 89 b1

Richard Lowe and I have previously noticed that hlistb (and hlista) occasionally differ by one or two bytes for no reason we've yet been able to determine -- but we noticed this because prior to the changes, wsdiff did correctly render the differences.


Related issues

Related to illumos gate - Bug #10225: wsdiff broken after 9979ClosedAndy Fiddaman2019-01-12

Actions
Related to illumos gate - Feature #9979: Support python3 for in-gate toolsClosedAndy Fiddaman2019-02-06

Actions
Related to illumos gate - Bug #10449: wsdiff hangs forever after an exception is thrownNew2019-02-25

Actions
Actions

Also available in: Atom PDF