there is a race condition in source3/smbd/open.c:open_file(). between checking for the existence of a file and checking it's acl in open_file(), the file can vanish. In this case the NT_STATUS_OBJECT_NAME_NOT_FOUND from the acl check (which is only performed if the file existed) is treated as an error. Instead the parent access should be checked in this case and the file should be created if O_CREAT was specified (i.e. if the disposition was OPEN_IF). This can be reproduced with the defer_open test on a busy system, but is only one of several failure causes, and not the most frequent one.
Created attachment 10281 [details] Patch for v4-1-test, cherry-picked from master. Patch for v4-1-test, cherry-picked from master.
Comment on attachment 10281 [details] Patch for v4-1-test, cherry-picked from master. LGTM.
Re-assigning to Karolin for inclusion in 4.1.next.
Gosh, there is a subsequent failure... The patch does not seem to be complete. :-( (see samba-technical) Taking the bug away from Karolin for now.
Bah - didn't see that. I'll take a look asap :-). Jeremy.
Created attachment 10282 [details] git-am fix for master. This is the additional fix we need I think. From the mailing list: As we atomically create using O_CREAT|O_EXCL, then if new_file_created is true, then file_existed *MUST* have been false (even if the file was previously detected as being there. We use the variable file_existed again in logic below this statement, so the correct fix is to set file_existed = false, if new_file_created is returned as true from open_file().
Created attachment 10286 [details] Full set of patches (3 of them) that went into master. Applies cleanly to 4.1.next.
(In reply to comment #7) > Created attachment 10286 [details] > Full set of patches (3 of them) that went into master. > > Applies cleanly to 4.1.next. ACK in principle, but we should re-do the patches with cherry-pick -x and BUG:.... info.
Created attachment 10298 [details] updated patchset for 4.1 with cherry-pick- and bug-info Updated Patch for 4.1. We should do the cherry-picks with "git cherry-pick -x ..." so that we see the git hash from master in the release branch commit. I also added "BUG: <url>" tags to the two patches that don't carry them in master. Michael
Comment on attachment 10298 [details] updated patchset for 4.1 with cherry-pick- and bug-info Jeremy, please (re-)ACK this updated patchset. Only commit messages differ. Clean cherry-picks from master.
Comment on attachment 10298 [details] updated patchset for 4.1 with cherry-pick- and bug-info LGTM.
Pushed to autobuild-v4-1-test.
Pushed to v4-1-test. Closing out big report. Thanks!