[Buildbot-commits] [Buildbot] #2091: MailNotifier chokes on try job with non-ascii char in first line of patch?

Buildbot nobody at buildbot.net
Sat Oct 8 13:13:21 UTC 2011


#2091: MailNotifier chokes on try job with non-ascii char in first line of patch?
---------------------+---------------------
Reporter:  dank      |       Owner:
    Type:  defect    |      Status:  closed
Priority:  major     |   Milestone:  0.8.+
 Version:  master    |  Resolution:  fixed
Keywords:  encoding  |
---------------------+---------------------
Changes (by dank):

 * status:  reopened => closed
 * resolution:   => fixed


Comment:

 Hah.  It happened again, and I took a closer look.
 Note the tail end of the exception:

    File "buildbot-git/master/buildbot/status/mail.py", line 520, in
 createEmail
       text = msgdict['body'].encode(ENCODING)
   exceptions.UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in
 position 582: ordinal not in range(128)

 This is *before* attachments happen; it's in the body.
 Suspecting it was in the summary of the error that
 my custom message formatter inserts, I looked for the byte it
 couldn't decode:

 wget http://buildbot.kegel.com:8010/builders/runtests-default-
 x86_64/builds/55/steps/shell_2/logs/stdio/text
 hexdump -C text > hex
 grep -C3 'e2 ' hex

 And voila:

 0014f9c0  2d 75 6e 75 73 65 64 2d  62 75 74 2d 73 65 74 2d  |-unused-but-
 set-|
 0014f9d0  76 61 72 69 61 62 6c 65  22 0a 74 6d 61 72 73 68
 |variable".tmarsh|
 0014f9e0  61 6c 2e 63 3a 20 49 6e  20 66 75 6e 63 74 69 6f  |al.c: In
 functio|
 0014f9f0  6e 20 e2 80 98 73 65 72  69 61 6c 69 7a 65 5f 70  |n
 ...serialize_p|
 0014fa00  61 72 61 6d e2 80 99 3a  0a 74 6d 61 72 73 68 61
 |aram...:.tmarsha|
 0014fa10  6c 2e 63 3a 37 31 37 3a  32 37 39 3a 20 77 61 72  |l.c:717:279:
 war|
 0014fa20  6e 69 6e 67 3a 20 63 61  73 74 20 74 6f 20 70 6f  |ning: cast to
 po|
 0014fa30  69 6e 74 65 72 20 66 72  6f 6d 20 69 6e 74 65 67  |inter from
 integ|

 gcc itself is using non-ascii characters in its error messages!  The line
 generated.c: In function ‘test_pack_LPNONCLIENTMETRICSA’:
 uses a non-ascii opening single quote.

 So this newer crash is different from the older one, and we can close this
 bug.

 (Easy workaround for me: when running gcc, use LANG=C.
 Alternately, figure out how to do a destructive mapping to ascii
 in my custom message formatter.)

-- 
Ticket URL: <http://trac.buildbot.net/ticket/2091#comment:6>
Buildbot <http://buildbot.net/>
Buildbot: build/test automation


More information about the Commits mailing list