** Description changed: + [ Impact ] + + The apport code, through the use of Python's `email` package, isn't HTTP + 1.1 compliant when crafting the payload to the LP +storeblob endpoint, + using LF as a line separator rather than CRLF. + + A recent update to the `multipart` dependency of LP made it stricter + when parsing this kind of payload, making any attempt to file a bug + through Apport (e.g. `ubuntu-bug foo`) fail miserably. + + The issue was worked around by rolling back that update, but it's not a + longterm solution, as it's probably better for everyone if LP stays + up-to-date on its dependencies. + + This impacts 24.04.2 as the workaround needs to stay in place as long as + our "default" ISOs ship a buggy apport. + + [ Test plan ] + + The newer version of `multipart` is still deployed on the qastaging LP + instance, which makes testing the fix fairly simple. + + We're using the chaos-marmosets package since it's maintained by members + of the Apport team so nobody should be too annoyed by the noise. + + ``` + # File a bug in qastaging, and manually inspect the contents of the attached files + APPORT_LAUNCHPAD_INSTANCE=qastaging ubuntu-bug chaos-marmosets + + # Do the same on the prod instance as a control experiment. + # Don't forget to close the bug afterwards ;) + ubuntu-bug chaos-marmosets + ``` + + [ Where problems could occur ] + + Fixing the problem with the new dependency could regress against the + workaround, which is why the test plan tests against both prod and + qastaging. + + Messing with the way the payload is crafted could potentially corrupt + the attached files, which is why the tester must actually *look* at the + attached data. + + [ Original report ] + The tale is slightly convoluted. After doing an "apt upgrade" yesterday, xsane and simple-scan started failing: scanner detected, but could not scan. Trying to report it with ubuntu-bug then crashed with the following error: $ sudo ubuntu-bug simple-scan Traceback (most recent call last): - File "/usr/share/apport/apport-gtk", line 650, in <module> - app.run_argv() - File "/usr/lib/python3/dist-packages/apport/ui.py", line 917, in run_argv - return self.run_report_bug() - ^^^^^^^^^^^^^^^^^^^^^ - File "/usr/lib/python3/dist-packages/apport/ui.py", line 740, in run_report_bug - self.file_report() - File "/usr/lib/python3/dist-packages/apport/ui.py", line 1788, in file_report - upthread.exc_raise() - File "/usr/lib/python3/dist-packages/apport/REThread.py", line 67, in exc_raise - raise self._exception[1].with_traceback(self._exception[2]) - File "/usr/lib/python3/dist-packages/apport/REThread.py", line 42, in run - self._retval = self.__target(*self.__args, **self.__kwargs) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "/usr/lib/python3/dist-packages/apport/crashdb_impl/launchpad.py", line 222, in upload - ticket = upload_blob(blob_file, progress_callback, hostname=self.get_hostname()) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - File "/usr/lib/python3/dist-packages/apport/crashdb_impl/launchpad.py", line 1246, in upload_blob - assert ticket - ^^^^^^ + File "/usr/share/apport/apport-gtk", line 650, in <module> + app.run_argv() + File "/usr/lib/python3/dist-packages/apport/ui.py", line 917, in run_argv + return self.run_report_bug() + ^^^^^^^^^^^^^^^^^^^^^ + File "/usr/lib/python3/dist-packages/apport/ui.py", line 740, in run_report_bug + self.file_report() + File "/usr/lib/python3/dist-packages/apport/ui.py", line 1788, in file_report + upthread.exc_raise() + File "/usr/lib/python3/dist-packages/apport/REThread.py", line 67, in exc_raise + raise self._exception[1].with_traceback(self._exception[2]) + File "/usr/lib/python3/dist-packages/apport/REThread.py", line 42, in run + self._retval = self.__target(*self.__args, **self.__kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "/usr/lib/python3/dist-packages/apport/crashdb_impl/launchpad.py", line 222, in upload + ticket = upload_blob(blob_file, progress_callback, hostname=self.get_hostname()) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "/usr/lib/python3/dist-packages/apport/crashdb_impl/launchpad.py", line 1246, in upload_blob + assert ticket + ^^^^^^ AssertionError This is a blocker for me.
-- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to apport in Ubuntu. https://bugs.launchpad.net/bugs/2096327 Title: apport cannot upload blobs to launchpad - X-Launchpad-Blob-Token missing from http response -> "assert ticket" Status in Apport: Fix Committed Status in Launchpad itself: Fix Released Status in apport package in Ubuntu: Fix Released Status in apport source package in Focal: New Status in apport source package in Jammy: New Status in apport source package in Noble: New Status in apport source package in Oracular: New Bug description: [ Impact ] The apport code, through the use of Python's `email` package, isn't HTTP 1.1 compliant when crafting the payload to the LP +storeblob endpoint, using LF as a line separator rather than CRLF. A recent update to the `multipart` dependency of LP made it stricter when parsing this kind of payload, making any attempt to file a bug through Apport (e.g. `ubuntu-bug foo`) fail miserably. The issue was worked around by rolling back that update, but it's not a longterm solution, as it's probably better for everyone if LP stays up-to-date on its dependencies. This impacts 24.04.2 as the workaround needs to stay in place as long as our "default" ISOs ship a buggy apport. [ Test plan ] The newer version of `multipart` is still deployed on the qastaging LP instance, which makes testing the fix fairly simple. We're using the chaos-marmosets package since it's maintained by members of the Apport team so nobody should be too annoyed by the noise. ``` # File a bug in qastaging, and manually inspect the contents of the attached files APPORT_LAUNCHPAD_INSTANCE=qastaging ubuntu-bug chaos-marmosets # Do the same on the prod instance as a control experiment. # Don't forget to close the bug afterwards ;) ubuntu-bug chaos-marmosets ``` [ Where problems could occur ] Fixing the problem with the new dependency could regress against the workaround, which is why the test plan tests against both prod and qastaging. Messing with the way the payload is crafted could potentially corrupt the attached files, which is why the tester must actually *look* at the attached data. [ Original report ] The tale is slightly convoluted. After doing an "apt upgrade" yesterday, xsane and simple-scan started failing: scanner detected, but could not scan. Trying to report it with ubuntu-bug then crashed with the following error: $ sudo ubuntu-bug simple-scan Traceback (most recent call last): File "/usr/share/apport/apport-gtk", line 650, in <module> app.run_argv() File "/usr/lib/python3/dist-packages/apport/ui.py", line 917, in run_argv return self.run_report_bug() ^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/apport/ui.py", line 740, in run_report_bug self.file_report() File "/usr/lib/python3/dist-packages/apport/ui.py", line 1788, in file_report upthread.exc_raise() File "/usr/lib/python3/dist-packages/apport/REThread.py", line 67, in exc_raise raise self._exception[1].with_traceback(self._exception[2]) File "/usr/lib/python3/dist-packages/apport/REThread.py", line 42, in run self._retval = self.__target(*self.__args, **self.__kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/apport/crashdb_impl/launchpad.py", line 222, in upload ticket = upload_blob(blob_file, progress_callback, hostname=self.get_hostname()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/apport/crashdb_impl/launchpad.py", line 1246, in upload_blob assert ticket ^^^^^^ AssertionError This is a blocker for me. To manage notifications about this bug go to: https://bugs.launchpad.net/apport/+bug/2096327/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp