Closed Bug 1822648 Opened 2 years ago Closed 2 years ago

[traceback] FileNotFoundError: disk cache manager race condition

Categories

(Socorro :: Processor, defect, P2)

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: willkg, Assigned: willkg)

References

(Regression)

Details

(Keywords: regression)

Attachments

(2 files)

Sentry:

https://mozilla.sentry.io/issues/4008547876/?project=6700122

Traceback:

FileNotFoundError: [Errno 2] No such file or directory: '/data/symbols/cache/xul.pdb/F884163118E7EFB84C4C44205044422E1/xul.sym'
  File "socorro/processor/cache_manager.py", line 253, in _event_generator
    size = os.stat(path).st_size

The stackwalker starts downloading all the sym files and then deletes the ones it doesn't finish or something like that. So it's possible for the disk cache manager to be handling a CREATE event for a file that was just created and deleted really fast.

If that's the case, we should skip adding it to the lru bookkeeping because it's not there anymore.

willkg merged PR #6370: "bug 1822648: handle race condition in CREATE event" in 191371e.

We might have to do something with the corresponding DELETE event, too. And maybe other events along the create/delete line. We'll use this bug for followup fixes.

willkg merged PR #6372: "bug 1822648: improve filenotfound resiliency and switch to &" in 2a3f54f.

I went through and improved resiliency for other calls to get the size to handle the FileNotFoundError case appropriately.

I pushed this out just now in bug #1824987. Marking as FIXED.

Status: ASSIGNED → RESOLVED
Closed: 2 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: