DoomPartialEntry should not attempt to doom an already doomed entry

Desktop / Chromium - shivanisha [] - 14 July 2017 16:32 EDT

I was not able to reproduce the crash reported but here is a speculative fix.

This is a scenario where a partial transaction needs to create a new entry and doom the existing one since it cannot validate itself against the new entry, due to, say, there are no strong validators.

The crash requires a specific race with another transaction for the same entry with LOAD_BYPASS_CACHE set due to which the second transaction straight away goes and dooms the entry (DoDoomEntry*) while the first one had opened the entry but not yet reached DoomPartialEntry.

This race is much more likely after the parallel validation CL ( because add to entry is always an async operation now.

This CL adds a check that the entry is not already doomed before calling cache_->DoomEntry in DoomPartialEntry and in one other calling location in DoSuccessfulSendRequest as it may happen there as well.


Review-Url: Cr-Commit-Position: refs/heads/master@{#486869}

2b6e7ee DoomPartialEntry should not attempt to doom an already doomed entry.
net/http/http_cache.h | 4 +-
net/http/ | 9 +-
net/http/ | 188 ++++++++++++++++++++++++++++++++++++-
net/http/ | 56 +++++++++--
net/http/mock_http_cache.h | 38 +++++++-
5 files changed, 278 insertions(+), 17 deletions(-)


  • Share