apport-bug exits with exit_success even if it fails

Bug #1023912 reported by Sergey "Shnatsel" Davidoff
24
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Apport
Confirmed
Low
Unassigned
apport (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

/usr/share/apport/apport-gtk, both when invoked directly and with apport-bug, exits with exit_success even if it fails to submit the report because the target package is unofficial. This blocks graceful fallback for third-party apps without custom hooks.

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: apport 2.0.1-0ubuntu8
ProcVersionSignature: Ubuntu 3.2.0-26.41-generic 3.2.19
Uname: Linux 3.2.0-26-generic x86_64
ApportVersion: 2.0.1-0ubuntu8
Architecture: amd64
CrashReports: 600:0:122:125855:2012-07-05 19:52:02.745966000 +0400:2012-07-05 19:52:03.745966000 +0400:/var/crash/zramswap-enabler.0.crash
Date: Thu Jul 12 18:19:05 2012
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Alpha amd64 (20120303)
PackageArchitecture: all
ProcEnviron:
 TERM=xterm
 PATH=(custom, no user)
 LANG=ru_RU.UTF-8
 SHELL=/usr/bin/fish
SourcePackage: apport
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Sergey "Shnatsel" Davidoff (shnatsel) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in apport (Ubuntu):
status: New → Confirmed
Revision history for this message
Sergey "Shnatsel" Davidoff (shnatsel) wrote :

Same is true for apport-cli.

Revision history for this message
Jarl (jarl-dk) wrote :

Same is also tru for apport-kde, it exists with the following output on console:
QPainter::begin: Paint device returned engine == 0, type: 2
QPainter::end: Painter not active, aborted

and exit status (echo $?) is 1

Revision history for this message
mikhail-777 (wpr-oxym) wrote :

When it will be fixed?
These programs don't want to submit bug and bug additional information for third-party packages (e.g. for ubuntu-tweak):
1) ubuntu-bug
2
) apport-collect
3) apport-bug

Revision history for this message
mikhail-777 (wpr-oxym) wrote :

$ lsb_release -rd
Description: Ubuntu 12.04.1 LTS
Release: 12.04

Revision history for this message
Sergey "Shnatsel" Davidoff (shnatsel) wrote :

Mikhail: your problem has nothing to do with this report, and can be fixed only in the apps. Please refer to https://wiki.ubuntu.com/Apport/DeveloperHowTo foe additional info.

Evan (ev)
Changed in apport:
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
Sergey "Shnatsel" Davidoff (shnatsel) wrote :

I've fixed it by exiting with exit code 1 from the "check_unreportable" function that displays the error dialog. See linked branch.

I'm not sure if it's a good idea though, because the function is supposed to check only, not abort the whole thing (isn't it?). I've tried returning false from the "run_report_bug" function that calls "check_unreportable" and then returning false from all the places that call "run_report_bug" but the error handling is still not advanced enough to pick up even those errors and bail out, so I guess I'll quit poking around and leave this to somebody who's familiar with the codebase.

Revision history for this message
Martin Pitt (pitti) wrote :

I don't see an attached branch here, but indeed check_unreportable() should not exit the program. This needs to be passed down through the return values. Also, please keep in mind that /usr/share/apport/apport-gtk potentially process more than one report (and indeed this will happen a lot more often in the near future when we submit the "system level" reports in batches). So a single exit code does not tell you a lot.

Third party packages which want to integrate with Apport are much better off with shipping a proper package hook which adjusts the crash database.

Revision history for this message
Marcus Tomlinson (marcustomlinson) wrote :

This release of Ubuntu is no longer receiving maintenance updates. If this is still an issue on a maintained version of Ubuntu please let us know.

Changed in apport (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Marcus Tomlinson (marcustomlinson) wrote :

This issue has sat incomplete for more than 60 days now. I'm going to close it as invalid. Please feel free re-open if this is still an issue for you. Thank you.

Changed in apport (Ubuntu):
status: Incomplete → Invalid
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.