I have recently built from source Transmission 1.93 for Centos and have an issue when closing.
When transmission-daemon starts it sends announces to my tracker with event=started. This is great. My tracker logs the client as a peer and starts downloading/seeding.
I then kill the process (either ctrl + c or kill <pid>) and in the debug i get the following line:
[14:57:21.479] [large_test_file.txt--<tracker_domain>:80] appended event "stopped"; announcing in 0 seconds (announcer.c:971)
[14:57:21.481] [large_test_file.txt--<tracker_domain>:80] announce URL is "<tracker_url>&event=stopped" (announcer.c:752)
I have tethereal running and logging all http traffic as well as tailing the logs on my tracker but I never see the event=stopped http request go through.
I have tried this on 2 seperate machine now both running the same os and version of transmission.
Is this a bug in 1.93 or is there something I need to do to enable this?
Best Regards
Chris
Headless Transmission 1.93 - Doesn't send event=stopped
-
- Posts: 4
- Joined: Wed May 19, 2010 3:06 pm
Re: Headless Transmission 1.93 - Doesn't send event=stopped
For a full debug log, try running "TR_DEBUG_FD=2 transmission 2>runlog" ... that may give a better indication of what's going on.
-
- Posts: 4
- Joined: Wed May 19, 2010 3:06 pm
Re: Headless Transmission 1.93 - Doesn't send event=stopped
Apologies.
I meant to mention in my initial post that I already have this environment var set.
This is how come I have the debug.
I meant to mention in my initial post that I already have this environment var set.
This is how come I have the debug.
-
- Posts: 4
- Joined: Wed May 19, 2010 3:06 pm
Re: Headless Transmission 1.93 - Doesn't send event=stopped
I am running it headless BTW.
-
- Posts: 4
- Joined: Wed May 19, 2010 3:06 pm
Re: Headless Transmission 1.93 - Doesn't send event=stopped
I have done some test and this consitantlay doesn't work but the debug flow is consistantly differnet.
Sometime both lines are printed:
[<time>] [<file_name>--<tracker_domain>:80] appended event "stopped"; announcing in 0 seconds (announcer.c:971)
[<time>] [<file_name>--<tracker_domain>:80] announce URL is "<tracker_url>&event=stopped" (announcer.c:752)
Sometimes only this one:
[<time>] [<file_name>--<tracker_domain>:80] appended event "stopped"; announcing in 0 seconds (announcer.c:971)
My guess is that the program isn't waiting for the the event thread finish processing it's queue before closing.
I have added some debug on the first line of onAnnounceDone which is displayed after the "event=started" announce is done.
When the "event=stopped" announce is called onAnnounceDone is never called, thus the web event is never processed.
The lines after the "event=started" announce are:
[16:24:48.721] event readFromPipe: eventType is 2 (trevent.c:158)
[16:24:48.721] event command is [r], ret is 1, errno is 111 (trevent.c:168)
[16:24:48.721] event invoking function in libevent thread (trevent.c:179)
[16:24:48.732] event readFromPipe: eventType is 2 (trevent.c:158)
[16:24:48.732] event command is [r], ret is 1, errno is 111 (trevent.c:168)
The lines before and after the "event=stopped" annouce are:
[16:24:54.009] shutting down transmission session 0x93a5700 (session.c:1572)
[16:24:54.009] waiting for the libtransmission thread to finish (session.c:1578)
[16:24:54.010] event readFromPipe: eventType is 2 (trevent.c:158)
[16:24:54.010] event command is [r], ret is 1, errno is 0 (trevent.c:168)
[16:24:54.010] event invoking function in libevent thread (trevent.c:179)
[16:24:54.010] [<file_name>--<tracker_domain>:80] appended event "stopped"; announcing in 0 seconds (announcer.c:971)
[16:24:54.110] waiting on port unmap ((nil)) or announcer ((nil)) (session.c:1590)
[16:24:54.211] waiting on port unmap ((nil)) or announcer ((nil)) (session.c:1590)
[16:24:54.312] waiting on port unmap ((nil)) or announcer ((nil)) (session.c:1590)
[16:24:54.413] waiting on port unmap ((nil)) or announcer ((nil)) (session.c:1590)
[16:24:54.514] waiting on port unmap ((nil)) or announcer ((nil)) (session.c:1590)
[16:24:54.615] closing trevent pipe (trevent.c:264)
[16:24:54.615] waiting for libtransmission thread to finish (session.c:1601)
[16:24:54.615] event readFromPipe: eventType is 2 (trevent.c:158)
[16:24:54.615] event command is [], ret is 0, errno is 0 (trevent.c:168)
[16:24:54.615] event pipe eof reached... removing event listener (trevent.c:187)
Closing transmission session... done.
Is this a bug?
Sometime both lines are printed:
[<time>] [<file_name>--<tracker_domain>:80] appended event "stopped"; announcing in 0 seconds (announcer.c:971)
[<time>] [<file_name>--<tracker_domain>:80] announce URL is "<tracker_url>&event=stopped" (announcer.c:752)
Sometimes only this one:
[<time>] [<file_name>--<tracker_domain>:80] appended event "stopped"; announcing in 0 seconds (announcer.c:971)
My guess is that the program isn't waiting for the the event thread finish processing it's queue before closing.
I have added some debug on the first line of onAnnounceDone which is displayed after the "event=started" announce is done.
When the "event=stopped" announce is called onAnnounceDone is never called, thus the web event is never processed.
The lines after the "event=started" announce are:
[16:24:48.721] event readFromPipe: eventType is 2 (trevent.c:158)
[16:24:48.721] event command is [r], ret is 1, errno is 111 (trevent.c:168)
[16:24:48.721] event invoking function in libevent thread (trevent.c:179)
[16:24:48.732] event readFromPipe: eventType is 2 (trevent.c:158)
[16:24:48.732] event command is [r], ret is 1, errno is 111 (trevent.c:168)
The lines before and after the "event=stopped" annouce are:
[16:24:54.009] shutting down transmission session 0x93a5700 (session.c:1572)
[16:24:54.009] waiting for the libtransmission thread to finish (session.c:1578)
[16:24:54.010] event readFromPipe: eventType is 2 (trevent.c:158)
[16:24:54.010] event command is [r], ret is 1, errno is 0 (trevent.c:168)
[16:24:54.010] event invoking function in libevent thread (trevent.c:179)
[16:24:54.010] [<file_name>--<tracker_domain>:80] appended event "stopped"; announcing in 0 seconds (announcer.c:971)
[16:24:54.110] waiting on port unmap ((nil)) or announcer ((nil)) (session.c:1590)
[16:24:54.211] waiting on port unmap ((nil)) or announcer ((nil)) (session.c:1590)
[16:24:54.312] waiting on port unmap ((nil)) or announcer ((nil)) (session.c:1590)
[16:24:54.413] waiting on port unmap ((nil)) or announcer ((nil)) (session.c:1590)
[16:24:54.514] waiting on port unmap ((nil)) or announcer ((nil)) (session.c:1590)
[16:24:54.615] closing trevent pipe (trevent.c:264)
[16:24:54.615] waiting for libtransmission thread to finish (session.c:1601)
[16:24:54.615] event readFromPipe: eventType is 2 (trevent.c:158)
[16:24:54.615] event command is [], ret is 0, errno is 0 (trevent.c:168)
[16:24:54.615] event pipe eof reached... removing event listener (trevent.c:187)
Closing transmission session... done.
Is this a bug?