Brian Cowan
2006-Nov-16  19:50 UTC
[Samba] STATUS_INVALID_LOCK_SEQUENCE when writing to a file....
[Note to moderator, I couldn't remember which email account I subscribed 
to this list from. Sorry...]
Hi All,
Have any of you seen this little darling of an error on writing to a
file? The sequence of events goes something like this:
1) File is opened for reading on a Samba server with oplocks disabled.
Open request is requesting a batch oplock.
2) File open SUCCEEDS. (Should this have happened?)
3) File is read, stat'd etc. over and over.
4) A request comes through to write to the file.
5) STATUS_INVALID_LOCK_SEQUENCE Error happens.
I think that the client had an odd interpretation of what a batch oplock
let it get away with. There is also a filter driver in the way that does
odd things (ClearCase MVFS), and this could be related, but the odd
thing is that the error ONLY happens when accessing [ClearCase Views on]
Samba shares. I'm thinking that the client thought it could do anything
it wanted since it thought it had a batch oplock.
My question is, shouldn't the samba server "bounce" an open
request that
includes a request for a Batch Oplock (or any oplock at all, for that
matter)?
Yes, I have a network trace that shows the problem, but I can't exactly
sent it out since it contains proprietary information.
Thanks!
Brian Cowan
Samba information:
Samba version:  2.2.8a.
smb.conf file from View server appserv2:
# Samba config file created using
# Global parameters
[global]
         netbios name = appserv2
         netbios aliases = appserv2
         interfaces = 192.168.140.243/255.255.255.0
        include = /usr/local/ct/samba/smb.conf
[smb-test]
         comment = Samba Testing Filesystem
         path = /smb-test
         read only = No
        valid users = dowens pgraves tooladm bpepin
[view]
        comment = MVFS View Storage Container
        path = /view
        read only = Yes
[vstore1]
        comment = ERM View Storage Container
        path = /vstore1
        read only = No
-- smb.conf file included by the above server
# Samba config file created using
# Global parameters
[global]
         workgroup = ENG
         security = domain
         encrypt passwords = yes
         password server = svr1
         username map = /usr/local/ct/samba/username.map
         password level = 4
         log level = 1
         log file = /opt/local/samba/log/%m.%a
         max log size = 20
         name resolve order = hosts wins bcast lmhosts
         deadtime = 60
         max open files = 8192
         socket options = TCP_NODELAY IPTOS_LOWDELAY
         load printers = No
         os level = 40
         preferred master = Yes
         wins server = 10.254.66.26
         kernel oplocks = No
         message command = /bin/mail -s 'message from #% on %m' bpepin
<%s; rm %s
         homedir map = auto.xxx
         comment = Samba ver. %v
         invalid users = @wheel, mail, deamon, adt
         create mask = 0775
         directory mask = 0775
         oplocks = No
        level2 oplocks = No
        case sensitive = No
        preserve case = Yes
Brian Cowan
2006-Nov-16  21:25 UTC
[Samba] STATUS_INVALID_LOCK_SEQUENCE when writing to a file....
Hi All,
Have any of you seen this little darling of an error on writing to a 
file? The sequence of events goes something like this:
1) File is opened for reading on a Samba server with oplocks disabled. 
Open request is requesting a batch oplock.
2) File open SUCCEEDS. (Should this have happened?)
3) File is read, stat'd etc. over and over.
4) A request comes through to write to the file.
5) STATUS_INVALID_LOCK_SEQUENCE Error happens.
I think that the client had an odd interpretation of what a batch oplock 
let it get away with. There is also a filter driver in the way that does 
odd things (ClearCase MVFS), and this could be related, but the odd 
thing is that the error ONLY happens when accessing [ClearCase Views on] 
Samba shares. I'm thinking that the client thought it could do anything 
it wanted since it thought it had a batch oplock.
My question is, shouldn't the samba server "bounce" an open
request that
includes a request for a Batch Oplock (or any oplock at all, for that 
matter)?
Yes, I have a network trace that shows the problem, but I can't exactly 
sent it out since it contains proprietary information.
Thanks!
Brian Cowan
Samba information:
Samba version:  2.2.8a.
smb.conf file from View server appserv2:
# Samba config file created using
# Global parameters
[global]
         netbios name = appserv2
         netbios aliases = appserv2
         interfaces = 192.168.140.243/255.255.255.0
        include = /usr/local/ct/samba/smb.conf
[smb-test]
         comment = Samba Testing Filesystem
         path = /smb-test
         read only = No
        valid users = dowens pgraves tooladm bpepin
[view]
        comment = MVFS View Storage Container
        path = /view
        read only = Yes
[vstore1]
        comment = ERM View Storage Container
        path = /vstore1
        read only = No
-- smb.conf file included by the above server
# Samba config file created using
# Global parameters
[global]
         workgroup = ENG
         security = domain
         encrypt passwords = yes
         password server = svr1
         username map = /usr/local/ct/samba/username.map
         password level = 4
         log level = 1
         log file = /opt/local/samba/log/%m.%a
         max log size = 20
         name resolve order = hosts wins bcast lmhosts
         deadtime = 60
         max open files = 8192
         socket options = TCP_NODELAY IPTOS_LOWDELAY
         load printers = No
         os level = 40
         preferred master = Yes
         wins server = 10.254.66.26
         kernel oplocks = No
         message command = /bin/mail -s 'message from #% on %m' bpepin 
<%s; rm %s
         homedir map = auto.xxx
         comment = Samba ver. %v
         invalid users = @wheel, mail, deamon, adt
         create mask = 0775
         directory mask = 0775
         oplocks = No
        level2 oplocks = No
        case sensitive = No
        preserve case = Yes
Brian Cowan
2006-Nov-16  21:25 UTC
[Samba] STATUS_INVALID_LOCK_SEQUENCE when writing to a file....
Hi All,
Have any of you seen this little darling of an error
on writing to a
file? The sequence of events goes something like this:
1) File is opened for reading on a Samba server with
oplocks disabled.
Open request is requesting a batch oplock.
2) File open SUCCEEDS. (Should this have happened?)
3) File is read, stat'd etc. over and over.
4) A request comes through to write to the file.
5) STATUS_INVALID_LOCK_SEQUENCE Error happens.
I think that the client had an odd interpretation of
what a batch oplock
let it get away with. There is also a filter driver in
the way that does
odd things (ClearCase MVFS), and this could be
related, but the odd
thing is that the error ONLY happens when accessing
[ClearCase Views on]
Samba shares. I'm thinking that the client thought it
could do anything
it wanted since it thought it had a batch oplock.
My question is, shouldn't the samba server "bounce" an
open request that
includes a request for a Batch Oplock (or any oplock
at all, for that
matter)?
Yes, I have a network trace that shows the problem,
but I can't exactly
sent it out since it contains proprietary information.
Thanks!
Brian Cowan
Samba information:
Samba version:  2.2.8a.
smb.conf file from View server appserv2:
# Samba config file created using
# Global parameters
[global]
         netbios name = appserv2
         netbios aliases = appserv2
         interfaces = 192.168.140.243/255.255.255.0
        include = /usr/local/ct/samba/smb.conf
[smb-test]
         comment = Samba Testing Filesystem
         path = /smb-test
         read only = No
        valid users = dowens pgraves tooladm bpepin
[view]
        comment = MVFS View Storage Container
        path = /view
        read only = Yes
[vstore1]
        comment = ERM View Storage Container
        path = /vstore1
        read only = No
-- smb.conf file included by the above server
# Samba config file created using
# Global parameters
[global]
         workgroup = ENG
         security = domain
         encrypt passwords = yes
         password server = svr1
         username map /usr/local/ct/samba/username.map
         password level = 4
         log level = 1
         log file = /opt/local/samba/log/%m.%a
         max log size = 20
         name resolve order = hosts wins bcast lmhosts
         deadtime = 60
         max open files = 8192
         socket options = TCP_NODELAY IPTOS_LOWDELAY
         load printers = No
         os level = 40
         preferred master = Yes
         wins server = 10.254.66.26
         kernel oplocks = No
         message command = /bin/mail -s 'message from
#% on %m' bpepin
<%s; rm %s
         homedir map = auto.xxx
         comment = Samba ver. %v
         invalid users = @wheel, mail, deamon, adt
         create mask = 0775
         directory mask = 0775
         oplocks = No
        level2 oplocks = No
        case sensitive = No
        preserve case = Yes
 
____________________________________________________________________________________
Do you Yahoo!?
Everyone is raving about the all-new Yahoo! Mail beta.
http://new.mail.yahoo.com
Jeremy Allison
2006-Nov-16  22:22 UTC
[Samba] STATUS_INVALID_LOCK_SEQUENCE when writing to a file....
On Thu, Nov 16, 2006 at 02:42:57PM -0500, Brian Cowan wrote:> [Note to moderator, I couldn't remember which email account I subscribed > to this list from. Sorry...] > > Hi All, > > Have any of you seen this little darling of an error on writing to a > file? The sequence of events goes something like this: > 1) File is opened for reading on a Samba server with oplocks disabled. > Open request is requesting a batch oplock. > 2) File open SUCCEEDS. (Should this have happened?) > 3) File is read, stat'd etc. over and over. > 4) A request comes through to write to the file. > 5) STATUS_INVALID_LOCK_SEQUENCE Error happens. > > I think that the client had an odd interpretation of what a batch oplock > let it get away with. There is also a filter driver in the way that does > odd things (ClearCase MVFS), and this could be related, but the odd > thing is that the error ONLY happens when accessing [ClearCase Views on] > Samba shares. I'm thinking that the client thought it could do anything > it wanted since it thought it had a batch oplock. > > My question is, shouldn't the samba server "bounce" an open request that > includes a request for a Batch Oplock (or any oplock at all, for that > matter)? > > Yes, I have a network trace that shows the problem, but I can't exactly > sent it out since it contains proprietary information. > > Thanks! > > Brian Cowan > > > Samba information: > Samba version: 2.2.8a.This is a very old version. Any chance you can test with the recently released 3.0.23d ? Jeremy.