I just hit a bug, when I transfer BIG file From/To Windows 2003 Server Sp2 via Samba network share - TCP session suddenly disconnects at different file position.
Samba running on Centos 5.3, version 3.4.0 build from sources.
Also tested on binary Centos package 3.0.33 - the same problem.
Both versions of samba working fine with Windows XP Pro SP3 and XP Pro x64 SP2 -no disconnects on transfer BIG files (3-30Gb), all works fine.
Wireshark dump shows:
156 0.006772 220.127.116.11 18.104.22.168 TCP [TCP segment of a reassembled PDU]
157 0.006776 22.214.171.124 126.96.36.199 SMB Read AndX Response, 4096 bytes
158 0.006782 188.8.131.52 184.108.40.206 NBSS Session keep-alive
159 0.006793 220.127.116.11 18.104.22.168 TCP nimreg > netbios-ssn [ACK] Seq=316 Ack=188231 Win=65531 [TCP CHECKSUM INCORRECT] Len=0
160 0.006813 22.214.171.124 126.96.36.199 TCP [TCP Dup ACK 159#1] nimreg > netbios-ssn [ACK] Seq=316 Ack=188231 Win=65531 [TCP CHECKSUM INCORRECT] Len=0
161 0.006823 188.8.131.52 184.108.40.206 TCP nimreg > netbios-ssn [RST, ACK] Seq=316 Ack=188231 Win=0 Len=0
[2009/07/16 19:31:57, 1] smbd/service.c:make_connection_snum(1033)
server (220.127.116.11) connect to service user initially as user user (uid=503, gid=503) (pid 2534)
[2009/07/16 19:38:57, 0] lib/util_sock.c:read_data(534)
read_data: read failure for 4 bytes to client 18.104.22.168. Error = Connection reset by peer
[2009/07/16 19:38:57, 0] lib/util_sock.c:write_data(562)
write_data: write failure in writing to client 22.214.171.124. Error Broken pipe
[2009/07/16 19:38:57, 0] lib/util_sock.c:send_smb(761)
Error writing 75 bytes to client. -1. (Broken pipe)
Any ideas ?
I can send more wireshark's dumps if needed.
Created attachment 4439 [details]
tcpdump last second of transfer
Mister Volker reports workaround for this trouble:
Try to set "keepalive = 0" in the [global] section of your smb.conf.
Thanx a lot for this! It`s works!
reopening bcause this is still unfixed
Bjorn, can you add a wireshark trace showing the problem with a modern client please ?
hm, I cannot reproduce it with a current client, not even with a XP client. But I saw this issue several times in tha past and disabling the keepalives was the way to work around it. As we didn't fix something here in Samba, maybe Microsoft made Windows keppalive-tolerant on port 445?
In any case, given that we recommend TCP Keepalives with SMB2 and above anyway, this also works for SMBv1 connections then. Should we just change the default of the SMBv1 "keepalive" parameter to 0 or even deprecate and remove it to be sure that certain old clients don't fall over it?