System state for crashes is sometimes collected too late

Bug #729099 reported by Matt Zimmerman
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
apport (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

Binary package hint: apport

This is sort of a reconsideration of bug 62542, wherein much of the work of collecting system state for crashes was moved to the frontend. This gave us some benefits:

- The user isn't unexpectedly subjected to lots of random I/O (and thus an unresponsive system)
- We have the opportunity to interact with the user while collecting system state (including running sudo)
- We don't waste time collecting data which won't be used for a bug report

However, it also created a problem: the system state may change between the time when the crash happens, and the time when the frontend is run. This period can be days or weeks. System updates may be installed. The system may be rebooted. Hardware may be added or removed. These can all lead to incorrect data in bug reports.

This issue applies to data collected by apport itself (such as package versions) as well as by hooks (such as log files).

In my view, the closer the system state to the time of the crash, the more useful it will be in processing bug reports, especially with automated tools which need to rely on accurate data for things like package versions.

I don't know how big a problem this is in practice, but I often think about it when I'm filing a bug and I *know* the system state is wrong. :-/

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: apport 1.19-0ubuntu2
ProcVersionSignature: Ubuntu 2.6.38-4.31-generic 2.6.38-rc5
Uname: Linux 2.6.38-4-generic x86_64
Architecture: amd64
CrashReports:
 600:0:0:362548:2011-03-04 13:45:13.000000000 +0000:2011-03-04 13:45:13.000000000 +0000:/var/crash/sysvinit-utils.0.crash
 600:1000:1000:7462257:2011-02-24 21:31:17.000000000 +0000:2011-02-24 21:51:52.000000000 +0000:/var/crash/_usr_bin_nautilus.1000.crash
 600:0:0:362566:2011-03-04 13:45:13.000000000 +0000:2011-03-04 13:45:12.000000000 +0000:/var/crash/keyboard-configuration.0.crash
Date: Fri Mar 4 14:09:43 2011
PackageArchitecture: all
SourcePackage: apport
UpgradeStatus: Upgraded to natty on 2011-02-10 (21 days ago)

Revision history for this message
Matt Zimmerman (mdz) wrote :
Revision history for this message
Matt Zimmerman (mdz) wrote :

If you agree that this is worth fixing, what I propose is:

- Save a copy of /var/lib/dpkg/status in the crash handler
- Use that status file in Report.add_package_info()
- Allow hooks to supply a function which will run at crash time, in addition to the existing one which runs at reporting time
- Selectively move logic from hooks into crash-time hook functions

I'm not sure what to do about the gdb stuff. According to bug 62542, this is one of the expensive things, but it surely needs to be run at crash time in order to be reliable. Perhaps it could be scripted in such a way as to limit the load on the system (e.g. rate-limiting I/O).

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: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for apport (Ubuntu) because there has been no activity for 60 days.]

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