Bug 6744 - File corruption using smbclient with NT4 server
File corruption using smbclient with NT4 server
Status: RESOLVED DUPLICATE of bug 6606
Product: Samba 3.3
Classification: Unclassified
Component: Client tools
3.3.7
x86 Linux
: P3 normal
: ---
Assigned To: Volker Lendecke
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-09-18 12:00 UTC by Chris Allen
Modified: 2009-09-19 10:18 UTC (History)
0 users

See Also:


Attachments
Test file used in transfer tests (130.12 KB, text/plain)
2009-09-18 12:02 UTC, Chris Allen
no flags Details
Log file for corrupt transfer (19.03 KB, text/plain)
2009-09-18 12:03 UTC, Chris Allen
no flags Details
Log file for corrupt transfer (with -b 1200) (16.96 KB, text/plain)
2009-09-18 12:03 UTC, Chris Allen
no flags Details
Log file for successful transfer (21.77 KB, text/plain)
2009-09-18 12:04 UTC, Chris Allen
no flags Details
Packet capture of file transfer (130.99 KB, application/octet-stream)
2009-09-18 13:32 UTC, Chris Allen
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Allen 2009-09-18 12:00:24 UTC
Using smbclient 3.3 to transfer a file from a NT4 box (with SP6a) results in file corruption:

$ smbclient \\\\galah\\dev_tools
Domain=[MATRIX_SCIENCE] OS=[Windows NT 4.0] Server=[NT LAN Manager 4.0]
smb: \> cd python\2.4\Lib\test
smb: \python\2.4\Lib\test\> get test_datetime.py
getting file \python\2.4\Lib\test\test_datetime.py of size 133244 as test_datetime.py (2069.9 kb/s) (average 2069.9 kb/s)
smb: \python\2.4\Lib\test\> quit
$ cksum test_datetime_orig.py test_datetime.py
2759204463 133244 test_datetime_orig.py
3324866967 125056 test_datetime.py

Corruption always seems to occur at 60KB chunks where a block of data is missing (internal buffer is truncated somewhere?).  Changing the transmit buffer size (eg. "-b 1200") doesn't make any difference to the end result.

Using the same smbclient to transfer the file from Win2000 works just fine.  If you use smbclient 3.0 (CentOS 4) then it transfers the file from the NT4 box without corruption.

$ lsb_release -d
Description:    Debian GNU/Linux 5.0.3 (lenny)

$ apt-cache policy sernet-samba
sernet-samba:
  Installed: 3.3.7-25
  Candidate: 3.3.7-25
  Version table:
 *** 3.3.7-25 0
        500 http://ftp.sernet.de lenny/main Packages
        100 /var/lib/dpkg/status
Comment 1 Chris Allen 2009-09-18 12:02:28 UTC
Created attachment 4716 [details]
Test file used in transfer tests
Comment 2 Chris Allen 2009-09-18 12:03:16 UTC
Created attachment 4717 [details]
Log file for corrupt transfer
Comment 3 Chris Allen 2009-09-18 12:03:50 UTC
Created attachment 4718 [details]
Log file for corrupt transfer (with -b 1200)
Comment 4 Chris Allen 2009-09-18 12:04:13 UTC
Created attachment 4719 [details]
Log file for successful transfer
Comment 5 Volker Lendecke 2009-09-18 12:16:25 UTC
This might be a bug that I just fixed in master. Can you please also upload a network trace of a failure to make sure? Information on how to create useful network traces can be found under http://wiki.samba.org/index.php/Capture_Packets

Thanks,

Volker
Comment 6 Chris Allen 2009-09-18 12:40:09 UTC
Sure.  Is the file transfer itself sufficient, or do you need the SMB session setup as well?
Comment 7 Volker Lendecke 2009-09-18 12:41:51 UTC
For that particular bug the file transfer as such is sufficient. If you can, please also send the session setup, maybe the problem is somewhere else.

Thanks,

Volker
Comment 8 Volker Lendecke 2009-09-18 13:15:37 UTC
With https://bugzilla.samba.org/attachment.cgi?id=4720&action=view I've uploaded a port of the fixes for the original bug 6606. Can you try if that helps? Please nevertheless upload the network trace.

Thanks,

Volker
Comment 9 Chris Allen 2009-09-18 13:32:07 UTC
Created attachment 4721 [details]
Packet capture of file transfer
Comment 10 Volker Lendecke 2009-09-18 19:33:36 UTC
(In reply to comment #9)
> Created an attachment (id=4721) [details]
> Packet capture of file transfer

Thanks! Yes, the patch should do it. We asked for 65534 bytes but only got 61440. The patch in https://bugzilla.samba.org/attachment.cgi?id=4720&action=view for bug 6606 fixes exactly that. Is there any way you can try that?

Thanks,

Volker
Comment 11 Volker Lendecke 2009-09-19 10:18:53 UTC

*** This bug has been marked as a duplicate of bug 6606 ***