Closed Bug 1306022 Opened 8 years ago Closed 8 years ago

Lots of failed deletions of TEMP memory report in processors

Categories

(Socorro :: General, task)

task
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: peterbe, Assigned: peterbe)

Details

Attachments

(1 file)

tail -f'ing the messages on processors I see quite a lot of messages like this:

Sep 28 15:47:27 prod-processor-i-0e80be16 bash: 2016-09-28 15:47:27,335 INFO - processor -  - Thread-15 - deletion of dump failed: [Errno 2] No such file or directory: '/home/socorro/temp/8905e5e1-0c02-41be-a378-62c422160928.memory_report.TEMPORARY.dump'

It's not super common but it pops up. 
It shouldn't bother trying to delete if the file doesn't exist.
I would not be surprised if that was by design. I seem to remember it's a lot faster to fail at deleting a missing document than trying to figure out if it existed first. 

I do not think we need to do anything here.
If that's the case (the optimization) then I think the code should be this:

  try:
    os.remove(file_path)
  except IOError:
    pass

I suspect what it's doing now is this:

  try:
    os.remove(file_path)
  except IOError:
    logging.warn('failed!' exc_info=True)
 
That means that you see python exception in the /var/log/messages that SHOULD be ignored. Kinda noisy. Perhaps it's a personal preference but we can bikeshed about it :)
Here's the culprit code: https://github.com/mozilla/socorro/blob/0d057c6327ede0b014947616c70bf578e2726021/socorro/processor/breakpad_transform_rules.py#L128-L133

I really think we should fix this. Seeing Python exceptions in the log is bad. Even if you learn to ignore it, it's noise and most likely something you'll forget that it's just noise.
Assignee: nobody → peterbe
Commit pushed to master at https://github.com/mozilla/socorro

https://github.com/mozilla/socorro/commit/988de009b246fe0b31e8cd057eb80b07214ad1cb
fixes bug 1306022 - don't include traceback if it's not a problem (#3513)
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: