Bug 12791 - kernel oplocks still have issues with named streams
Summary: kernel oplocks still have issues with named streams
Status: RESOLVED FIXED
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: File services (show other bugs)
Version: unspecified
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Karolin Seeger
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-05-12 16:27 UTC by Ralph Böhme
Modified: 2017-08-15 08:27 UTC (History)
3 users (show)

See Also:


Attachments
Patch for 4.5 an 4.6 backported from master (55.50 KB, patch)
2017-08-11 08:18 UTC, Ralph Böhme
vl: review+
slow: review? (rsharpe)
Details
Patch for 4.7 cherry-picked from master (55.54 KB, patch)
2017-08-11 08:19 UTC, Ralph Böhme
vl: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ralph Böhme 2017-05-12 16:27:08 UTC
On a customer system with "kernel oplocks = yes" and named streams (vfs_fruit and vfs_streams_xattr), I'm seeing the following the logs:

  [2017/05/12 15:31:18.526757,  0, pid=25666] ../source3/lib/util.c:791(smb_panic_s3)
    PANIC (pid 25666): Kernel oplock holder didn't respond to break message

and

  [2017/05/11 15:25:06.026989,  0, pid=35643] ../source3/smbd/oplock_linux.c:184(linux_release_kernel_oplock)
    linux_release_kernel_oplock: Error when removing kernel oplock on file ... Error was Resource temporarily unavailable

This is with 4.6.3.

Still investigating, but I can reproduce the second message with an smbtorture test modelled after the failure from a pcap.

The problem is related to opening the base file for a stream from vfs_streams_xattr when there's an existing kernel oplock on the file. Looks like the previous fix for bug #7537 doesn't work for all cases.

I'm currently testing a fix which involves a larger change to vfs_streams_xattr to not return and use real fds anymore. All filesytem IO operations are converted to path based versions and streams_xattr_open() will just return a dupped pipe fd.
Comment 1 Ralph Böhme 2017-08-11 08:18:53 UTC
Created attachment 13459 [details]
Patch for 4.5 an 4.6 backported from master
Comment 2 Ralph Böhme 2017-08-11 08:19:36 UTC
Created attachment 13460 [details]
Patch for 4.7 cherry-picked from master
Comment 3 Karolin Seeger 2017-08-14 08:07:53 UTC
Pushed to autobuild-v4-{7,6,5}-test.
Comment 4 Karolin Seeger 2017-08-15 08:27:07 UTC
(In reply to Karolin Seeger from comment #3)
Pushed to all branches.
Closing out bug report.

Thanks!