UnicodeDecodeError when command report gibberish

Bug #1535741 reported by Martin Pitt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
autopkgtest (Ubuntu)
Fix Released
Medium
Martin Pitt

Bug Description

We get a lot of errors like in https://objectstorage.prodstack4-5.canonical.com/v1/AUTH_77e2ada1e7a84929a74ba3b87153c0ac/autopkgtest-xenial/xenial/s390x/h/hg-git/20160119_123943@/log.gz after all tests finished and the testbed gets cleaned up:

adt-run [12:39:41]: @@@@@@@@@@@@@@@@@@@@ summary
testsuite PASS
mercurial-git PASS
Unexpected error:
Traceback (most recent call last):
  File "/home/ubuntu/autopkgtest/lib/VirtSubproc.py", line 702, in mainloop
    command()
  File "/home/ubuntu/autopkgtest/lib/VirtSubproc.py", line 640, in command
    r = f(c, ce)
  File "/home/ubuntu/autopkgtest/lib/VirtSubproc.py", line 116, in cmd_close
    cleanup()
  File "/home/ubuntu/autopkgtest/lib/VirtSubproc.py", line 665, in cleanup
    caller.hook_cleanup()
  File "/home/ubuntu/autopkgtest/virt-subproc/adt-virt-lxc", line 275, in hook_cleanup
    stderr=subprocess.PIPE)
  File "/home/ubuntu/autopkgtest/lib/VirtSubproc.py", line 148, in execute_timeout
    (out, err) = sp.communicate(instr)
  File "/usr/lib/python3.5/subprocess.py", line 1055, in communicate
    stderr = self.stderr.read()
  File "/usr/lib/python3.5/codecs.py", line 321, in decode
    (result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x85 in position 467: invalid start byte

So it seems lxc-stop is sending some gibberish or interrupted stream. Don't fail like that and instead just show the original error message.

Martin Pitt (pitti)
Changed in autopkgtest (Ubuntu):
status: New → In Progress
importance: Undecided → High
assignee: nobody → Martin Pitt (pitti)
Revision history for this message
Martin Pitt (pitti) wrote :
Changed in autopkgtest (Ubuntu):
importance: High → Medium
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package autopkgtest - 3.19.2

---------------
autopkgtest (3.19.2) unstable; urgency=medium

  * Fix "apt-get source" version detection:
    - Ignore source record "Binary:" entries which are not actually binaries
      of that source.
    - Take the highest source version of all encountered binaries. In other
      words, as soon as apt pinning uses one package from -proposed, use the
      tests from -proposed too.
    - Only consider binaries which exist in all releases. This avoids newly
      introduced binaries (library transitions, new kernel versions) to skew
      the intended apt pinning as they would always win the "highest version"
      check from above.
  * Install /usr/share/autopkgtest/setup-commands/* scripts as executable, to
    make them work for vmdebootstrap --customize. (Closes: #810862)
  * ssh-setup/nova: Use extended RE for matching --image pattern.
  * setup-commands/setup-testbed: Fix handling of options in sources.list.
  * tools/adt-build-lxd: Fix parsing of release name from apt sources with
    options if lsb_release is not available.
  * setup-commands/setup-testbed: Regenerate initramfs when adding udev rule
    for disabling ifnames (for chroots).
  * adt-buildvm-ubuntu-cloud: Drop duplicate sed of cloud-init.prerm.
  * adt-buildvm-ubuntu-cloud: Don't try to run "None" if --post-command is not
    given.
  * adt-virt-lxc: Add timeouts to all LXC operations.
  * Fix chowning for "rw-build-tree" restriction: run it as root if available,
    and otherwise ignore it entirely. (LP: #1535234)
  * Drop apt-cache showsrc --only-source option, as this is not yet understood
    by Ubuntu 12.04's apt.
  * VirtSubproc.py, execute_timeout(): Avoid UnicodeDecodeErrors when called
    programs send gibberish. Decode manually with "replace" error mode
    instead. (LP: #1535741)
  * adt-virt-lxc: Avoid unnecessary reading and decoding of program outputs if
    we don't actually use it.
  * ssh-setup/nova: Use the image with the latest "created" time, instead of
    the last lexicographic name.

 -- Martin Pitt <email address hidden> Thu, 21 Jan 2016 13:30:40 +0100

Changed in autopkgtest (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.