http://bugs.winehq.org/show_bug.cgi?id=36745
Bug ID: 36745 Summary: Wine broken on FreeBSD Product: Wine Version: 1.7.19 Hardware: x86 OS: Linux Status: NEW Severity: normal Priority: P2 Component: ole32 Assignee: wine-bugs@winehq.org Reporter: fgouget@codeweavers.com
Wine no longer succeeds in creating the .wine prefix. So it qualifies as totally broken. A bisect shows that the commit that breaks it is:
commit 473a3a47a7d02694e659760008c1856f305cd82c Author: Vincent Povirk vincent@codeweavers.com Date: Thu May 8 15:03:10 2014 -0500
server: Try to get a read lock if we can't get a write lock.
However it in fact reveals existing bugs. What happens is this: 1) The above patch causes the locking operation in server/file.c to fail with ENOTSUP.
2) file_set_error() does not know about so it returns STATUS_UNSUCCESSFUL.
3) This bubbles up to FileLockBytesImpl_LockRegion() in dlls/ole32/filelockbytes.c which translates this to STG_E_ACCESSDENIED on the sole basis that it's not success! This is where the main bug is.
4) This then causes the caller, StorageImpl_LockRegionSync(), to think the file is locked already and so it loops until the file is unlocked. That's the infinite loop that breaks the .wine prefix creation.
5) Finally StorageImpl_LockRegionSync() is supposed to pause between attempts but it does not so this loop uses all the CPU.
Patches for points 2, 3 and 5 at 11.