[Bug 1425575] Re: [py3] corrupts binary bug attachments

Launchpad Bug Tracker 1425575 at bugs.launchpad.net
Tue Nov 1 01:55:03 UTC 2016


Status changed to 'Confirmed' because the bug affects multiple users.

** Changed in: python-launchpadlib (Ubuntu)
       Status: New => Confirmed

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to python-launchpadlib in Ubuntu.
https://bugs.launchpad.net/bugs/1425575

Title:
  [py3] corrupts binary bug attachments

Status in python-launchpadlib package in Ubuntu:
  Confirmed

Bug description:
  While porting Apport to python3-launchpadlib, I noticed that
  python3-launchpadlib (or one of its underlying libraries) corrupts
  binary attachments. The attached reproducer attaches the gzip
  compressed value b'\x80\xFF' * 300 to some bug.

  With python 2, it works fine, and you get a CoreDump.gz attachment
  that is 37 bytes. You can download it, and it looks as expected:

  $ hd /tmp/CoreDump.gz 
  00000000  1f 8b 08 08 00 00 00 00  02 ff 43 6f 72 65 44 75  |..........CoreDu|
  00000010  6d 70 00 6b f8 df 30 0a  47 21 d5 21 00 1c cd 1d  |mp.k..0.G!.!....|
  00000020  0a 58 02 00 00                                    |.X...|
  00000025

  But with python 3, you get a CoreDump.gz attachment which is 39 bytes
  and is corrupted:

  $ zcat /tmp/CoreDump-py3.gz |hd

  gzip: /tmp/CoreDump-py3.gz: invalid compressed data--crc error
  00000000  80 ff 80 ff 80 ff 80 ff  80 ff 80 ff 80 ff 80 ff  |................|

  gzip: /tmp/CoreDump-py3.gz: invalid compressed data--length error
  *
  00000258

  The compressed file  has two extra 0A bytes:

  $ diff -u <(hd /tmp/CoreDump.gz) <(hd /tmp/CoreDump-py3.gz)
  --- /dev/fd/63	2015-02-25 17:00:22.336527519 +0100
  +++ /dev/fd/62	2015-02-25 17:00:22.336527519 +0100
  @@ -1,4 +1,4 @@
   00000000  1f 8b 08 08 00 00 00 00  02 ff 43 6f 72 65 44 75  |..........CoreDu|
  -00000010  6d 70 00 6b f8 df 30 0a  47 21 d5 21 00 1c cd 1d  |mp.k..0.G!.!....|
  -00000020  0a 58 02 00 00                                    |.X...|
  -00000025
  +00000010  6d 70 00 6b f8 df 30 0a  47 21 d5 21 00 1c 0a cd  |mp.k..0.G!.!....|
  +00000020  1d 0a 0a 58 02 00 00                              |...X...|
  +00000027

  Note that this needs to log into Launchpad, so you might want to
  adjust the credentials_file argument (the reproducer just uses
  apport's standard path). Also note that logging into Launchpad is
  currently broken with py3 (bug 1422249), so run it with python3 first
  to log in.

  ProblemType: Bug
  DistroRelease: Ubuntu 15.04
  Package: python3-launchpadlib 1.10.3-1
  ProcVersionSignature: Ubuntu 3.18.0-13.14-generic 3.18.5
  Uname: Linux 3.18.0-13-generic x86_64
  ApportVersion: 2.16.1-0ubuntu2
  Architecture: amd64
  CurrentDesktop: Unity
  Date: Wed Feb 25 16:58:13 2015
  EcryptfsInUse: Yes
  PackageArchitecture: all
  SourcePackage: python-launchpadlib
  UpgradeStatus: No upgrade log present (probably fresh install)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/python-launchpadlib/+bug/1425575/+subscriptions



More information about the foundations-bugs mailing list