← Back to team overview

ubuntu-phone team mailing list archive

Re: How to make apport recognize a crash

 

On Thu, Oct 16, 2014 at 10:57:43AM +0300, Alberto Mardegan wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On 10/15/2014 06:11 PM, Brian Murray wrote:
> > On Wed, Oct 15, 2014 at 05:52:05PM +0300, Alberto Mardegan wrote:
> >> How can I get apport "see" this crash and report it?
> > 
> [...]
> > in the log file corresponding to the .crash file that was uploaded.
> > So the crash may very well have been reported and everything just
> > happened behind the scenes.
> 
> So, in /var/crash/ there are a couple of crashes, one older and one
> more recent than the one I'm interested in (which is not there). Also,
> I can find logs of these two crashes in the whoopsie log file, but
> there is no trace of the one I'm interested in.
> 
> Anyway, I tried to reproduce the bug once more, and this time the
> crash file was indeed generated. So it may be that for some reason
> whoopsie was not running the first time?

To clarify the process a bit more, it is apport that generates the
.crash file. Then there is an upstart job, apport-noui.conf (provided by
the apport-noui package), which will start whoopsie-upload all upon
noticing there is a .crash file in /var/crash. This happens if
/var/lib/apport/autoreport exists, which it should if you chosen to
automatically report crashes (again this is default behavior).

Then whoopsie-upload-all gathers additional information to add to the
crash file. One easy way to check if this has completed is to look for
ApportVersion in the .crash file.  Once the data is gathered then a
.upload file will be created in /var/crash.

Finally, after that whoopsie will notice the .upload file in /var/crash
and upload the .crash file to the Error Tracker. Upon completing the
upload attempt a .uploaded file will be created in /var/crash.

In /var/log/upstart/whoopsie.log you should see something like the
following:

[07:36:12] Found usable connection:
/org/freedesktop/NetworkManager/ActiveConnection/0
[07:36:12] online
[07:36:12] Parsing /var/crash/_bin_sleep.1000.crash.
[07:36:12] Uploading /var/crash/_bin_sleep.1000.crash.
[07:36:13] Sent; server replied with: No error
[07:36:13] Response code: 200
[07:36:13] Reported OOPS ID c75b0182-5541-11e4-a52e-fa163e1893a8

Having the OOPS ID I could go to
https://errors.ubuntu.com/oops/c75b0182-5541-11e4-a52e-fa163e1893a8
and verify that my OOPS was reported. (However, I sent my crash to the
staging version of the Error Tracker so that link won't work.)

--
Brian Murray

Attachment: signature.asc
Description: Digital signature


References