Merge lp:~brian-murray/apport/zgrep-fallback into lp:apport
| Status: | Merged |
|---|---|
| Approved by: | Martin Pitt on 2016-11-08 |
| Approved revision: | 3107 |
| Merged at revision: | 3106 |
| Proposed branch: | lp:~brian-murray/apport/zgrep-fallback |
| Merge into: | lp:apport |
| Diff against target: |
36 lines (+16/-3) 1 file modified
backends/packaging-apt-dpkg.py (+16/-3) |
| To merge this branch: | bzr merge lp:~brian-murray/apport/zgrep-fallback |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Martin Pitt | 2016-11-07 | Approve on 2016-11-08 | |
|
Review via email:
|
|||
Description of the Change
The production retracers for the Error Tracker were OOM'ing regularly when trying to use zgrep to search Contents.gz for files found in the crash report. While zgrep is faster than using gzip and reading the file line by line this still seems like a good fallback option and is better than having the retrace process crash, I've implemented the proposed change in the production version of the Error Tracker and have encountered no issues with it.
As mentioned this could likely be better:
+ try:
+ line = line.decode(
+ # 2016-11-01 this should be better
+ except UnicodeDecodeError:
+ continue
I added because of the following lines in Contents.gz for yakkety:
$ zgrep -a "lenska.alias" /mnt/storage/
usr/lib/
Thanks!
| Martin Pitt (pitti) wrote : | # |
- 3107. By Brian Murray on 2016-11-08
-
improve unicode handling after pitti's feedback
| Brian Murray (brian-murray) wrote : | # |
I've made the changes you've suggested, thanks!
| Brian Murray (brian-murray) wrote : | # |
I don't have permission to commit to the apport project.
| Martin Pitt (pitti) wrote : | # |
Uh, what? Time to change that ☺ You are a member now.


I can't say that I like having two code paths for the same thing, but I accept that it's necessary. (Still, if these machines are that tight on RAM, can we increase that a bit?)
I would like this to be a bit faster and simpler though, see inline comment. Thanks!