Bug 9169 - Fatal panic when sending large file
Summary: Fatal panic when sending large file
Status: RESOLVED INVALID
Alias: None
Product: Samba 3.6
Classification: Unclassified
Component: File services (show other bugs)
Version: 3.6.6
Hardware: x64 Linux
: P5 normal
Target Milestone: ---
Assignee: Volker Lendecke
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-18 09:01 UTC by mnsold
Modified: 2012-09-19 04:52 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description mnsold 2012-09-18 09:01:19 UTC
Server - Ubuntu 12.04, Samba v3.6.6 (only samba from the test repository)
Client - Win7 Pro SP1 x64

An error occurs when copying large files, such as 3GB. Small files are copied successfully.
On another computer (also Win7 Pro SP1 x64), the same large file is copied successfully.
On error this computer will not have access within a few seconds on the samba-server.

A similar bug 8772 (https://bugzilla.samba.org/show_bug.cgi?id=8772)

Config file smb.conf:
------------
[global]
	server string = %h server (Samba, Ubuntu)
	map to guest = Bad User
	obey pam restrictions = Yes
	pam password change = Yes
	passwd program = /usr/bin/passwd %u
	passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
	unix password sync = Yes
	syslog = 3
	log file = /var/log/samba/log.%m
	max log size = 1000
	unix extensions = No
	dns proxy = No
	panic action = /bin/sleep 9999999
	idmap config * : backend = tdb
	force group = soldhome
	create mask = 0770
	directory mask = 0770
	wide links = Yes

[pub]
	path = /srv/pub1/dir1
	force user = sold
	read only = No
------------

Package from the test repository:
------------
libattr1 i386 1:2.4.46-8ubuntu1
libattr1 amd64 1:2.4.46-8ubuntu1
libacl1 i386 2.2.51-8ubuntu1
libacl1 amd64 2.2.51-8ubuntu1
libcups2 i386 1.6.1-0ubuntu5
libcups2 amd64 1.6.1-0ubuntu5
libpam-winbind amd64 2:3.6.6-3ubuntu4
winbind amd64 2:3.6.6-3ubuntu4
samba amd64 2:3.6.6-3ubuntu4
libwbclient0 amd64 2:3.6.6-3ubuntu4
smbclient amd64 2:3.6.6-3ubuntu4
samba-common all 2:3.6.6-3ubuntu4
------------

Log file, (log.<copmuter_name>)
------------
[2012/09/18 00:06:26.183584,  3] smbd/process.c:1467(switch_message)
  switch message SMBreadX (pid 7011) conn 0x7f584d7c9a70
[2012/09/18 00:06:26.183764,  3] smbd/reply.c:3702(send_file_readX)
  send_file_readX fnum=10738 max=61440 nread=61440
[2012/09/18 00:06:26.184065,  3] smbd/process.c:1662(process_smb)
  Transaction 4433 of length 63 (0 toread)
[2012/09/18 00:06:26.184242,  3] smbd/process.c:1467(switch_message)
  switch message SMBreadX (pid 7011) conn 0x7f584d7c9a70
[2012/09/18 00:06:26.184384,  3] smbd/reply.c:3702(send_file_readX)
  send_file_readX fnum=10738 max=4096 nread=4096
[2012/09/18 00:07:05.533193,  3] smbd/process.c:1662(process_smb)
  Transaction 4434 of length 53 (0 toread)
[2012/09/18 00:07:05.533427,  3] smbd/process.c:1467(switch_message)
  switch message SMBecho (pid 7011) conn 0x0
[2012/09/18 00:07:05.533590,  3] smbd/reply.c:5173(reply_echo)
  echo 1 times
[2012/09/18 00:07:41.538634,  1] smbd/process.c:457(receive_smb_talloc)
  receive_smb_raw_talloc failed for client 192.168.1.213 read error = NT_STATUS_CONNECTION_RESET.
[2012/09/18 00:07:41.539124,  2] smbd/close.c:696(close_normal_file)
  sold closed file Школа/Энциклопедии/ПК и интернет/PCpedia.mdf (numopen=1) NT_STATUS_OK
[2012/09/18 00:07:41.539458,  1] smbd/process.c:167(srv_send_smb)
[2012/09/18 00:07:41.539609,  2] lib/util_sock.c:1070(get_peer_addr_internal)
  getpeername failed. Error was Transport endpoint is not connected
  pid[7011] Error writing 75 bytes to client 0.0.0.0. -1. (Broken pipe)
[2012/09/18 00:07:41.540045,  1] smbd/service.c:1378(close_cnum)
  kmsold-nbk (192.168.1.213) closed connection to service pub
[2012/09/18 00:07:41.540295,  3] smbd/connection.c:35(yield_connection)
  Yielding connection to pub
[2012/09/18 00:07:41.698748,  3] smbd/server_exit.c:181(exit_server_common)
  Server exit (failed to receive smb request)
------------
Comment 1 Volker Lendecke 2012-09-18 12:39:38 UTC
There is no panic in that log. The client has disconnect. That to me sounds a bit like network problems further down in the stack. Can you ftp huge files from that client?
Comment 2 mnsold 2012-09-18 13:27:36 UTC
Yes, the successful copying a file from a client.
Have not tried it with a driver update. Later'll check again.
Comment 3 mnsold 2012-09-18 13:32:16 UTC
On error, the local network and the Internet work, only the samba server is not available for a few seconds.
Comment 4 mnsold 2012-09-18 18:05:27 UTC
Checked, copying a large file from the client to the server successfully.
In safe mode with network support is also not possible to copy a file from samba. But successfully copied from the Windows share (normal and safe mode).
Comment 5 mnsold 2012-09-18 21:52:53 UTC
Setting parameters to solve the problem, but reduces performance
socket options = SO_RCVBUF = 8192 SO_SNDBUF = 8192 - successful copy
socket options = SO_RCVBUF = 65536 SO_SNDBUF = 65536 - successful copy
socket options = SO_RCVBUF = 98304 SO_SNDBUF = 98304 - fifty-fifty
socket options = SO_RCVBUF = 131072 SO_SNDBUF = 131072 - possible, but unlikely

Setting this option to 98304 and more - copying fails:
[2012/09/19 01:51:16.646217,  3] smbd/reply.c:3702(send_file_readX)
  send_file_readX fnum=18422 max=61440 nread=61440
[2012/09/19 01:52:12.893362,  3] smbd/process.c:1662(process_smb)
  Transaction 11405 of length 53 (0 toread)
[2012/09/19 01:52:12.893598,  3] smbd/process.c:1467(switch_message)
  switch message SMBecho (pid 23469) conn 0x0
[2012/09/19 01:52:12.893812,  3] smbd/reply.c:5173(reply_echo)
  echo 1 times
[2012/09/19 01:52:48.898285,  1] smbd/process.c:457(receive_smb_talloc)
  receive_smb_raw_talloc failed for client 192.168.1.213 read error = NT_STATUS_CONNECTION_RESET.
[2012/09/19 01:52:48.898778,  2] smbd/close.c:696(close_normal_file)
  sold closed file BlackMesa.7z (numopen=1) NT_STATUS_OK


There are other ways to solve the problem?
While testing a parameter with 81920.
Comment 6 Volker Lendecke 2012-09-18 22:39:25 UTC
Sorry, but if reducing the SO_SNDBUF/SO_RCVBUF settings fixes your problem, then you DO have a problem outside of Samba's reach. Kernel, network drivers, broken switch, whatever. This can't be a Samba problem, sorry.
Comment 7 mnsold 2012-09-19 04:52:38 UTC
Thanks, I will search the problem