[PATCHES] Fix smbd open race and render defer_open test less flakey
Michael Adam
obnox at samba.org
Wed Sep 10 14:09:39 MDT 2014
On 2014-09-10 at 10:21 -0700, Jeremy Allison wrote:
> On Wed, Sep 10, 2014 at 01:57:44PM +0200, Michael Adam wrote:
> >
> > The defer_open test is currently one of the most frequent
> > causes of autobuild failure.
> > ...
>
> Great catch Michael ! The only change I'd make
> is in this hunk:
>
> + if (!NT_STATUS_IS_OK(status)) {
> + DEBUG(10, ("open_file: "
> + "file %s vanished since we "
> + "checked for existence.\n",
> + smb_fname_str_dbg(smb_fname)));
> + file_existed = false;
> + SET_STAT_INVALID(fsp->fsp_name->st);
> + }
>
> to make it clear by using:
>
> + if (NT_STATUS_EQUAL(NT_STATUS_OBJECT_NAME_NOT_FOUND, status)) {
> + DEBUG(10, ("open_file: "
> + "file %s vanished since we "
> + "checked for existence.\n",
> + smb_fname_str_dbg(smb_fname)));
> + file_existed = false;
> + SET_STAT_INVALID(fsp->fsp_name->st);
> + }
>
> But that's not a blocker - we can add a tidyup
> patch on top afterwards if you agree.
Right! That is more natural.
Patch attached (since you didn't provide one. :-)
Feel free to also submit it with your authorship.
> Both changes LGTM - pushing !
Great, thanks!
These have just landed.
I'm curious to see what that will
mean for our intermittent test failures.
> FYI. We need a bug for the race condition fix, I think
> it's in 4.1.x (but not 4.0.x - I'll check).
https://bugzilla.samba.org/show_bug.cgi?id=10809
Let's add the (attached) cleanup patch and then port to 4.1.
Cheers - Michael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-s3-smbd-open_file-use-a-more-natural-check.patch
Type: text/x-diff
Size: 849 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20140910/55a7b622/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20140910/55a7b622/attachment.pgp>
More information about the samba-technical
mailing list