Transmission consistently stops working

Ask for help and report issues not specific to either the Mac OS X or GTK+ versions of Transmission
medman826
Posts: 17
Joined: Thu Jun 14, 2012 9:48 pm

Transmission consistently stops working

Post by medman826 »

I'm not sure how to best go about finding the cause of this issue, so I'll just describe what happens...

After launch, Transmission works normally for period of time. Eventually and consistently, pretty much everything stops working after this. Any seeding torrents will lose connections with any peers, and any new/downloading torrents will simply say "announce is queued" in the trackers section of the torrent inspector forever. No torrents seem to be able to find peers when this happens, even when I know there is a healthy swarm. The only way to fix the issue is to quit and re-launch Transmission. Often when I try this, I end up having to force quit because Transmission will go unresponsive for >5 minutes. When I do re-launch Transmission, all seems back to normal (meaning that all previously problematic torrents begin working just fine), until I notice that everything has stopped connecting again after a while. I have no way to reliably reproduce this issue as it always starts happening when I am not paying attention.

I attempted to troubleshoot using an ubuntu torrent, and somehow I was able to download it (while the issue was occurring), even though it too said "announce is queued" forever.

I'm not entirely sure what information is useful when it comes to troubleshooting this issue, but I'm happy to provide more. I've also tried searching for similar issues, but anything I found was either not quite the same, or a resolved bug.

I am running a brand new installation of Mac OS X 10.9.5 and Transmission 2.84 (14306).
medman826
Posts: 17
Joined: Thu Jun 14, 2012 9:48 pm

Re: Transmission consistently stops working

Post by medman826 »

Had I been certain that this issue is particular to the Mac client I would have posted it there.

In my message logs I am seeing a ton of info messages that say "Scrape error: could not connect to tracker", or just "Could not connect to tracker" after announcing succeeds. I have gotten hundreds of these messages in the span of a minute in many cases. I feel like this is not supposed to happen?
medman826
Posts: 17
Joined: Thu Jun 14, 2012 9:48 pm

Re: Transmission consistently stops working

Post by medman826 »

How do I check if DHT and PEX are working? Both are enabled.

I know that the trackers are not unresponsive because if I restart Transmission the problem disappears, and it happens regardless of how many trackers I may be attempting to access at once (could be just 1, could be 5, but they all stop working). I believe also that if I were to try using another torrent client, it would work (though I have not tested this). For this reason I know that the issue is not caused by a firewall or blocking software (I am using hands off, but all permissions are allowed for Transmission).

I do not believe that the problem is related to my network connectivity because when this problem occurs I can use any other application that connects to the internet just fine. Furthermore, this problem has occurred on more than one LAN, so it cannot be my particular network configuration.
medman826
Posts: 17
Joined: Thu Jun 14, 2012 9:48 pm

Re: Transmission consistently stops working

Post by medman826 »

The problem is currently occurring. No torrents will connect to any peers, and all of them are creating info messages that say "Scrape error: could not connect to tracker". Just as a test, I tried opening one of these torrents with uTorrent, and it connected and started downloading with no problems.

I appreciate your help.
medman826
Posts: 17
Joined: Thu Jun 14, 2012 9:48 pm

Re: Transmission consistently stops working

Post by medman826 »

I ran the test for bit-torrent and there is no indication of either upload or download limiting. Regardless, that would not make much sense, seeing as the problem only happens sometimes, and even when the problem is occurring, uTorrent seems to work fine.

Do you have any other ideas?
medman826
Posts: 17
Joined: Thu Jun 14, 2012 9:48 pm

Re: Transmission consistently stops working

Post by medman826 »

But I don't like uTorrent... The only reason I mentioned it at all is because I used it to help troubleshoot, which I think is quite productive. By showing that uTorrent works when Transmission does not, I have effectively ruled out the possibility that Transmission is not the problem. Right?

Also, I'm not sure what qualifies as a "proper response". Is there something about my answers to your questions that you don't like? Is there some way I could be more detailed?

You don't have to help me, but again, I have appreciated all of your suggestions.

Let's go over what we've learned:
• It is not a network connectivity issue
• It is not ISP throttling
• It is not a tracker issue
• It is almost certainly an issue with Transmission specifically

Now, I'll ask again... Do you (or does anyone else) have any other ideas?
mike.dld
Transmission Developer
Posts: 306
Joined: Wed Dec 25, 2013 10:56 pm

Re: Transmission consistently stops working

Post by mike.dld »

Try sampling Transmission when it "stops working". Use Activity Monitor application for that (take several samples), or better yet "sample" command-line utility (execute `sample Transmission 15 -file /tmp/sample.log`). Pastebin the results and give a link here. Not saying it would help, but if you feel like it's Transmission's issue maybe that'll give a clue.
medman826
Posts: 17
Joined: Thu Jun 14, 2012 9:48 pm

Re: Transmission consistently stops working

Post by medman826 »

Unfortunately, the file was just a little bit to large for pastebin. I used tinyupload instead, I hope that's ok.

http://s000.tinyupload.com/?file_id=072 ... 7838835956

I'm not sure how to interpret the log, so please let me know if it contains any clues.

EDIT:
I'm not sure if this is helpful to know, but now (the problem is currently occurring) I have a torrent set to download starting from 0% complete, and it just says "Announce in progress..." forever.
medman826
Posts: 17
Joined: Thu Jun 14, 2012 9:48 pm

Re: Transmission consistently stops working

Post by medman826 »

When that happens, it will not acquire any peers unless I restart Transmission. When I do restart Transmission, it no longer says "Announce in progress...", but "Next announce in [...]". Only then does it actually acquire any peers.

As we've already determined, the tracker is not the issue.
mike.dld
Transmission Developer
Posts: 306
Joined: Wed Dec 25, 2013 10:56 pm

Re: Transmission consistently stops working

Post by mike.dld »

Judging from the sample log all Transmission does is DNS lookups. Some 84 threads are waiting to do a lookup (mutex lock):

Code: Select all

    10613 Thread_756238
    + 10613 thread_start  (in libsystem_pthread.dylib) + 13  [0x7fff8969bfc9]
    +   10613 _pthread_start  (in libsystem_pthread.dylib) + 137  [0x7fff8969772a]
    +     10613 _pthread_body  (in libsystem_pthread.dylib) + 138  [0x7fff89697899]
    +       10613 curl_thread_create_thunk  (in libcurl.4.dylib) + 29  [0x7fff8fd102cc]
    +         10613 getaddrinfo_thread  (in libcurl.4.dylib) + 80  [0x7fff8fd11ac0]
    +           10613 Curl_getaddrinfo_ex  (in libcurl.4.dylib) + 37  [0x7fff8fd082f9]
    +             10613 getaddrinfo  (in libsystem_info.dylib) + 171  [0x7fff91a13c5f]
    +               10613 si_addrinfo  (in libsystem_info.dylib) + 1468  [0x7fff91a142c0]
    +                 10613 search_addrinfo  (in libsystem_info.dylib) + 183  [0x7fff91a1452b]
    +                   10613 mdns_addrinfo  (in libsystem_info.dylib) + 513  [0x7fff91a1475c]
    +                     10613 _mdns_search  (in libsystem_info.dylib) + 2020  [0x7fff91a0e07f]
    +                       10613 _pthread_mutex_lock  (in libsystem_pthread.dylib) + 372  [0x7fff8969a779]
    +                         10613 __psynch_mutexwait  (in libsystem_kernel.dylib) + 10  [0x7fff890fd746]
1 other thread is doing lookup at the moment:

Code: Select all

    10613 Thread_756239
    + 10613 thread_start  (in libsystem_pthread.dylib) + 13  [0x7fff8969bfc9]
    +   10613 _pthread_start  (in libsystem_pthread.dylib) + 137  [0x7fff8969772a]
    +     10613 _pthread_body  (in libsystem_pthread.dylib) + 138  [0x7fff89697899]
    +       10613 curl_thread_create_thunk  (in libcurl.4.dylib) + 29  [0x7fff8fd102cc]
    +         10613 getaddrinfo_thread  (in libcurl.4.dylib) + 80  [0x7fff8fd11ac0]
    +           10613 Curl_getaddrinfo_ex  (in libcurl.4.dylib) + 37  [0x7fff8fd082f9]
    +             10613 getaddrinfo  (in libsystem_info.dylib) + 171  [0x7fff91a13c5f]
    +               10613 si_addrinfo  (in libsystem_info.dylib) + 1468  [0x7fff91a142c0]
    +                 10613 search_addrinfo  (in libsystem_info.dylib) + 183  [0x7fff91a1452b]
    +                   10613 mdns_addrinfo  (in libsystem_info.dylib) + 513  [0x7fff91a1475c]
    +                     10613 _mdns_search  (in libsystem_info.dylib) + 795  [0x7fff91a0dbb6]
    +                       10613 _mdns_query_start  (in libsystem_info.dylib) + 823  [0x7fff91a0ec3b]
    +                         10613 DNSServiceQueryRecord  (in libsystem_dnssd.dylib) + 294  [0x7fff8b771d9f]
    +                           10613 DNSServiceRefDeallocate  (in libsystem_dnssd.dylib) + 185  [0x7fff8b7709f5]
    +                             10613 write_all  (in libsystem_dnssd.dylib) + 51  [0x7fff8b770bcd]
    +                               10613 __sendto_nocancel  (in libsystem_kernel.dylib) + 10  [0x7fff890fdab2]
Seeing this thread hanging in `write_all` all the 15 seconds does not look healthy. I'm not that great with networking but maybe you could try using another DNS server(s).
mike.dld
Transmission Developer
Posts: 306
Joined: Wed Dec 25, 2013 10:56 pm

Re: Transmission consistently stops working

Post by mike.dld »

Some sources also suggest that it could be connected to IPv6 addresses lookup somehow. In particular, http://aplawrence.com/MacOSX/firefox_google.html states that flushing the DNS cache, disabling IPv6 or adding some ISP-provided DNS servers helps (the page is a bit old though).
medman826
Posts: 17
Joined: Thu Jun 14, 2012 9:48 pm

Re: Transmission consistently stops working

Post by medman826 »

I believe I may have solved the issue somewhat by accident. In looking at my message logs I noticed that there seemed to be one particular torrent that would appear to finish announcing, but then apparently do nothing further (judging by the lack of further messages). I did not notice this earlier because Transmission would then do lots of other stuff (saving resume files, etc.), which caused me to miss that.

After removing this torrent file and restarting Transmission, I was able to successfully remain connected to over 1000 swarms for a full night, which would never happen before.

I hope that this means the problem is solved, and also that it was an issue with a particular torrent, and not Transmission. I cannot explain it at all beyond that though.

@x190, I would be happy to send you a torrent file, but all torrents would exhibit this behavior when the issue occurred, so it wouldn't reveal anything useful.

@mike.dld, I may still flush my DNS cache, but seeing as this issue persisted across a brand new installation of OS X, that could not be the issue.

I really appreciate all of the help I've received here. I don't believe I would have made any progress without it. I'll be sure to revive this thread if the issue is not resolved after all.
cfpp2p
Posts: 290
Joined: Sat Aug 08, 2009 3:14 pm

Re: Transmission consistently stops working

Post by cfpp2p »

medman826 wrote:...
I hope that this means the problem is solved, and also that it was an issue with a particular torrent, and not Transmission. I cannot explain it at all beyond that though.
...
There should NOT be a torrent that can disable transmission. I'd be very interested in analyzing the torrent that causes this behavior. Could you please PM me (plus x190 :) ) the torrent file. It's important to know if there's a bug in transmission. No one torrent should block all the others :evil: This would be bad...
medman826
Posts: 17
Joined: Thu Jun 14, 2012 9:48 pm

Re: Transmission consistently stops working

Post by medman826 »

The problem started happening again.

@mike.dld, is there any way for me to determine exactly what torrent is hanging in 'write_all'?

@x190, I did not modify the torrent file. I do not wish to download using DHT since, as I understand it, private trackers don't support that.
mike.dld
Transmission Developer
Posts: 306
Joined: Wed Dec 25, 2013 10:56 pm

Re: Transmission consistently stops working

Post by mike.dld »

Try turning curl debug log on to see what's going on there (from Terminal):

Code: Select all

TR_CURL_VERBOSE=1 /Applications/Transmission.app/Contents/MacOS/Transmission > /tmp/debug.log 2>&1
If it's not helpful, try turning Transmission debug log as well (this will generate a lot more output):

Code: Select all

TR_DEBUG_FD=1 TR_CURL_VERBOSE=1 /Applications/Transmission.app/Contents/MacOS/Transmission > /tmp/debug.log 2>&1
P.S. Did you try DNS flushing yet?
Post Reply