Closed Bug 1268587 Opened 8 years ago Closed 8 years ago

Don't try to create cache2 dirs on and on when it once fails

Categories

(Core :: Networking: Cache, defect)

46 Branch
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla51
Tracking Status
firefox51 --- fixed

People

(Reporter: mayhemer, Assigned: michal)

References

Details

(Whiteboard: [necko-active])

Attachments

(1 file)

Based on https://crash-stats.mozilla.com/report/index/ffc71c4d-480f-4fe3-8a1c-c9ded2160421#allthreads which IMO demonstrates we on and on try to create the tree structure.  I bet in that report we call [1] and fail to wipe the caceh2/doomed dir from some reason.

This can fail from various reasons like out-of-space, network drive failures or also any preferences set to point the cache dir somewhere else than the local profile (people do that) where the target may be in a failed state.

Hence I think we should have a flag like "tree creation attempted" and never try it again, just work w/o the cache.  We could also try in intervals (once in a minute or so) but that is IMO just a nice-to-have.


[1] https://dxr.mozilla.org/mozilla-central/rev/86730d0a82093d705e44f33a34973d28b269f1ea/netwerk/cache2/CacheFileIOManager.cpp#3737
Whiteboard: [necko-active]
Attached patch patch v1Splinter Review
Attachment #8777794 - Flags: review?(honzab.moz)
Comment on attachment 8777794 [details] [diff] [review]
patch v1

Review of attachment 8777794 [details] [diff] [review]:
-----------------------------------------------------------------

::: netwerk/cache2/CacheFileIOManager.cpp
@@ +3716,5 @@
>    }
>  
>    nsresult rv;
>  
> +  mTreeCreationFailed = true;

maybe just add a note we drop the flag after the creation is sucesfully done.
Attachment #8777794 - Flags: review?(honzab.moz) → review+
Pushed by mnovotny@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/eac5c4bf002d
Don't try to create cache2 dirs on and on when it once fails, r=honzab
https://hg.mozilla.org/mozilla-central/rev/eac5c4bf002d
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla51
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: