Bug 6558 - Windows Server 2003 file transfer TCP Reset after NBSS Session Keep-Alive packet from Samba
Summary: Windows Server 2003 file transfer TCP Reset after NBSS Session Keep-Alive pac...
Status: REOPENED
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: File services (show other bugs)
Version: unspecified
Hardware: x86 Linux
: P3 critical (vote)
Target Milestone: 4.11
Assignee: Samba QA Contact
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-07-16 20:44 UTC by Mikhalych (dead mail address)
Modified: 2019-12-12 11:47 UTC (History)
0 users

See Also:


Attachments
tcpdump last second of transfer (195.16 KB, application/octet-stream)
2009-07-17 09:49 UTC, Mikhalych (dead mail address)
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mikhalych (dead mail address) 2009-07-16 20:44:36 UTC
Dear Sirs!

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	22.33.0.211	22.33.0.214	TCP	[TCP segment of a reassembled PDU]
157	0.006776	22.33.0.211	22.33.0.214	SMB	Read AndX Response, 4096 bytes
158	0.006782	22.33.0.211	22.33.0.214	NBSS	Session keep-alive
159	0.006793	22.33.0.214	22.33.0.211	TCP	nimreg > netbios-ssn [ACK] Seq=316 Ack=188231 Win=65531 [TCP CHECKSUM INCORRECT] Len=0
160	0.006813	22.33.0.214	22.33.0.211	TCP	[TCP Dup ACK 159#1] nimreg > netbios-ssn [ACK] Seq=316 Ack=188231 Win=65531 [TCP CHECKSUM INCORRECT] Len=0
161	0.006823	22.33.0.214	22.33.0.211	TCP	nimreg > netbios-ssn [RST, ACK] Seq=316 Ack=188231 Win=0 Len=0


Samba log:
[2009/07/16 19:31:57, 1] smbd/service.c:make_connection_snum(1033)
  server (22.33.0.214) 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 22.33.0.214. 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.33.0.214. 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.

Wbr, 
Mikh
Comment 1 Mikhalych (dead mail address) 2009-07-17 09:49:22 UTC
Created attachment 4439 [details]
tcpdump last second of transfer
Comment 2 Mikhalych (dead mail address) 2009-07-23 18:26:54 UTC
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!
Comment 3 Björn Jacke 2019-12-11 12:40:22 UTC
reopening bcause this is still unfixed
Comment 4 Jeremy Allison 2019-12-11 21:02:15 UTC
Bjorn, can you add a wireshark trace showing the problem with a modern client please ?
Comment 5 Björn Jacke 2019-12-12 11:47:42 UTC
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?