Merge lp:~brian-murray/apport/zgrep-fallback into lp:~apport-hackers/apport/trunk
Status: | Merged |
---|---|
Approved by: | Martin Pitt |
Approved revision: | 3107 |
Merged at revision: | 3106 |
Proposed branch: | lp:~brian-murray/apport/zgrep-fallback |
Merge into: | lp:~apport-hackers/apport/trunk |
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 (community) | Approve | ||
Review via email: mp+310218@code.launchpad.net |
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!
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!