GNOME Bugzilla – Bug 724886
GI has some kind of race condition in cachestore
Last modified: 2015-02-07 16:46:09 UTC
When building with -j, there's some kind of race condition in accessing datacache. I'm not sure what the right thing to do, but i've tried to work around it by re-trying the open() call and sleeping for 500ms on failure.
Created attachment 269913 [details] [review] Try to work around races in cachestore
Created attachment 270475 [details] [review] cachestore: Use "write new, then rename" pattern, not "write in place" This should fix race conditions when multiple processes attempt to access the cache concurrently.
Review of attachment 269913 [details] [review]: I'm not going to apply patches that just add sleep() calls.
(In reply to comment #3) > Review of attachment 269913 [details] [review]: > > I'm not going to apply patches that just add sleep() calls. Unless there is some actual investigation, and we find that on say some particular version of Windows, there is a bug that really requires it, and we will be *reliably* working around it. An alternative patch is to just disable the cache store on Windows (or in general...) But can you try my patch?
I've completed at least one build without my 500ms-sleep hack (and without your "new then rename" patch, (with gobject-introspection-1.39.90). Which may indicate that this bug was either fixed naturally (and my hack was unnecessary for some time), or just too difficult to reproduce.
Review of attachment 270475 [details] [review]: Patch looks ok, though i don't think i ever had problem with this particular piece of code.
Attachment 270475 [details] pushed as 5b10513 - cachestore: Use "write new, then rename" pattern, not "write in place"
[Mass-moving gobject-introspection tickets to its own Bugzilla product - see bug 708029. Mass-filter your bugmail for this message: introspection20150207 ]