Samba oplock level II problem

Pavel Shilovsky piastryyy at gmail.com
Mon Jan 31 14:21:29 MST 2011


2011/1/31 Jeremy Allison <jra at samba.org>:
> On Sun, Jan 30, 2011 at 03:40:10PM +0300, Pavel Shilovsky wrote:
>> 2011/1/29 Pavel Shilovsky <piastryyy at gmail.com>:
>> > 2011/1/24 Pavel Shilovsky <piastryyy at gmail.com>:
>> >> 2011/1/24 Volker Lendecke <Volker.Lendecke at sernet.de>:
>> >>> On Mon, Jan 24, 2011 at 05:57:05PM +0300, Pavel Shilovsky wrote:
>> >>>> I reported about an oplock level II problem in
>> >>>> https://bugzilla.samba.org/show_bug.cgi?id=7928. I want to discuss it
>> >>>> here because I think it's the real seriuos bug, that can raise a lot
>> >>>> of data coherency problems.
>> >>>
>> >>> Sorry for not jumping on this with PRIORITY 1 DROP
>> >>> EVERYTHING ELSE. My next step will be to write a torture
>> >>> test in smbtorture that replicates the behaviour. If this is
>> >>> so freaking urgent for you, you can help by writing this
>> >>> test.
>> >>>
>> >>
>> >> It's not so freaking and I like your idea to test it with torture.
>> >> Thank you for a quick reply!
>> >>
>> >> --
>> >> Best regards,
>> >> Pavel Shilovsky.
>> >>
>> >
>> > I've just created smbtorture test that shows the problem:
>> >
>> > http://git.etersoft.ru/people/piastry/packages/?p=samba4.git;a=commitdiff;h=7b957a3639280e7881a3fae226780cc3da1012ad;hp=619e5cb646b465a4d6a031cbb462878e096498a6
>> >
>> > kernel oplocks options should be disabled and level2 oplocks should be
>> > enabled in smb.conf to reproduce the difference between Samba and
>> > Windows servers.
>> >
>> > --
>> > Best regards,
>> > Pavel Shilovsky.
>> >
>>
>>
>> I fixed the problem with this patch
>> http://git.etersoft.ru/people/piastry/packages?p=samba4.git;a=commitdiff;h=5a2e2f42dc228140ab6a0a142f0fb67201461cf2
>
> Ok - these two patches (the fix and the torture test)
> look *great* ! I'm planning to push them to v3-6-test
> and master (and create a back-port for 3.5.x.).
>
>> I also mentioned that Samba use the same fsp (passed to
>> contend_level2_oplocks_begin_default) for every share entry of the
>> current pid. That's why Samba send oplock break only to only fid of
>> this pid.
>>
>> This patch is going to fix this problem:
>> http://git.etersoft.ru/people/piastry/packages/?p=samba4.git;a=commitdiff;h=d412e4639223e301380e50b5df398a2ed4077c20
>

Please, look at the second variant of the patch - it has extra debug
message if initial_break_processing returns NULL:
http://git.etersoft.ru/people/piastry/packages/?p=samba4.git;a=commitdiff;h=569ee7e3553b4e2fb0b098cca9d1a32ddc7afee6

> Ok, I understand this one (took me a while to get it :-).
> This stuff is subtle (and I did the initial bugfix for #5980 :-).
>
> Thanks !
>
> Jeremy.
>



-- 
Best regards,
Pavel Shilovsky.


More information about the samba-technical mailing list