http://bugs.winehq.org/show_bug.cgi?id=9142
Summary: WINE does not process kernel oplocks correctly Product: Wine Version: 0.9.36. Platform: PC-x86-64 OS/Version: Linux Status: UNCONFIRMED Severity: major Priority: P3 Component: wine-files AssignedTo: wine-bugs@winehq.org ReportedBy: anpaza@mail.ru
WINE does not handle correctly kernel oplocks on Linux.
The easiest way to reproduce this problem is the following.
1. Install the Samba server software and set it up. 2. Make sure kernel oplocks are enabled in Samba (they are by default). Just to be sure you may add the line:
kernel oplocks = yes
into the [global] section in smb.conf. 3. Launch the server and mount the share on some computer (even on the same should work). 4. Open some file and keep it open (for example, "tail -f windows.h"). Samba will create an oplock for this file. 5. Try to open this file from a Wine program, for example:
[2|root@alpha|/mnt/0/devel/gw32/include]wine cmd CMD Version 0.9.36
Z:\mnt\0\devel\gw32\include>type windows.h Sharing violation
windows.h :Failed
For some reason the first try to open this file fails (when the kernel oplock breaks and the Samba client gets notified that somebody else is also accessing this file). Now if you try the same command again:
Z:\mnt\0\devel\gw32\include>type windows.h /* ...
it will succeed since the oplock is already broken.
A workaround for this is to disable the use of kernel oplocks in samba, but this leads to bad performance in clients since they may not cache network files anymore.