[Pkg-samba-maint] Bug#686367: cifs-utils: copying using cp to cifs filesystem produces broken file, but cp does not report an error

Sergey Spiridonov sena at hurd.homeunix.org
Fri Aug 31 16:03:50 UTC 2012


Package: cifs-utils
Version: 2:4.5-2+squeeze1
Severity: important


File with the size around 300MB was copied to the cifs filesystem mounted over 
openvpn connection using "cp" command. Command succeded, cp returns no error, 
but the file was broken. Size was exactly as original, but some bzip2 blocks 
were changed. Log inspection shows that there were errors during copying.

This is excerpt from source host (time is Brazilian):

Aug 29 10:21:23 bighit kernel: [192420.208013]  CIFS VFS: No response
to cmd 47 mid 40237
Aug 29 10:21:23 bighit kernel: [192420.208018]  CIFS VFS: Write2 ret
-11, wrote 0
Aug 29 10:21:33 bighit kernel: [192430.208276]  CIFS VFS: Write2 ret
-112, wrote 0
Aug 29 10:21:43 bighit kernel: [192440.208027]  CIFS VFS: Write2 ret
-112, wrote 0
Aug 29 10:21:53 bighit kernel: [192450.208277]  CIFS VFS: Write2 ret
-112, wrote 0
Aug 29 10:22:03 bighit kernel: [192460.212279]  CIFS VFS: Write2 ret
-112, wrote 0
Aug 29 10:22:13 bighit kernel: [192470.208034]  CIFS VFS: Write2 ret
-112, wrote 0
Aug 29 10:22:23 bighit kernel: [192480.208279]  CIFS VFS: Write2 ret
-112, wrote 0
Aug 29 10:22:33 bighit kernel: [192490.208280]  CIFS VFS: Write2 ret
-112, wrote 0
Aug 29 10:22:43 bighit kernel: [192500.208280]  CIFS VFS: Write2 ret
-112, wrote 0
Aug 29 10:22:53 bighit kernel: [192510.208028]  CIFS VFS: Write2 ret
-112, wrote 0
Aug 29 10:23:03 bighit kernel: [192520.208034]  CIFS VFS: Write2 ret
-112, wrote 0
Aug 29 10:23:08 bighit ovpn-tun0[2264]: [support at gamic.com] Inactivity
timeout (--ping-restart), restarting
Aug 29 10:23:08 bighit ovpn-tun0[2264]: /sbin/ifconfig tun0 0.0.0.0
...
Aug 29 10:24:50 bighit kernel: [192627.396019]  CIFS VFS: No response
for cmd 50 mid 40255
Aug 29 10:25:14 bighit kernel: [192651.188021]  CIFS VFS: No response
for cmd 50 mid 40261
Aug 29 10:25:37 bighit kernel: [192674.976786]  CIFS VFS: No response
for cmd 50 mid 40267
Aug 29 10:26:01 bighit kernel: [192698.716024]  CIFS VFS: No response
for cmd 50 mid 40273
Aug 29 10:26:25 bighit kernel: [192722.528028]  CIFS VFS: No response
for cmd 50 mid 40279
Aug 29 10:26:49 bighit kernel: [192746.268275]  CIFS VFS: No response
for cmd 50 mid 40285
Aug 29 10:27:12 bighit kernel: [192769.976033]  CIFS VFS: No response
for cmd 50 mid 40291
Aug 29 10:27:36 bighit kernel: [192793.976532]  CIFS VFS: No response
for cmd 50 mid 40297
Aug 29 10:28:00 bighit kernel: [192817.808027]  CIFS VFS: No response
for cmd 50 mid 40303


On the destination host we got following errors in /var/log/samba/log.10.8.0.26:

[2012/08/29 17:21:17.050641,  0] smbd/process.c:244(read_packet_remainder)
  read_fd_with_timeout failed for client 0.0.0.0 read error = NT_STATUS_CONNECTION_RESET.
[2012/08/29 19:05:12.543143,  0] smbd/oplock.c:330(oplock_timeout_handler)
  Oplock break failed for file SEMINARS/WSN12_Rio_de_Janeiro_2012_Nowcasting/wsn12.tar.bz2 -- replying anyway


Please note: time is different because source and destination hosts are in different timezones (Brazil and Germany).

That is all suspicious log activity that I found.

Kernel version on source host:
is 2.6.32-5-686-bigmem, destination host has 3.2.0-0.bpo.2-amd64 (both debian-squeeze 32 bit). I believe that 
destination host is most probably OK. The culprit is probably cifs on source host that ignored errors.

Samba version on destination host is 2:3.6.6-2~bpo60+1

-- System Information:
Debian Release: 6.0.5
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: i386 (x86_64)

Kernel: Linux 2.6.32-5-686-bigmem (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages cifs-utils depends on:
ii  libc6             2.11.3-3               Embedded GNU C Library: Shared lib
ii  libkeyutils1      1.4-1                  Linux Key Management Utilities (li
ii  libkrb5-3         1.8.3+dfsg-4squeeze6   MIT Kerberos runtime libraries
ii  libtalloc2        2.0.1-1                hierarchical pool based memory all
ii  samba-common      2:3.5.6~dfsg-3squeeze8 common files used by both the Samb

cifs-utils recommends no packages.

Versions of packages cifs-utils suggests:
ii  smbclient         2:3.5.6~dfsg-3squeeze8 command-line SMB/CIFS clients for 

-- no debconf information



More information about the Pkg-samba-maint mailing list