Lots of failed deletions of TEMP memory report in processors

RESOLVED FIXED

Status

Socorro
General
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: peterbe, Assigned: peterbe)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

2 years ago
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.
(Assignee)

Comment 2

2 years ago
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 :)
(Assignee)

Comment 3

2 years ago
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)

Updated

2 years ago
Assignee: nobody → peterbe

Comment 5

2 years ago
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)

Updated

2 years ago
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.