[Samba] Intermittent stalling in file transfers / server connections

Philip Pemberton usenet08 at philpem.me.uk
Tue Jun 30 23:26:09 GMT 2009


Samba version 3.2.3, in PDC mode

Client PC is Windows XP SP3 32-bit

Server is a standard Intel Atom230 PC, four Ethernet ports, running Ubuntu 
Server 8.10. It provides Internet access (routing/perimeter firewall, dnsmasq 
DNS/DHCP server), email (Fetchmail, Postfix and Procmail), printing (CUPS) and 
Apache+PHP+MySQL for webapp testing.


I'm trying to track down an issue with my Samba server. Basically, I can be 
happily transferring files to/from it for a couple of hours, then suddenly 
(and seemingly randomly), the transfer will stall for about 30 seconds. This 
is typified by Winamp's audio output stopping for 30 seconds, then restarting 
from where it left off (or sometimes 30 seconds further on). Usually the apps 
that are running on the XP box will continue running, but Explorer won't allow 
access to Start->Run or start any more apps until after the 30-second wait.

I've done all the network tests -- swapping ports on the server (and client) 
sides, swapping cables, pinging back and forth... Even during the 30-second 
wait, I can still access the server and other machines on the LAN (ping, SSH, 
you name it). Just that Samba itself doesn't seem to work properly...

Here's my smb.conf:

=======================================

[global]
         netbios name            = wolf
         workgroup                       = MILKYWAY
         server string           = Fileserver

#       socket options          = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192 
SO_KEEPALIVE
# only bind to internal LAN and loopback -- security precaution (stops nosey
# parkers talking to Samba even if the firewall is down)
         interfaces                      = br0 lo
         bind interfaces only    = yes
# only provide SMB service on port 139
         smb ports                       = 139

# Make nmbd periodically announce itself to the LAN
#       remote announce         = 10.255.255.255

# CHANGE BACK TO 50 WHEN FINISHED DEBUGGING!
         max log size            = 1024
# CHANGE BACK TO 1 WHEN FINISHED DEBUGGING!
         log level                       = 10
         log file                        = /var/log/samba/log.%m

# Basically, this makes Samba lookup unregistered netbios names against the
# DNS server (dnsmasq). In our case, this does a lookup against /etc/hosts
# and whatever machines have registered a hostname with dnsmasq's DHCP
# backend.
         dns proxy                       = yes

# Use user-level security
         security                        = user

# Act as a PDC for this workgroup
         domain logons           = yes
         domain master           = yes

# Make sure the Samba server maintains the role of master browser.
# NOTE: No other Samba server should have its OS level set higher than
# this server.
         local master            = yes
         preferred master        = yes
         os level                        = 99

# A file that maps Windows usernames to Unix ones
         username map            = /etc/samba/smbusers

# logon path tells Samba where to put Windows NT/2000/XP roaming profiles.
# Problem is, it takes bloody ages to sync roaming profiles across the LAN
# (even a 100MBit LAN). Ergo, this is set to a blank string, which disables
# roaming profiles.
;       logon path                      = \\%L\profiles\%u\%m
;       logon path                      = \\%L\profiles\%U
         logon path                      =

# Run \\%L\netlogon\logon.bat on the client machine when a user logs onto
# the domain
         logon script            = logon.bat

# Tell NT/2K/XP boxen where to mount the Home Directory
# This basically makes NT/2K/XP run "NET USE Z: /HOME" at logon.
         logon drive                     = Z:
         logon home                      = \\%L\%U
;       logon home                      = \\%L\%U\.win_profile

# Act as a time server
         time server                     = yes

# Dynamically create UNIX users and machines to match existing NT accounts
# and machines that are added to the domain.
         add user script         = /usr/sbin/useradd -d /dev/null -g 100 -s 
/bin/false -M %u
         add machine script      = /usr/sbin/useradd -d /dev/null -g machines 
-c Machine -s /bin/false %u

# This server uses CUPS to provide printing functionality to the network.
         printing                        = cups

;;;;;;;;;; Networking / roaming profiles ;;;;;;;;;;

[netlogon]
         path                            = /samba/netlogon
         comment                         = Logon scripts and policies
         create mask                     = 0644
         write list                      = root, philpem
         writable                        = no
         browsable                       = no

[homes]
         comment                         = Home directories
         browsable                       = no
         writable                        = yes
         valid users                     = %S
         read only                       = no
         create mask                     = 0644
         directory mask          = 0755

;;;;;;;;;; Printing ;;;;;;;;;;

[printers]
         comment                         = Printers
         path                            = /var/spool/samba
         guest ok                        = yes
         printable                       = yes
         browsable                       = no

[print$]
         comment                         = Printer drivers
         path                            = /etc/samba/drivers
         write list                      = root, philpem

;;;;;;;;;; Shares ;;;;;;;;;;

[public]
         comment                         = Public share
         path                            = /samba/public
         read only                       = no
         guest ok                        = no
         create mask                     = 0666
         directory mask          = 0777

[music]
         comment                         = Music
         path                            = /samba/music
         read only                       = no
         guest ok                        = yes
         create mask                     = 0666
         directory mask          = 0777

[riscos]
         comment                         = RISC OS files
         path                            = /samba/riscos
         read only                       = no
         guest ok                        = no
         create mask                     = 0666
         directory mask          = 0777

[torrents]
         comment                         = BitTorrent
         path                            = /samba/torrents
         read only                       = no
         guest ok                        = no
         create mask                     = 0666
         directory mask          = 0777

[cds]
         comment                         = CDs
         path                            = /samba/cds
         read only                       = yes
         write list                      = root, philpem
         guest ok                        = no

=======================================

I added the 'smb ports = 139', 'max log size' and 'log level' lines to try and 
track down the issue -- the log files are pretty massive, but contain very 
little that makes any sense to me :(

Can anyone help?

Thanks,
-- 
Phil.
usenet08 at philpem.me.uk
http://www.philpem.me.uk/
If mail bounces, replace "08" with the last two digits of the current year.



More information about the samba mailing list