Bug 2700 - Azureus on XP SP2 dies when using a samba share
Summary: Azureus on XP SP2 dies when using a samba share
Status: RESOLVED INVALID
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: File Services (show other bugs)
Version: 3.0.14a
Hardware: x86 Windows XP
: P3 normal
Target Milestone: none
Assignee: Samba Bugzilla Account
QA Contact: Samba QA Contact
URL: http://www.goertzenator.net/smb-az.ta...
Keywords:
Depends on:
Blocks:
 
Reported: 2005-05-11 09:36 UTC by Daniel Goertzen
Modified: 2005-09-08 06:18 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 Daniel Goertzen 2005-05-11 09:36:10 UTC
As the title says, Azureus(a bittorrent client) dies when saving files to a
samba server.  tcpdump, level 10 debug log, smb.conf, and readme file available
at http://www.goertzenator.net/smb-az.tar.bz2 (~75Mb, sorry about the
size...don't know what I could safely trim).

Below is the readme file from the archive:

-----------------------------------------------------------------------
-----------------------------------------------------------------------

Samba-Azureus Failure Capture
11 May 2005, Daniel Goertzen, goertzen@ertw.com

This Samba debug log and tcpdump captures a Samba-Azureus failure.


Two machines were involved in this capture

Super:
- Gentoo Linux
- Gentoo Samba ebuild 3.0.14a-r1
- Serves as a file server for the windows computers in my house.
- Headless

Tbass:
- Windows XP Pro SP2
- Azureus 2.3.0.0, downloads files to "Super"


The test sequence was as follows:
1. Turn on packet capture on Super
     tcpdump -s 0 -w /pub/smb-az.pcap -i eth0 host 192.168.1.106
     (done via ssh from Tbass)
2. Turn on Samba on Super via Gentoo initscript. (via ssh)
3. Turn on Azureus on Tbass.
4. Azureus is setup to poll a directory on super for new torrents periodically.
 It picks up 13 torrents and starts downloading
5. 6 minutes later Azureus goes down in flames with the error "The specified
network name is no longer available, write fails, flush fails when processing
file xxx"
6. Moments later, a Windows bubble message pops up with the error "Delayed Write
Failed.  Windows was unable to save all the data for the file xxx.  The data has
been lost.  This error may be caused by a failure of your computer hardware or
network connection.  Please try to save this file elsewhere."
7. Stop samba with a gentoo initscript.
8. Terminate the packet capture.


Some comments:
- The probability of failure seems related to how much work Azureus is doing.  A
single torrent may take a long time to fail, or may not fail at all.
- On successive tests, I turned off windows firewall and increased the pending
connection limit in Windows to no avail.
- A few weeks ago I was watching a movie on my windows pc that was streaming
from the linux box.  Azureus was also running, and the movie glitched out when
Azureus went down.
Comment 1 Vince 2005-07-22 13:36:38 UTC
Are you using 

security = share

and then writing to a

public = yes
guest only = yes

share?

Because I found I could get XP sp2 to leak kernel memory when WRITING to samba
shares when security = share.

http://support.microsoft.com/?kbid=177415 describes how to use poolmon.

Watch the "Ksec Paged" tag allocate, but not free, 32 bytes/write-connection to
the security = share samba share.

My workaround involved using security = server, and then specifying our domain
controller as the password server.  Once I did that, the Ksec Paged tag would
free EVERY allocation.  I suspect that security = user would work as well, but I
did not have time, nor the energy to test.

This only happens when WRITING to a samba share using security = share.  XP uses
up (very slowly, depending on how much writing) all of the kernel page pool,
thus it is unable to reconnect to the(any) share.  Sometimes, remote desktop
would stop functioning.  In extreme cases, we would get an event 2020.  

We experienced this with samba 3.0.7-1.3E and 3.0.9-1.3E in tao linux.
(In reply to comment #0)
> As the title says, Azureus(a bittorrent client) dies when saving files to a
> samba server.  tcpdump, level 10 debug log, smb.conf, and readme file available
> at http://www.goertzenator.net/smb-az.tar.bz2 (~75Mb, sorry about the
> size...don't know what I could safely trim).
> 
> Below is the readme file from the archive:
> 
> -----------------------------------------------------------------------
> -----------------------------------------------------------------------
> 
> Samba-Azureus Failure Capture
> 11 May 2005, Daniel Goertzen, goertzen@ertw.com
> 
> This Samba debug log and tcpdump captures a Samba-Azureus failure.
> 
> 
> Two machines were involved in this capture
> 
> Super:
> - Gentoo Linux
> - Gentoo Samba ebuild 3.0.14a-r1
> - Serves as a file server for the windows computers in my house.
> - Headless
> 
> Tbass:
> - Windows XP Pro SP2
> - Azureus 2.3.0.0, downloads files to "Super"
> 
> 
> The test sequence was as follows:
> 1. Turn on packet capture on Super
>      tcpdump -s 0 -w /pub/smb-az.pcap -i eth0 host 192.168.1.106
>      (done via ssh from Tbass)
> 2. Turn on Samba on Super via Gentoo initscript. (via ssh)
> 3. Turn on Azureus on Tbass.
> 4. Azureus is setup to poll a directory on super for new torrents periodically.
>  It picks up 13 torrents and starts downloading
> 5. 6 minutes later Azureus goes down in flames with the error "The specified
> network name is no longer available, write fails, flush fails when processing
> file xxx"
> 6. Moments later, a Windows bubble message pops up with the error "Delayed Write
> Failed.  Windows was unable to save all the data for the file xxx.  The data has
> been lost.  This error may be caused by a failure of your computer hardware or
> network connection.  Please try to save this file elsewhere."
> 7. Stop samba with a gentoo initscript.
> 8. Terminate the packet capture.
> 
> 
> Some comments:
> - The probability of failure seems related to how much work Azureus is doing.  A
> single torrent may take a long time to fail, or may not fail at all.
> - On successive tests, I turned off windows firewall and increased the pending
> connection limit in Windows to no avail.
> - A few weeks ago I was watching a movie on my windows pc that was streaming
> from the linux box.  Azureus was also running, and the movie glitched out when
> Azureus went down.
Comment 2 Daniel Goertzen 2005-07-24 08:27:45 UTC
I am using (and have always used):

security = user
public = yes
guest only = yes

I'll try to get my hands on that poolmon.exe program to see if winxp is leaking.

I use a different torrent program now (G3 torrent), and it still "dies" from
time to time, although much less often.
Comment 3 Daniel Goertzen 2005-09-08 06:18:42 UTC
It turns out this problem was caused by BAD NETWORK CABLING.  One of the
conductors in the CAT5e cable was broken, and this would cause my windows PC to
lose link for a few moments on rare occassions... which is plenty to gum up long
running smb sessions I guess.

I discovered this problem when I upgraded my ethernet switch to gigabit ethernet
and noted that my Windows PC would only link at 100Mbps.  After redoing the
connectors on my cable I was able to link at 1Gbps, and my samba problems
vanished.  A number of other minor network problems I was having can also be
attributed to my bad cable.

Sorry for the wild goose chase folks,
Dan.