A curious tale of Samba 3.6.6, 3.6.12, and W2K08R2 when an OpLock break occurs on a compound request
realrichardsharpe at gmail.com
Wed Mar 13 11:10:58 MDT 2013
On Tue, Mar 12, 2013 at 7:52 PM, Richard Sharpe
<realrichardsharpe at gmail.com> wrote:
> On Tue, Mar 12, 2013 at 6:10 PM, Richard Sharpe
> <realrichardsharpe at gmail.com> wrote:
>> Hi folks,
>> I have been investigating a bug that was interesting. An AFP proxy
>> running on Windows was causing smbd to crash. This was with 3.6.6+.
>> After I got the log files it became obvious that the problem was with
>> the handling of OpLock breaks in a compound request.
>> So, I wrote a little the smbtorture program to test this with the
>> following result:
>> Samba 3.6.6 crashes, as expect.
>> Samba 3.6.12 returns STATUS_CANCELLED and then STATUS_FILE_CLOSED (but
>> does not crash.)
>> W2K08 Returns STATUS_PENDING and then drops the connection.
>> I wonder how the proxy deals with the W2K08 behavior?
> A further observation. Samba 3..6.12 actually sends out an OpLock
> break, but then responds with CANCELLED because it cannot handle an
> OpLock break in the middle of a compound request. I suspect Windows
> drops the connection because it cannot handle the OpLock break
> processing in the middle of a compound request.
> I wonder what W2K12 does. I guess I will try it tomorrow.
This is getting more and more curious. If I open the files with OPEN
(OPEN_EXISTING) W2K08 works fine and sends an OpLock Break. Samba
3.6.6 still crashes and Samba 3.6.12 returns STATUS_CANCELLED, which
is surely wrong.
However, if I open the files with OPEN_IF (OPEN_ALWAYS) W2K08 resets
More information about the samba-technical