possible for a 2nd occurrence of a crash not to be sent to errors
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Apport |
Fix Released
|
Undecided
|
Unassigned | ||
apport (Ubuntu) |
Fix Released
|
High
|
Unassigned | ||
Precise |
Fix Released
|
High
|
Unassigned | ||
Quantal |
Fix Released
|
High
|
Unassigned |
Bug Description
[Test Case]
1) (xeyes &); sleep 1; killall -SEGV xeyes
2) check /var/crash
3) (xeyes &); sleep 1; killall -SEGV xeyes
3) check /var/crash notice that .crash is newer than .upload and .uploaded
Original Description:
I was testing errors in the cloud using juju and created a crash report for d-feet. The first time I did this the a .crash file was created and then a corresponding .upload and .uploaded file were created. The second time I did this a new .crash file was created but a new .upload file was not and subsequently the 2nd occurrence of this crash was not sent to the error tracker.
My /var/crash directory:
-rw-rw-r-- 1 bdmurray whoopsie 0 Nov 28 10:25 _usr_bin_
-rw------- 1 whoopsie whoopsie 0 Nov 28 13:14 _usr_bin_
-rw-r----- 1 bdmurray whoopsie 3401262 Nov 28 13:43 _usr_bin_
In apport/fileutils.py we can see that there are no checks done to see if there is already a .upload or .uploaded file:
def mark_report_
report = '%s.upload' % report.rsplit('.', 1)[0]
with open(report, 'a'):
pass
So if a .upload for the crash already exists a new one is not created nor is the existing one modified.
Related branches
- Martin Pitt (community): Approve
-
Diff: 622 lines (+123/-95)4 files modifiedapport/crashdb_impl/launchpad.py (+1/-1)
apport/fileutils.py (+12/-2)
po/apport.pot (+92/-92)
test/test_fileutils.py (+18/-0)
Changed in apport (Ubuntu): | |
importance: | Undecided → High |
Changed in apport (Ubuntu Precise): | |
status: | Fix Committed → In Progress |
tags: | removed: verification-needed |
Attached is a test, to be added to test_fileutils.py, that demonstrates the problem.