modifies .uploaded time every time whoopsie starts

Bug #1084311 reported by Brian Murray
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Whoopsie
Fix Released
Medium
Brian Murray
whoopsie (Ubuntu)
Fix Released
Undecided
Unassigned
Quantal
Fix Released
High
Brian Murray

Bug Description

[Impact]

Every time whoopsie starts up it modifies the .uploaded file corresponding to a .crash file regardless of whether or not the .crash is newer than the .uploaded. Subsequently, it is possible for some crashes not to be sent to daisy.

[Test Case]

1) Install xeyes if it is not already
2) Execute the following command in a terminal:
DISPLAY=:0 xeyes &; PID="$\!"; sleep 3; kill -SEGV $PID
3) Watch /var/crash for a .crash, .upload and .uploaded files for xeyes
4) Once all three have appeared stop whoopsie:
sudo stop whoopsie
5) Run the command from step 2 again
6) Check /var/crash and ensure that you have a .crash file newer than the .uploaded file
7) Execute the command:
sudo CRASH_DB_URL=https://daisy.ubuntu.com whoopsie -f
8) Check /var/crash for a .uploaded file newer than the .crash file and watch the whoopsie output noticing that there is no communication with daisy

With the version from -proposed you'll notice in step 8 that you can see the xeyes crash report sent to daisy.

[Regression Potential]
It's possible that the report_dir variable is incorrect and that no crashes will be processed at all. However, I've run the whoopsie test suite with no issues and making any application crash will quickly reveal the absence of a .uploaded file.

It looks like whoopsie is modifying the .uploaded file corresponding to a crash report every time it runs:

[ 4:16PM ] [ bdmurray@blacklightning:~ ]
 $ ls -lh /var/crash
total 11M
-rw------- 1 whoopsie whoopsie 0 Nov 28 16:11 _usr_bin_d-feet.1000.uploaded

[ 4:30PM ] [ bdmurray@blacklightning:~ ]
 $ sudo service whoopsie stop

[ 4:30PM ] [ bdmurray@blacklightning:~ ]
 $ sudo CRASH_DB_URL=http://localhost:8080 whoopsie -f
online

[ 4:30PM ] [ bdmurray@blacklightning:~ ]
 $ ls -lh /var/crash
total 11M
-rw------- 1 whoopsie whoopsie 0 Nov 28 16:30 _usr_bin_d-feet.1000.uploaded

As I was trying to trouble shoot the upload process (before I rebooted I had .crash file that was newer than the .uploaded file) I found this a bit confusing.

Related branches

summary: - modifies .uploaded time every start up
+ modifies .uploaded time every time whoopsie starts
Revision history for this message
Brian Murray (brian-murray) wrote :

This may only be happening for .uploaded files with a corresponding .upload and / or .crash file.

Revision history for this message
Evan (ev) wrote :

Yeah, in src/whoopsie.c:process_existing_files we definitely check to see if we've handled the report already, then mark it as seen. I'm not entirely sure why I did this, but I vaguely recall thinking about corner cases in already_handled_report. We should fix this, but we should be very careful to ensure we've covered all the bases.

Changed in whoopsie:
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Evan (ev) wrote :

As discussed offline, the original reason for marking reports as seen after we've confirmed that they have already been seen is to handle cases like the .crash file not existing when a .upload does. Not marking these as seen though does not seem to save us any time though, and we could clean these up in the cron.daily job.

The solution here will be to drop the mark_seen code after already_handled_report.

Changed in whoopsie:
assignee: nobody → Brian Murray (brian-murray)
Changed in whoopsie:
status: Confirmed → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package whoopsie - 0.2.9

---------------
whoopsie (0.2.9) raring; urgency=low

  * Do not modify the .uploaded file corresponding to a .crash file when
    starting up (LP: #1084311)
 -- Brian Murray <email address hidden> Tue, 11 Dec 2012 10:16:56 -0800

Changed in whoopsie (Ubuntu):
status: New → Fix Released
Changed in whoopsie:
status: In Progress → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote :

This is important to SRU because you could run into a situation like this:

You experience a crash for a second time (update-notifier doesn't tell you about it for some reason) and then you have a .crash file newer than a .uploaded file. Some time later you reboot and when whoopsie restarts the .uploaded file becomes newer than the .crash file. When reviewing you reports directory whoopsie determines that it has already sent your .crash file since the .uploaded file is newer than it and your second instance of the crash is not sent to errors.

Changed in whoopsie (Ubuntu Quantal):
status: New → In Progress
importance: Undecided → High
assignee: nobody → Brian Murray (brian-murray)
description: updated
description: updated
Revision history for this message
Brian Murray (brian-murray) wrote :

I've uploaded this to the quantal -proposed queue.

Revision history for this message
Chris Halse Rogers (raof) wrote : Please test proposed package

Hello Brian, or anyone else affected,

Accepted whoopsie into quantal-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/whoopsie/0.2.7.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in whoopsie (Ubuntu Quantal):
status: In Progress → Fix Committed
tags: added: verification-needed
Revision history for this message
C de-Avillez (hggdh2) wrote :

verified, using the steps in the description, that (1) current whoppsie did not upload an updated crashdump, and (2) whoppsie from -proposed *did* upload a newer crash.

Tagging verification-done.

tags: added: verification-done
removed: verification-needed
Revision history for this message
Colin Watson (cjwatson) wrote : Update Released

The verification of this Stable Release Update has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package whoopsie - 0.2.7.1

---------------
whoopsie (0.2.7.1) quantal-proposed; urgency=low

  * Do not modify the .uploaded file corresponding to a .crash file when
    starting up (LP: #1084311)
 -- Brian Murray <email address hidden> Thu, 13 Dec 2012 16:26:40 -0800

Changed in whoopsie (Ubuntu Quantal):
status: Fix Committed → Fix Released
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.