Catch uncaught OSError in hash_cache stuffs

This is usually a race condition between multiple master worker processes
Merge pull request #9879 from jacksontj/uncaughtfix

Catch uncaught OSError in hash_cache stuffs