Discussion:
CIFS VFS: Send error in Flush = -9
Jeff Berman
2013-10-18 06:33:27 UTC
Permalink
Hi there,

I'm seeing CIFS errors in my system log:

Oct 17 21:48:21 Server1 kernel: [201068.584384] CIFS VFS: Send error in=
Flush =3D -9
Oct 17 21:48:22 Server1 kernel: [201070.351555] CIFS VFS: Send error in=
Flush =3D -9
Oct 17 21:48:22 Server1 kernel: [201070.352653] CIFS VFS: Send error in=
Flush =3D -9

There's a block of 17 of those, all taking place within a few seconds. =
=A0This has happened a few times in the past several days. =A0The clien=
t machine is Ubuntu 12.04 LTS, the cifs-utils version is 2:5.1-1ubuntu2=
, and the cifs.ko version is 1.78. =A0The server is Windows Home Server=
2011; both of these systems are virtualized in the same physical box. =
=A0The Windows event log doesn't show anything happening during this ti=
me period.

I see that this was mentioned back in February (http://article.gmane.or=
g/gmane.linux.kernel.cifs/7844). =A0Did anything ever come of this? =A0=
Is it perhaps fixed in a more recent version? =A0This is particularly b=
ad for me, because this SMB share is used to store backups, and when th=
e CIFS VFS error occurs it corrupts the backup archive.

My Linux skills aren't very strong, but I'm happy to do what I can to p=
rovide more or better info.

Thanks!
Jeff Berman
2014-01-30 19:38:37 UTC
Permalink
Hi there,

I'm getting lots of CIFS errors in my system log:

Jan 30 08:46:05 Server1 kernel: [747319.264235] CIFS VFS: Send error in=
Flush =3D -9
Jan 30 08:46:05 Server1 kernel: [747319.264235] CIFS VFS: Send error in=
Flush =3D -9
Jan 30 08:46:05 Server1 kernel: [747319.264235] CIFS VFS: Send error in=
Flush =3D -9

Usually 10-20 messages will appear at once like this.=A0 This had happe=
ned occasionally when I was on Ubuntu 12.04 LTS, but since upgrading to=
Ubuntu 13.10 they are appearing daily (I actually upgraded to get a ne=
wer version of cifs-utils in the hopes that the problem would go away).

Modinfo cifs shows cifs.ko at version 2.01, and cifs-utils is at 6.0.

The share is mounted via fstab:
//server2/share /media/tm cifs credentials=3D/home/jeff/.smbcredentials=
,_netdev,uid=3Djeff,gid=3Djeff,file_mode=3D0777,dir_mode=3D0777,iochars=
et=3Dutf8,sec=3Dntlm 0 0


Any suggestions of how to work around this or how to provide more info?

Thanks!
Jeff Berman
2014-01-31 19:20:24 UTC
Permalink
Hi there,

I'm getting lots of CIFS errors in my system log:

Jan 30 08:46:05 Server1 kernel: [747319.264235] CIFS VFS: Send error
in Flush = -9
Jan 30 08:46:05 Server1 kernel: [747319.264235] CIFS VFS: Send error
in Flush = -9
Jan 30 08:46:05 Server1 kernel: [747319.264235] CIFS VFS: Send error
in Flush = -9

Usually 10-20 messages will appear at once like this. This had happened
occasionally when I was on Ubuntu 12.04 LTS, but since upgrading to
Ubuntu 13.10 they are appearing daily (I actually upgraded to get a
newer version of cifs-utils in the hopes that the problem would go away).

Modinfo cifs shows cifs.ko at version 2.01, and cifs-utils is at 6.0.

The share is mounted via fstab:
//server2/share /media/tm cifs credentials=/home/jeff/.smbcredentials,
_netdev,uid=jeff,gid=jeff,file_mode=0777,dir_mode=0777,iocharset=utf8
,sec=ntlm 0 0

I increased logging to level "3" and here is what's going on when the first
Flush error occurs (sorry about the formatting, Gmane is limiting each
line to 80 chars):

Jan 31 06:17:36 Server1 kernel: [70838.026873] /build/buildd/linux-3.11.0/
fs/cifs/connect.c: RFC1002 header 0x23
Jan 31 06:17:36 Server1 kernel: [70838.026879] /build/buildd/linux-3.11.0/
fs/cifs/misc.c: checkSMB Length: 0x27, smb_buf_length: 0x23
Jan 31 06:17:36 Server1 kernel: [70838.026889] /build/buildd/linux-3.11.0/
fs/cifs/transport.c: cifs_sync_mid_result: cmd=5 mid=34092 state=4
Jan 31 06:17:36 Server1 kernel: [70838.026893] /build/buildd/linux-3.11.0/
fs/cifs/file.c: CIFS VFS: leaving cifs_strict_fsync (xid = 2694478) rc = 0
Jan 31 06:17:36 Server1 kernel: [70838.027602] /build/buildd/linux-3.11.0/
fs/cifs/file.c: CIFS VFS: in cifs_strict_fsync as Xid: 2694479 with uid: 1000
Jan 31 06:17:36 Server1 kernel: [70838.027606] /build/buildd/linux-3.11.0/
fs/cifs/file.c: Sync file - name: 1c datasync: 0x0
Jan 31 06:17:36 Server1 kernel: [70838.027610] /build/buildd/linux-3.11.0/
fs/cifs/cifssmb.c: In CIFSSMBFlush
Jan 31 06:17:36 Server1 kernel: [70838.027614] /build/buildd/linux-3.11.0/
fs/cifs/transport.c: For smb_command 5
Jan 31 06:17:36 Server1 kernel: [70838.027618] /build/buildd/linux-3.11.0/
fs/cifs/transport.c: Sending smb: smb_len=37
Jan 31 06:17:36 Server1 kernel: [70838.027875] /build/buildd/linux-3.11.0/
fs/cifs/connect.c: RFC1002 header 0x23
Jan 31 06:17:36 Server1 kernel: [70838.027882] /build/buildd/linux-3.11.0/
fs/cifs/misc.c: checkSMB Length: 0x27, smb_buf_length: 0x23
Jan 31 06:17:36 Server1 kernel: [70838.027896] /build/buildd/linux-3.11.0/
fs/cifs/transport.c: cifs_sync_mid_result: cmd=5 mid=34093 state=4
Jan 31 06:17:36 Server1 kernel: [70838.027900] Status code returned 0xc0000008
NT_STATUS_INVALID_HANDLE
Jan 31 06:17:36 Server1 kernel: [70838.027906] /build/buildd/linux-3.11.0/
fs/cifs/netmisc.c: Mapping smb error code 0xc0000008 to POSIX err -9
Jan 31 06:17:36 Server1 kernel: [70838.027910] CIFS VFS: Send error in Flush = -9
Jan 31 06:17:36 Server1 kernel: [70838.027915] /build/buildd/linux-3.11.0/
fs/cifs/file.c: CIFS VFS: leaving cifs_strict_fsync (xid = 2694479) rc = -9
Jan 31 06:17:36 Server1 kernel: [70838.027981] /build/buildd/linux-3.11.0/
fs/cifs/xattr.c: CIFS VFS: in cifs_getxattr as Xid: 2694480 with uid: 1000
Jan 31 06:17:36 Server1 kernel: [70838.027985] /build/buildd/linux-3.11.0/
fs/cifs/dir.c: name: \afpd.log
Jan 31 06:17:36 Server1 kernel: [70838.027989] /build/buildd/linux-3.11.0/
fs/cifs/xattr.c: Security xattr namespace not supported yet
Jan 31 06:17:36 Server1 kernel: [70838.027992] /build/buildd/linux-3.11.0/
fs/cifs/xattr.c: CIFS VFS: leaving cifs_getxattr (xid = 2694480) rc = -95

Any suggestions of how to work around this or how I could provide more info?


Thanks!
Shirish Pargaonkar
2014-01-31 20:07:57 UTC
Permalink
-9 is EBADF.

If you can send a wireshark trace of traffic between client and server
that would be helpful.
Post by Jeff Berman
Hi there,
Jan 30 08:46:05 Server1 kernel: [747319.264235] CIFS VFS: Send error
in Flush = -9
Jan 30 08:46:05 Server1 kernel: [747319.264235] CIFS VFS: Send error
in Flush = -9
Jan 30 08:46:05 Server1 kernel: [747319.264235] CIFS VFS: Send error
in Flush = -9
Usually 10-20 messages will appear at once like this. This had happened
occasionally when I was on Ubuntu 12.04 LTS, but since upgrading to
Ubuntu 13.10 they are appearing daily (I actually upgraded to get a
newer version of cifs-utils in the hopes that the problem would go away).
Modinfo cifs shows cifs.ko at version 2.01, and cifs-utils is at 6.0.
//server2/share /media/tm cifs credentials=/home/jeff/.smbcredentials,
_netdev,uid=jeff,gid=jeff,file_mode=0777,dir_mode=0777,iocharset=utf8
,sec=ntlm 0 0
I increased logging to level "3" and here is what's going on when the first
Flush error occurs (sorry about the formatting, Gmane is limiting each
Jan 31 06:17:36 Server1 kernel: [70838.026873] /build/buildd/linux-3.11.0/
fs/cifs/connect.c: RFC1002 header 0x23
Jan 31 06:17:36 Server1 kernel: [70838.026879] /build/buildd/linux-3.11.0/
fs/cifs/misc.c: checkSMB Length: 0x27, smb_buf_length: 0x23
Jan 31 06:17:36 Server1 kernel: [70838.026889] /build/buildd/linux-3.11.0/
fs/cifs/transport.c: cifs_sync_mid_result: cmd=5 mid=34092 state=4
Jan 31 06:17:36 Server1 kernel: [70838.026893] /build/buildd/linux-3.11.0/
fs/cifs/file.c: CIFS VFS: leaving cifs_strict_fsync (xid = 2694478) rc = 0
Jan 31 06:17:36 Server1 kernel: [70838.027602] /build/buildd/linux-3.11.0/
fs/cifs/file.c: CIFS VFS: in cifs_strict_fsync as Xid: 2694479 with uid: 1000
Jan 31 06:17:36 Server1 kernel: [70838.027606] /build/buildd/linux-3.11.0/
fs/cifs/file.c: Sync file - name: 1c datasync: 0x0
Jan 31 06:17:36 Server1 kernel: [70838.027610] /build/buildd/linux-3.11.0/
fs/cifs/cifssmb.c: In CIFSSMBFlush
Jan 31 06:17:36 Server1 kernel: [70838.027614] /build/buildd/linux-3.11.0/
fs/cifs/transport.c: For smb_command 5
Jan 31 06:17:36 Server1 kernel: [70838.027618] /build/buildd/linux-3.11.0/
fs/cifs/transport.c: Sending smb: smb_len=37
Jan 31 06:17:36 Server1 kernel: [70838.027875] /build/buildd/linux-3.11.0/
fs/cifs/connect.c: RFC1002 header 0x23
Jan 31 06:17:36 Server1 kernel: [70838.027882] /build/buildd/linux-3.11.0/
fs/cifs/misc.c: checkSMB Length: 0x27, smb_buf_length: 0x23
Jan 31 06:17:36 Server1 kernel: [70838.027896] /build/buildd/linux-3.11.0/
fs/cifs/transport.c: cifs_sync_mid_result: cmd=5 mid=34093 state=4
Jan 31 06:17:36 Server1 kernel: [70838.027900] Status code returned 0xc0000008
NT_STATUS_INVALID_HANDLE
Jan 31 06:17:36 Server1 kernel: [70838.027906] /build/buildd/linux-3.11.0/
fs/cifs/netmisc.c: Mapping smb error code 0xc0000008 to POSIX err -9
Jan 31 06:17:36 Server1 kernel: [70838.027910] CIFS VFS: Send error in Flush = -9
Jan 31 06:17:36 Server1 kernel: [70838.027915] /build/buildd/linux-3.11.0/
fs/cifs/file.c: CIFS VFS: leaving cifs_strict_fsync (xid = 2694479) rc = -9
Jan 31 06:17:36 Server1 kernel: [70838.027981] /build/buildd/linux-3.11.0/
fs/cifs/xattr.c: CIFS VFS: in cifs_getxattr as Xid: 2694480 with uid: 1000
Jan 31 06:17:36 Server1 kernel: [70838.027985] /build/buildd/linux-3.11.0/
fs/cifs/dir.c: name: \afpd.log
Jan 31 06:17:36 Server1 kernel: [70838.027989] /build/buildd/linux-3.11.0/
fs/cifs/xattr.c: Security xattr namespace not supported yet
Jan 31 06:17:36 Server1 kernel: [70838.027992] /build/buildd/linux-3.11.0/
fs/cifs/xattr.c: CIFS VFS: leaving cifs_getxattr (xid = 2694480) rc = -95
Any suggestions of how to work around this or how I could provide more info?
Thanks!
--
To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
More majordomo info at http://vger.kernel.org/majordomo-info.html
Jeff Berman
2014-02-05 09:21:45 UTC
Permalink
Sent: Friday, January 31, 2014 12:07 PM
Subject: Re: CIFS VFS: Send error in Flush =3D -9
=20
-9 is EBADF.
=20
If you can send a wireshark trace of traffic between client and serve=
r
that would be helpful.
=20
=20
=20
Post by Jeff Berman
Hi there,
=20
=20
Jan 30 08:46:05 Server1 kernel: [747319.264235] CIFS VFS: Send erro=
r
Post by Jeff Berman
=A0 in Flush =3D -9
Jan 30 08:46:05 Server1 kernel: [747319.264235] CIFS VFS: Send erro=
r
Post by Jeff Berman
=A0 in Flush =3D -9
Jan 30 08:46:05 Server1 kernel: [747319.264235] CIFS VFS: Send erro=
r
Post by Jeff Berman
=A0 in Flush =3D -9
Ok, I think I did the wireshark trace correctly. =A0It's attached to bu=
g 10417 (https://bugzilla.samba.org/show_bug.cgi?id=3D10417).

Thank you!
Jeff Layton
2014-02-05 11:00:47 UTC
Permalink
On Wed, 5 Feb 2014 01:21:45 -0800 (PST)
=20
Sent: Friday, January 31, 2014 12:07 PM
Subject: Re: CIFS VFS: Send error in Flush =3D -9
=20
-9 is EBADF.
=20
If you can send a wireshark trace of traffic between client and ser=
ver
that would be helpful.
=20
=20
=20
Post by Jeff Berman
Hi there,
=20
=20
Jan 30 08:46:05 Server1 kernel: [747319.264235] CIFS VFS: Send er=
ror
Post by Jeff Berman
=A0 in Flush =3D -9
Jan 30 08:46:05 Server1 kernel: [747319.264235] CIFS VFS: Send er=
ror
Post by Jeff Berman
=A0 in Flush =3D -9
Jan 30 08:46:05 Server1 kernel: [747319.264235] CIFS VFS: Send er=
ror
Post by Jeff Berman
=A0 in Flush =3D -9
=20
=20
Ok, I think I did the wireshark trace correctly. =A0It's attached to =
bug 10417 (https://bugzilla.samba.org/show_bug.cgi?id=3D10417).
=20
Thank you!
Ok, I took a look and I'm pretty sure the problem is the long-standing
bug in how the client tried to use virtual circuits. Applying this
patch from mainline kernels should help things:

commit 9ae6cf606a33b0a762798df0fb742848bcc685b5
Author: Jeff Layton <jlayton-H+wXaHxf7aLQT0dZR+***@public.gmane.org>
Date: Mon Sep 16 11:23:45 2013 -0400

cifs: stop trying to use virtual circuits

Please let us know if it doesn't.

--=20
Jeff Layton <jlayton-H+wXaHxf7aLQT0dZR+***@public.gmane.org>
Jeff Layton
2014-02-06 17:03:17 UTC
Permalink
On Wed, 5 Feb 2014 18:02:10 -0800 (PST)
Hi guys,
=20
I installed a 3.12.9 kernel, but the "Send error in Flush =3D -9" err=
ors still appear in quantity. =A0Any other ideas?
=20
Thanks,
=20
Jeff
=20
(cc'ing linux-cifs -- sorry, I don't do private support unless you're
paying me ;)

What would be best is to reopen the bug and attach a new capture if
you're still seeing the problem. Are there multiple machines involved
that are connecting through any sort of NAT? If so, then they'll all
need the same patch...
=20
----- Original Message -----
Sent: Wednesday, February 5, 2014 10:58 AM
Subject: Re: CIFS VFS: Send error in Flush =3D -9
=20
On Wed, 5 Feb 2014 10:45:16 -0800 (PST)
=20
Hi Jeff,
=20
Thanks for your reply! =A0What you said makes sense to me. =A0I'd=
like to=20
apply the patch but after researching kernel patches for a couple h=
ours I=20
realize that I'm in over my head. =A0I have no problem attempting i=
t, but I=20
can't figure out how to tell if my current kernel contains it alrea=
dy or how=20
to install it (and any needed prerequisites). =A0My Xubuntu install=
ation is at=20
"Ubuntu 3.11.0-15.25-generic 3.11.10".
=20
You're obviously super busy, but can you suggest a link with rele=
vant=20
instructions to follow? =A0There are hundreds of different kernel g=
uides out there=20
dating back over a decade.
=20
Thanks again!
=20
Jeff
=20
=20
I'm pretty sure that patch went into mainline in v3.12, so it's lik=
ely
your v3.11 kernel doesn't have it. The trivial way to get it would =
be
to just move to a v3.12 kernel.
=20
If that's not possible you'll probably just need to get the sources=
for
your kernel apply the patch to it and build it (I assume it should =
just
apply directly with little or no merge conflicts)...or talk the ubu=
ntu
folks into doing it for you.
=20
Good luck!
=20
=20
=20
----- Original Message -----
=20
Sent: Wednesday, February 5, 2014 3:00 AM
Subject: Re: CIFS VFS: Send error in Flush =3D -9
=20
On Wed, 5 Feb 2014 01:21:45 -0800 (PST)
=20
=20
=20
=A0 > Sent: Friday, January 31, 2014 12:07 PM
=A0 > Subject: Re: CIFS VFS: Send error in Flush =3D -9
=A0 >=20
=A0 > -9 is EBADF.
=A0 >=20
=A0 > If you can send a wireshark trace of traffic between clie=
nt=20
and server
=A0 > that would be helpful.
=A0 >=20
=A0 >=20
=A0 >=20
=A0 > On Fri, Jan 31, 2014 at 1:20 PM, Jeff Berman=20
=A0 >>=A0 Hi there,
=A0 >>=20
=A0 >>=20
=A0 >>=A0 Jan 30 08:46:05 Server1 kernel: [747319.264235] CIFS=20
VFS: Send=20
error
=A0 >> =A0 in Flush =3D -9
=A0 >>=A0 Jan 30 08:46:05 Server1 kernel: [747319.264235] CIFS=20
VFS: Send=20
error
=A0 >> =A0 in Flush =3D -9
=A0 >>=A0 Jan 30 08:46:05 Server1 kernel: [747319.264235] CIFS=20
VFS: Send=20
error
=A0 >> =A0 in Flush =3D -9
=20
=20
=A0 Ok, I think I did the wireshark trace correctly. =A0It's=20
attached to bug=20
10417 (https://bugzilla.samba.org/show_bug.cgi?id=3D10417).
=20
=A0 Thank you!
=20
Ok, I took a look and I'm pretty sure the problem is the=20
long-standing
bug in how the client tried to use virtual circuits. Applying t=
his
=20
commit 9ae6cf606a33b0a762798df0fb742848bcc685b5
Date:=A0=A0 Mon Sep 16 11:23:45 2013 -0400
=20
=A0 =A0 cifs: stop trying to use virtual circuits
=20
Please let us know if it doesn't.
=20
=20
--=20
=20
=20
=20
=20
--=20
=20
--=20
Jeff Layton <jlayton-H+wXaHxf7aLQT0dZR+***@public.gmane.org>

Loading...