Transmission causes leopard slow death

Ask for help and report issues with the Mac OS X version of Transmission
Post Reply
tempel
Posts: 16
Joined: Sat May 03, 2008 9:38 am

Possible fix

Post by tempel »

I have found a little misconfiguration on my Mac that might have contributed to the problem:

In the Network Preferences, I had entered a non-existing DNS server's IP address. I've removed it and now the problem doesn't appear to surface any more (unless it's just taking a longer while).

But so far, it's helping.

So, if you have this problem I suggest you check your network settings, especially verifying your DNS settings. Make sure that the IP addresses listed there can be reached (e.g., try a "ping" to them, using the Network Utility).

If this helps, let us know here!
albyrw
Posts: 11
Joined: Mon Jul 16, 2007 12:23 pm
Location: Sweden

Re: Transmission causes leopard slow death

Post by albyrw »

Thanks for your work tempel. I've just pinged all the DMSs on both my machines and all of them are functional. Although networking does seem to have something to do with the problem - one of the first signs of the crash is that connectivity is interrupted for all internet applications on the machine. systemuiserver goes down at about the same time.

Lowering the max number of connections on your existing torrents is also helpful. My problem started when I upped the prefs for new connections. Trans can be stable with only 4-5 connections of about 20 peers each in my experience, but that's not even remotely enough for my needs and means I can't seed as much or as long as I'd like to.
tempel
Posts: 16
Joined: Sat May 03, 2008 9:38 am

Re: Transmission causes leopard slow death

Post by tempel »

albryw, here's another thing to check: in Terminal, enter "netstat -nr" and see if there are full IP addresses listed that don't exist - that's how I found that a address was constantly used that didn't respond, and that's how I found the wrong DNS entry.
tempel
Posts: 16
Joined: Sat May 03, 2008 9:38 am

Re: Transmission causes leopard slow death

Post by tempel »

Oh darn, it froze again on me. Much later than before, but it still happens.
So, the DNS "fix" is not a remedy.
ciphex
Posts: 7
Joined: Wed Mar 15, 2006 2:57 pm

Re: Transmission causes leopard slow death

Post by ciphex »

I have noticed a few things:

1) Transmission is the culprit of these hangs as so many others have noted.
2) It is memory related. When launched, transmission eats a massive amount of free memory.
The memory is almost immediately "released" back into inactive, which SHOULD then be eligible for paging out in order to provide those addresses to another app.
But somehow the addresses marked as inactive are not being reallocated by the system to other apps when they are needed.
3) This happens to a noticeable extent when file pieces are being hash verified. With a few checks running all available memory is eaten very quickly.
4) I watched 1600 MB get eaten in about a minute. When it was gone the system displayed symptoms like the other posters have been mentioning.
5) If I quit Transmission before all of my memory is gone, the used address space is all released back into the "Free" memory pool. Alternatively I can run iFreeMem and it will effectively force the system to reclaim those ranges. Of course in that case Transmission will just resume consuming memory and I will have to quit it or run iFreeMem every few minutes.

My suggestion, check the data verification code and see why it registers a LOT of small address spaces and somehow manages to not fully release them.
This is the only app for OS X that I have seen cause this issue. Please look into your memory management routines.
albyrw
Posts: 11
Joined: Mon Jul 16, 2007 12:23 pm
Location: Sweden

Re: Transmission causes leopard slow death

Post by albyrw »

Thanks ciphex, that sounds like the most solid piece of diagnostics on this whole thread so far, great work.
tempel
Posts: 16
Joined: Sat May 03, 2008 9:38 am

Re: Transmission causes leopard slow death

Post by tempel »

I am still going down the network route (but will keep watching the memory consumption now as well).

One more thing I've noticed is that when last night only the outward network data of Transmission stalled (i.e. it kept downloading but didn't upload any more), the system still worked. I then disabled the Network Interface temporarily and that fixed it for Transmission: it started uploading again. Later I realized, though, that a few other programs would not work any more, including Safari, which would stall at launch. Doing a "Sample Process" via Activity Monitor showed that all those stalling apps were stalling at DNS functions.

Along with my previous finding of the dead NS address in my settings, this could suggest that Transmission is overflowing the NS resolution somehow.

I wonder if Transmission issues a NS lookup for each IP address it encounters. And there are some addresses that can't be resolved, leading to some build-up, which eventually brings the system down. Having had the bad IP address in the NS servers list, it would accelerate the symptoms as it's creating more lookup failures. And this is exactly what I experienced: When I had the bad NS entered, Transmission would stall the system after a few minutes, while now it takes hours.

So, any Transmission developers here who could answer that?

(Just a thought: maybe the excessive memory consumption is related to that: Each non-resolved NS lookup leads to such an allocation which then gets forgotten, i.e. never released).
ciphex
Posts: 7
Joined: Wed Mar 15, 2006 2:57 pm

Re: Transmission causes leopard slow death

Post by ciphex »

tempel,

In my case this happens with only a few torrents hashing, before they ever connect to peers. Also, the memory consumption does not increase when downloading if no hashing is going on.
However, I have noticed odd DNS behavior around the net for the past month or more. I have had to switch to and then away from OpenDNS at different times in order to get good performance in many applications depending on their purpose, a lot of DNS servers will timeout after extended periods. I have seen this wreak havoc on sshd's that resolve ip's at login. I think this may be an after effect of DDoS attacks against certain DNS servers. The point being that perhaps DNS is an issue here, but not the root cause. It is most likely a trigger for the same memory practices that are so evident in the hashing process. I am going to do some sampling and post more soon.
gizo
Posts: 3
Joined: Sun Oct 19, 2008 9:59 pm

Re: Transmission causes leopard slow death

Post by gizo »

Hi all,

I have been using Transmission since about 0.90, and I've never experienced a problem with it. All this went horribly wrong over the weekend though.
I upgraded by MacBook Pro (Core2Duo 2.33GHz) from the stocks 2x1GB RAM to 1x1GB + 1x2GB (Apple-Approved Corsair).

The next time I started Transmission, it 'rebuilt' the 4 open transfers, and then displayed the same hung properties that everyone else has mentioned - initial network death, then everything else slowly dying, requiring a forced reboot.

EDIT: Not sure if it is helpful, but I notice when it happens that the 'Inactive Memory' builds up until there is no 'Free' memory left, and that seems to be when the shit hits the fan.

The only change to my system was the additional RAM - it appears that this change has caused the issue.

Now - I appreciate that people work damn hard on this application, and they do it in their spare time. I also appreciate that this is a difficult bug - as it doesn't appear to be common to every user setup (and notably, not to the developer setups). However - I can only state that this problem ONLY exists with Transmission. If I don't use Transmission, everything is fine. If I open Transmission, my computer dies. Therefore, at some level, there is a problem with Transmission (at least to me, the user).

I hope against hope that this problem can be identified and resolved, as I love Transmission, but at the moment I have to find a new client. In the mean time, consider that if Transmission was a paid product I would expect that this issue WOULD be treated as a serious bug in Transmission, and would be resolved in one way or another.
ciphex
Posts: 7
Joined: Wed Mar 15, 2006 2:57 pm

Re: Transmission causes leopard slow death

Post by ciphex »

I ran an Instruments (dtrace) Memory audit on Transmission since the problem is present for me. I ran this for 5 minutes. Transmission already had a few torrents in it that were verified. It began to eat RAM but stopped when the torrents were loaded, not rendering any of that back to the system it seems. Then I added some torrents that were partially downloaded and watched it eat RAM proportionally to the size of the data that had been downloaded from that torrent while it was hashing, then it stopped eating. Every torrent i added used more and more ram until it was gone. Then i stopped the audit before the system became unresponsive.

The following instruments file is a record of that session. I am posting it in an effort to help resolve this issue. (101Mb)
http://www.filefactory.com/file/df5334/ ... _trace_zip

It is important to note that there was very little hard drive activity during this period. While in theory I should have had a lot of page outs when the system recovered the Inactive Memory I did not, and of course the system was not recovering that memory.

I am running Leopard 10.5.5 with 2Gb stock RAM on a MacBook Pro 4,1
Transmission v1.34 (latest stable)
tempel
Posts: 16
Joined: Sat May 03, 2008 9:38 am

Re: Transmission causes leopard slow death

Post by tempel »

Is a Transmission developer follwing this? Hello?
noelos
Posts: 3
Joined: Mon Oct 06, 2008 1:22 pm

Re: Transmission causes leopard slow death

Post by noelos »

It has been tracked in defect 1201 - http://trac.transmissionbt.com/ticket/1201. However, the developer has marked the defect 'invalid' and has repeatedly stated that there is insufficient evidence in this thread to implicate Transmission (apparently it is Mac OS X's fault). Though I appreciate development of this application is a voluntary effort, I don't think ignoring a defect that affects so many users so severely is going to drive adoption. I hope ciphex's trace and the several other detailed descriptions (including my own) in this thread should provide adequate information to attempt reproduction and analysis of the defect. With so many users, so many standard configurations and so obvious a problem, I'm sure it is reproducible. I reproduced it on a cleanly installed Mac Mini running OS X 10.5.5, Transmission 1.3.4 and all defaults - which should a a supported configuration. Even if the resolution is to reduce connections - the program should - in the short term - display a warning if the user tries to set these too high.

Of course, one of the problems is that the defect is so severe, it crashes the entire system, making analysis for end-users next to impossible. Ciphex has probably get the most comprehensive trace - perhaps we should open a new defect and attach this as evidence of the problem. Also, I'm willing to do a meta-analysis of this thread to see how many reported cases there are, what they have in common, what the various theories are.
ciphex
Posts: 7
Joined: Wed Mar 15, 2006 2:57 pm

Re: Transmission causes leopard slow death

Post by ciphex »

I will be happy to do my share to uncover the root of this problem, including testing and whatever tracing I am capable of as is necessary.
jah
Posts: 941
Joined: Thu Jan 26, 2006 10:14 am

Re: Transmission causes leopard slow death

Post by jah »

ciphex: i recommend you make a comment on the ticket
Jordan
Transmission Developer
Posts: 2311
Joined: Sat May 26, 2007 3:39 pm
Location: Titania's Room

Re: Transmission causes leopard slow death

Post by Jordan »

Do the nightlies from yesterday or today help the problem any?

I admit I'm shooting in the dark here, since I don't use Leopard and haven't ever seen this behavior on Linux... but, the connection footprint for making multiple tracker connections has gotten much smaller in the last couple of days. If the problem is network related, as some people have suggested, then maybe this will help. Or not. Only one way to find out. :)
Post Reply