This forum has been archived. All content is frozen. Please use KDE Discuss instead.

odd bug, in cleaner or grab chunk

Tags: None
(comma "," separated)
agforsyth
Registered Member
Posts
133
Karma
0

odd bug, in cleaner or grab chunk

Wed Jul 30, 2008 4:49 pm
Ok, yesterday evening ktorrent closed itself with no crash report while I was out. I checked the log, and found that probably it got closed because it was hogging memory. I started KTorrent around 22:00. It seems to have closed around 00:35-00:48 because of this odd behavior:

Code: Select all
Wed Jul 30 00:32:21 2008: Cleaned 1 chunks, 1 still in memory
Wed Jul 30 00:32:24 2008: Grab chunk 304 (134 in memory)
Wed Jul 30 00:32:26 2008: Grab chunk 237 (135 in memory)
Wed Jul 30 00:32:29 2008: Grab chunk 781 (136 in memory)
Wed Jul 30 00:32:31 2008: Cleaned 1 chunks, 0 still in memory
Wed Jul 30 00:32:33 2008: Grab chunk 405 (1 in memory)
Wed Jul 30 00:32:39 2008: Grab chunk 405 (137 in memory)
Wed Jul 30 00:32:41 2008: Grab chunk 40 (2 in memory)
Wed Jul 30 00:32:43 2008: Grab chunk 488 (138 in memory)
Wed Jul 30 00:32:46 2008: Grab chunk 416 (3 in memory)
Wed Jul 30 00:32:46 2008: Cleaned 2 chunks, 1 still in memory
Wed Jul 30 00:32:49 2008: Grab chunk 405 (2 in memory)
Wed Jul 30 00:32:53 2008: Grab chunk 40 (3 in memory)
Wed Jul 30 00:33:03 2008: Grab chunk 438 (139 in memory)
Wed Jul 30 00:33:09 2008: Grab chunk 221 (140 in memory)
Wed Jul 30 00:33:47 2008: Grab chunk 984 (4 in memory)
Wed Jul 30 00:33:57 2008: Cleaned 4 chunks, 0 still in memory
Wed Jul 30 00:34:04 2008: Grab chunk 255 (141 in memory)
Wed Jul 30 00:34:06 2008: Grab chunk 405 (1 in memory)
Wed Jul 30 00:34:08 2008: Grab chunk 984 (2 in memory)
Wed Jul 30 00:34:22 2008: Grab chunk 40 (3 in memory)
Wed Jul 30 00:34:35 2008: Cleaned 3 chunks, 0 still in memory
Wed Jul 30 00:34:45 2008: Grab chunk 752 (142 in memory)
Wed Jul 30 00:34:47 2008: Grab chunk 723 (143 in memory)
Wed Jul 30 00:35:02 2008: Grab chunk 912 (144 in memory)
Wed Jul 30 00:48:13 2008: Grab chunk 405 (1 in memory)


I've stripped out the various connection and tracker messages, but nothing was out of the ordinary other than this. No torrents were downloading, only seeding. The problem seems to have started around 23:11:

Code: Select all
Tue Jul 29 23:10:55 2008: Cleaned 1 chunks, 1 still in memory
Tue Jul 29 23:10:56 2008: Grab chunk 197 (2 in memory)
Tue Jul 29 23:10:59 2008: Cleaned 1 chunks, 0 still in memory
Tue Jul 29 23:11:02 2008: Grab chunk 525 (1 in memory)
Tue Jul 29 23:11:02 2008: Grab chunk 490 (2 in memory)
Tue Jul 29 23:11:03 2008: Grab chunk 652 (3 in memory)
Tue Jul 29 23:11:05 2008: Cleaned 2 chunks, 1 still in memory
Tue Jul 29 23:11:10 2008: Grab chunk 348 (2 in memory)
Tue Jul 29 23:11:10 2008: Cleaned 2 chunks, 0 still in memory
Tue Jul 29 23:11:12 2008: Grab chunk 1006 (3 in memory)
Tue Jul 29 23:11:15 2008: Cleaned 1 chunks, 2 still in memory
Tue Jul 29 23:11:16 2008: Grab chunk 863 (3 in memory)
Tue Jul 29 23:11:17 2008: Grab chunk 490 (1 in memory)
Tue Jul 29 23:11:24 2008: Grab chunk 539 (4 in memory)
Tue Jul 29 23:11:25 2008: Cleaned 3 chunks, 1 still in memory
Tue Jul 29 23:11:29 2008: Grab chunk 615 (2 in memory)
Tue Jul 29 23:11:30 2008: Cleaned 1 chunks, 0 still in memory
Tue Jul 29 23:11:32 2008: Grab chunk 715 (3 in memory)
Tue Jul 29 23:11:32 2008: Grab chunk 490 (1 in memory)
Tue Jul 29 23:11:35 2008: Cleaned 2 chunks, 1 still in memory
Tue Jul 29 23:11:36 2008: Grab chunk 615 (2 in memory)
Tue Jul 29 23:11:40 2008: Grab chunk 278 (3 in memory)
Tue Jul 29 23:11:40 2008: Cleaned 1 chunks, 0 still in memory
Tue Jul 29 23:11:45 2008: Cleaned 3 chunks, 0 still in memory
Tue Jul 29 23:11:47 2008: Grab chunk 493 (1 in memory)
Tue Jul 29 23:11:47 2008: Grab chunk 490 (1 in memory)
Tue Jul 29 23:11:51 2008: Grab chunk 925 (2 in memory)
Tue Jul 29 23:11:51 2008: Grab chunk 615 (3 in memory)
Tue Jul 29 23:11:55 2008: Cleaned 1 chunks, 2 still in memory
Tue Jul 29 23:12:00 2008: Cleaned 1 chunks, 0 still in memory
Tue Jul 29 23:12:02 2008: Grab chunk 490 (1 in memory)
Tue Jul 29 23:12:05 2008: Cleaned 2 chunks, 0 still in memory


And began to get bad at around 00:00 exactly:

Code: Select all
Wed Jul 30 00:00:36 2008: Cleaned 2 chunks, 3 still in memory
Wed Jul 30 00:00:41 2008: Grab chunk 390 (4 in memory)
Wed Jul 30 00:00:42 2008: Grab chunk 285 (6 in memory)
Wed Jul 30 00:00:42 2008: Grab chunk 473 (5 in memory)
Wed Jul 30 00:00:44 2008: Cleaned 3 chunks, 2 still in memory
Wed Jul 30 00:00:47 2008: Grab chunk 730 (3 in memory)
Wed Jul 30 00:00:54 2008: Cleaned 3 chunks, 0 still in memory
Wed Jul 30 00:00:56 2008: Grab chunk 340 (7 in memory)
Wed Jul 30 00:00:56 2008: Grab chunk 473 (1 in memory)
Wed Jul 30 00:01:00 2008: Grab chunk 177 (2 in memory)
Wed Jul 30 00:01:02 2008: Grab chunk 390 (3 in memory)
Wed Jul 30 00:01:04 2008: Grab chunk 268 (4 in memory)
Wed Jul 30 00:01:04 2008: Cleaned 1 chunks, 3 still in memory
Wed Jul 30 00:01:06 2008: Grab chunk 403 (8 in memory)
Wed Jul 30 00:01:14 2008: Grab chunk 582 (9 in memory)
Wed Jul 30 00:01:14 2008: Cleaned 3 chunks, 0 still in memory
Wed Jul 30 00:01:18 2008: Grab chunk 268 (1 in memory)
Wed Jul 30 00:01:20 2008: Grab chunk 390 (2 in memory)
Wed Jul 30 00:01:21 2008: Grab chunk 48 (3 in memory)
Wed Jul 30 00:01:25 2008: Cleaned 1 chunks, 2 still in memory
Wed Jul 30 00:01:30 2008: Grab chunk 177 (3 in memory)
Wed Jul 30 00:01:32 2008: Grab chunk 268 (4 in memory)
Wed Jul 30 00:01:35 2008: Cleaned 2 chunks, 2 still in memory
Wed Jul 30 00:01:38 2008: Grab chunk 390 (3 in memory)
Wed Jul 30 00:01:39 2008: Grab chunk 323 (4 in memory)
Wed Jul 30 00:01:42 2008: Grab chunk 1006 (5 in memory)
Wed Jul 30 00:01:45 2008: Cleaned 4 chunks, 1 still in memory
Wed Jul 30 00:01:45 2008: Grab chunk 323 (2 in memory)
Wed Jul 30 00:01:47 2008: Grab chunk 18 (3 in memory)
Wed Jul 30 00:01:52 2008: Grab chunk 390 (4 in memory)
Wed Jul 30 00:01:57 2008: Cleaned 3 chunks, 1 still in memory
Wed Jul 30 00:01:58 2008: Grab chunk 1006 (2 in memory)
Wed Jul 30 00:02:00 2008: Grab chunk 323 (3 in memory)
Wed Jul 30 00:02:02 2008: Grab chunk 431 (4 in memory)
Wed Jul 30 00:02:07 2008: Cleaned 4 chunks, 0 still in memory
Wed Jul 30 00:02:07 2008: Grab chunk 323 (1 in memory)
Wed Jul 30 00:02:07 2008: Grab chunk 390 (2 in memory)
Wed Jul 30 00:02:15 2008: Grab chunk 1006 (3 in memory)
Wed Jul 30 00:02:17 2008: Cleaned 2 chunks, 1 still in memory
Wed Jul 30 00:02:17 2008: Grab chunk 431 (2 in memory)
Wed Jul 30 00:02:17 2008: Grab chunk 323 (3 in memory)
Wed Jul 30 00:02:18 2008: Grab chunk 41 (4 in memory)
Wed Jul 30 00:02:20 2008: Grab chunk 206 (5 in memory)
Wed Jul 30 00:02:26 2008: Grab chunk 783 (10 in memory)
Wed Jul 30 00:02:27 2008: Cleaned 5 chunks, 0 still in memory
Wed Jul 30 00:02:31 2008: Grab chunk 1006 (1 in memory)
Wed Jul 30 00:02:32 2008: Grab chunk 41 (2 in memory)
Wed Jul 30 00:02:35 2008: Grab chunk 206 (3 in memory)
Wed Jul 30 00:02:37 2008: Cleaned 2 chunks, 1 still in memory
Wed Jul 30 00:02:38 2008: Grab chunk 41 (2 in memory)
Wed Jul 30 00:02:45 2008: Grab chunk 1032 (11 in memory)


There were no odd tracker responses or any other odd messages at all that I could see.
George
Moderator
Posts
5421
Karma
1

Wed Jul 30, 2008 4:57 pm
There is something strange going on there :

Wed Jul 30 00:32:33 2008: Grab chunk 405 (1 in memory)
Wed Jul 30 00:32:39 2008: Grab chunk 405 (137 in memory)
Wed Jul 30 00:32:41 2008: Grab chunk 40 (2 in memory)
Wed Jul 30 00:32:43 2008: Grab chunk 488 (138 in memory)
Wed Jul 30 00:32:46 2008: Grab chunk 416 (3 in memory)
George
Moderator
Posts
5421
Karma
1

Wed Jul 30, 2008 4:58 pm
I will investigate this
agforsyth
Registered Member
Posts
133
Karma
0

Wed Jul 30, 2008 5:06 pm
This is still happening now that I've started KTorrent again, so I'll have plenty of logs of it if you want more.

I stared KTorrent at 11:18. It began right here at 11:32:20. A new chunk was grabbed and one cleaned at the same time, maybe this is causing the counter to be off by one chunk? If it's helpful, I can revert the changes I made to the logging (don't show grab chunk when it doesn't grab a chunk, don't show cleaning when didn't clean any chunks).

Code: Select all
Wed Jul 30 11:32:11 2008: Grab chunk 708 (1 in memory)
Wed Jul 30 11:32:20 2008: Grab chunk 291 (2 in memory)
Wed Jul 30 11:32:20 2008: Cleaned 1 chunks, 0 still in memory
Wed Jul 30 11:32:22 2008: Grab chunk 708 (1 in memory)
Wed Jul 30 11:32:23 2008: Cleaned 1 chunks, 1 still in memory
Wed Jul 30 11:32:30 2008: Cleaned 1 chunks, 0 still in memory
Wed Jul 30 11:32:33 2008: Cleaned 1 chunks, 0 still in memory
Wed Jul 30 11:32:33 2008: Grab chunk 708 (1 in memory)
Wed Jul 30 11:32:37 2008: Grab chunk 291 (1 in memory)
Wed Jul 30 11:32:40 2008: Cleaned 1 chunks, 0 still in memory
Wed Jul 30 11:32:43 2008: Cleaned 1 chunks, 0 still in memory
Wed Jul 30 11:32:45 2008: Grab chunk 708 (1 in memory)
Wed Jul 30 11:32:48 2008: Grab chunk 291 (1 in memory)
Wed Jul 30 11:32:50 2008: Grab chunk 154 (2 in memory)
Wed Jul 30 11:32:50 2008: Cleaned 1 chunks, 1 still in memory
Wed Jul 30 11:32:53 2008: Cleaned 1 chunks, 0 still in memory
Wed Jul 30 11:32:58 2008: Grab chunk 291 (1 in memory)
Wed Jul 30 11:33:00 2008: Cleaned 1 chunks, 0 still in memory
Wed Jul 30 11:33:06 2008: Grab chunk 154 (1 in memory)
Wed Jul 30 11:33:10 2008: Grab chunk 727 (2 in memory)
Wed Jul 30 11:33:13 2008: Cleaned 1 chunks, 1 still in memory
Wed Jul 30 11:33:20 2008: Cleaned 1 chunks, 0 still in memory
Wed Jul 30 11:33:23 2008: Grab chunk 154 (1 in memory)
Wed Jul 30 11:33:23 2008: Cleaned 1 chunks, 0 still in memory
Wed Jul 30 11:33:26 2008: Grab chunk 727 (1 in memory)
Wed Jul 30 11:33:30 2008: Cleaned 1 chunks, 0 still in memory
Wed Jul 30 11:33:33 2008: Cleaned 1 chunks, 0 still in memory
Wed Jul 30 11:33:34 2008: Grab chunk 154 (1 in memory)
Wed Jul 30 11:33:37 2008: Grab chunk 727 (1 in memory)
Wed Jul 30 11:33:40 2008: Cleaned 1 chunks, 0 still in memory
Wed Jul 30 11:33:42 2008: Grab chunk 560 (1 in memory)
Wed Jul 30 11:33:43 2008: Cleaned 1 chunks, 0 still in memory
Wed Jul 30 11:33:48 2008: Grab chunk 727 (1 in memory)
Wed Jul 30 11:33:50 2008: Cleaned 1 chunks, 0 still in memory
George
Moderator
Posts
5421
Karma
1

Wed Jul 30, 2008 5:15 pm
Try rev 839713

Note: anonsvn servers sometimes lag a little bit (and were down yesterday, but that was probably due to the 4.1.0 release of KDE)
agforsyth
Registered Member
Posts
133
Karma
0

Wed Jul 30, 2008 5:33 pm
George wrote:Try rev 839713

Note: anonsvn servers sometimes lag a little bit (and were down yesterday, but that was probably due to the 4.1.0 release of KDE)


Trying it now... looks right. Didn't notice that I'd changed that when I moved the log line.
agforsyth
Registered Member
Posts
133
Karma
0

Sat Aug 02, 2008 6:13 am
I think I found the bug. It just happened again, at exactly the same time: midnight.
Code: Select all
if (!c->taken() && bt::GetCurrentTime() - i.value() > 5000)

Looks like getCurrentTime() / timestamp map doesn't work for rolling over at the end of the day? Looks like you use this all over... anywhere else the end of day thing matters?
Quick and dirty fix?
Code: Select all
if(i.value() > bt::GetCurrentTime()) loaded[c->getIndex()] = 0;

If that's not the exact problem, it's some other place that doesn't work over the end of the day.
George
Moderator
Posts
5421
Karma
1

Sat Aug 02, 2008 10:18 am
Can't be, GetCurrentTime indirectly uses gettimeofday to calculate the time, this gives back the time in seconds and micro seconds since the Epoch (00:00:00 january 1 1970)

So day changes cannot have any effect on this.
agforsyth
Registered Member
Posts
133
Karma
0

Sat Aug 02, 2008 10:37 am
George wrote:Can't be, GetCurrentTime indirectly uses gettimeofday to calculate the time, this gives back the time in seconds and micro seconds since the Epoch (00:00:00 january 1 1970)

So day changes cannot have any effect on this.

Unless of course the time is changed by NTP and there is a rather large error of a couple of seconds.


Well.. it's happened to me exactly twice, on two consecutive days, at exactly midnight. Look back at the log I posted before: the timestamp is there. I'll add some log lines to spit out i.value() and bt::getCurrentTime() and see what the pattern is at the next end of day.
George
Moderator
Posts
5421
Karma
1

Sat Aug 02, 2008 11:22 am
I will try it this evening also.
agforsyth
Registered Member
Posts
133
Karma
0

Sat Aug 02, 2008 11:35 am
My log from midnight. Three peers appear to stop checking memory:
Code: Select all
Fri Aug 1 23:59:30 2008: Grab chunk 733 (2 in memory)
Fri Aug 1 23:59:31 2008: Cleaned 1 chunks, 1 still in memory
Fri Aug 1 23:59:31 2008: Grab chunk 550 (3 in memory)
Fri Aug 1 23:59:33 2008: Cleaned 2 chunks, 1 still in memory
Fri Aug 1 23:59:34 2008: Grab chunk 671 (2 in memory)
Fri Aug 1 23:59:35 2008: Grab chunk 179 (1 in memory)
Fri Aug 1 23:59:38 2008: Grab chunk 277 (2 in memory)
Fri Aug 1 23:59:40 2008: Cleaned 1 chunks, 0 still in memory
Fri Aug 1 23:59:43 2008: Cleaned 2 chunks, 0 still in memory
Fri Aug 1 23:59:44 2008: Cleaned 1 chunks, 1 still in memory
Fri Aug 1 23:59:45 2008: Grab chunk 58 (1 in memory)
Fri Aug 1 23:59:46 2008: Grab chunk 1037 (1 in memory)
Fri Aug 1 23:59:47 2008: Grab chunk 141 (2 in memory)
Fri Aug 1 23:59:48 2008: Grab chunk 252 (2 in memory)
Fri Aug 1 23:59:51 2008: Cleaned 1 chunks, 0 still in memory
Fri Aug 1 23:59:51 2008: Cleaned 1 chunks, 0 still in memory
Fri Aug 1 23:59:52 2008: Grab chunk 1018 (1 in memory)
Fri Aug 1 23:59:53 2008: Cleaned 2 chunks, 0 still in memory
Fri Aug 1 23:59:54 2008: Cleaned 1 chunks, 1 still in memory
Fri Aug 1 23:59:56 2008: Grab chunk 98 (1 in memory)
Sat Aug 2 00:00:02 2008: Grab chunk 141 (1 in memory)
Sat Aug 2 00:00:02 2008: Grab chunk 1037 (2 in memory)
Sat Aug 2 00:00:03 2008: Grab chunk 232 (2 in memory)
Sat Aug 2 00:00:05 2008: Grab chunk 736 (3 in memory)
Sat Aug 2 00:00:06 2008: Grab chunk 252 (2 in memory)
Sat Aug 2 00:00:17 2008: Grab chunk 377 (4 in memory)
Sat Aug 2 00:00:19 2008: Grab chunk 306 (3 in memory)
Sat Aug 2 00:00:24 2008: Grab chunk 50 (3 in memory)
Sat Aug 2 00:00:24 2008: Grab chunk 24 (2 in memory)
Sat Aug 2 00:00:31 2008: Grab chunk 867 (5 in memory)
Sat Aug 2 00:00:33 2008: Grab chunk 799 (4 in memory)
Sat Aug 2 00:00:37 2008: Grab chunk 176 (6 in memory)
Sat Aug 2 00:00:42 2008: Cleaned 3 chunks, 0 still in memory
Sat Aug 2 00:00:44 2008: Grab chunk 356 (5 in memory)
Sat Aug 2 00:00:45 2008: Grab chunk 282 (1 in memory)
Sat Aug 2 00:00:50 2008: Grab chunk 82 (3 in memory)
Sat Aug 2 00:00:52 2008: Cleaned 1 chunks, 0 still in memory
Sat Aug 2 00:00:53 2008: Grab chunk 111 (7 in memory)
Sat Aug 2 00:00:59 2008: Grab chunk 282 (1 in memory)
Sat Aug 2 00:01:06 2008: Grab chunk 347 (6 in memory)
Sat Aug 2 00:01:11 2008: Grab chunk 230 (2 in memory)
Sat Aug 2 00:01:13 2008: Grab chunk 279 (8 in memory)
Sat Aug 2 00:01:13 2008: Cleaned 1 chunks, 1 still in memory
Sat Aug 2 00:01:15 2008: Grab chunk 747 (7 in memory)
Sat Aug 2 00:01:15 2008: Grab chunk 194 (4 in memory)
Sat Aug 2 00:01:20 2008: Grab chunk 548 (2 in memory)
Sat Aug 2 00:01:24 2008: Grab chunk 678 (9 in memory)
Sat Aug 2 00:01:26 2008: Cleaned 1 chunks, 1 still in memory
Sat Aug 2 00:01:28 2008: Grab chunk 548 (2 in memory)
Sat Aug 2 00:01:34 2008: Grab chunk 122 (10 in memory)
Sat Aug 2 00:01:35 2008: Grab chunk 208 (3 in memory)
Sat Aug 2 00:01:36 2008: Cleaned 2 chunks, 1 still in memory
Sat Aug 2 00:01:37 2008: Grab chunk 809 (8 in memory)
Sat Aug 2 00:01:38 2008: Grab chunk 548 (2 in memory)
Sat Aug 2 00:01:41 2008: Grab chunk 142 (5 in memory)
Sat Aug 2 00:01:46 2008: Cleaned 1 chunks, 1 still in memory
Sat Aug 2 00:01:50 2008: Grab chunk 208 (2 in memory)
Sat Aug 2 00:01:51 2008: Grab chunk 359 (9 in memory)
Sat Aug 2 00:01:52 2008: Grab chunk 321 (11 in memory)
Sat Aug 2 00:01:53 2008: Grab chunk 40 (12 in memory)
Sat Aug 2 00:01:58 2008: Grab chunk 152 (2 in memory)
Sat Aug 2 00:01:58 2008: Cleaned 1 chunks, 1 still in memory
Sat Aug 2 00:02:02 2008: Grab chunk 993 (10 in memory)
Sat Aug 2 00:02:04 2008: Grab chunk 221 (2 in memory)
Sat Aug 2 00:02:07 2008: Grab chunk 315 (13 in memory)
Sat Aug 2 00:02:10 2008: Grab chunk 168 (6 in memory)
Sat Aug 2 00:02:18 2008: Cleaned 1 chunks, 1 still in memory
Sat Aug 2 00:02:22 2008: Grab chunk 459 (14 in memory)
Sat Aug 2 00:02:23 2008: Grab chunk 944 (11 in memory)
Sat Aug 2 00:02:28 2008: Cleaned 1 chunks, 0 still in memory
Sat Aug 2 00:02:29 2008: Grab chunk 100 (1 in memory)

A few minutes later, I notice, and close those peers one by one while watching the log. They were the three seeds (I was also on three downloads, which I was going to try one by one if the seeds weren't the problem):
Code: Select all
Sat Aug 2 00:07:32 2008: Grab chunk 88 (32 in memory)
Sat Aug 2 00:07:34 2008: Grab chunk 109 (18 in memory)
Sat Aug 2 00:07:37 2008: Cleaned 2 chunks, 1 still in memory
Sat Aug 2 00:07:40 2008: Grab chunk 557 (38 in memory)
Sat Aug 2 00:07:42 2008: Grab chunk 163 (39 in memory)
Sat Aug 2 00:07:44 2008: Grab chunk 943 (33 in memory)
Sat Aug 2 00:07:48 2008: Grab chunk 238 (2 in memory)
Sat Aug 2 00:07:48 2008: Cleaned 1 chunks, 1 still in memory
Sat Aug 2 00:07:49 2008: Grab chunk 296 (2 in memory)
Sat Aug 2 00:08:00 2008: Grab chunk 73 (3 in memory)
Sat Aug 2 00:08:00 2008: Cleaned 2 chunks, 1 still in memory
Sat Aug 2 00:08:00 2008: Grab chunk 747 (40 in memory)
Sat Aug 2 00:08:05 2008: Grab chunk 131 (19 in memory)
Sat Aug 2 00:08:07 2008: Grab chunk 296 (2 in memory)
Sat Aug 2 00:08:08 2008: Grab chunk 172 (34 in memory)
Sat Aug 2 00:08:10 2008: Grab chunk 920 (41 in memory)
Sat Aug 2 00:08:10 2008: Cleaned 1 chunks, 1 still in memory
Sat Aug 2 00:08:16 2008: Grab chunk 73 (2 in memory)
Sat Aug 2 00:08:19 2008: Grab chunk 291 (3 in memory)
Sat Aug 2 00:08:20 2008: Cleaned 1 chunks, 2 still in memory
Sat Aug 2 00:08:22 2008: Cleaned 34 chunks, 0 still in memory
Sat Aug 2 00:08:23 2008: Grab chunk 209 (42 in memory)
Sat Aug 2 00:08:27 2008: Grab chunk 195 (3 in memory)
Sat Aug 2 00:08:29 2008: Grab chunk 137 (43 in memory)
Sat Aug 2 00:08:31 2008: Cleaned 2 chunks, 1 still in memory
Sat Aug 2 00:08:32 2008: Grab chunk 72 (20 in memory)
Sat Aug 2 00:08:39 2008: Grab chunk 291 (2 in memory)
Sat Aug 2 00:08:41 2008: Grab chunk 753 (44 in memory)
Sat Aug 2 00:08:46 2008: Cleaned 19 chunks, 1 still in memory
Sat Aug 2 00:08:46 2008: Grab chunk 88 (2 in memory)
Sat Aug 2 00:08:47 2008: Saving 0 chunk downloads
Sat Aug 2 00:08:51 2008: Grab chunk 388 (45 in memory)
Sat Aug 2 00:08:51 2008: Cleaned 2 chunks, 0 still in memory
Sat Aug 2 00:08:53 2008: Grab chunk 131 (1 in memory)
Sat Aug 2 00:08:56 2008: Grab chunk 389 (2 in memory)
Sat Aug 2 00:08:56 2008: Cleaned 1 chunks, 1 still in memory
Sat Aug 2 00:08:59 2008: Grab chunk 151 (2 in memory)
Sat Aug 2 00:09:01 2008: Cleaned 1 chunks, 1 still in memory
Sat Aug 2 00:09:06 2008: Cleaned 1 chunks, 1 still in memory
Sat Aug 2 00:09:09 2008: Grab chunk 94 (2 in memory)
Sat Aug 2 00:09:11 2008: Grab chunk 174 (46 in memory)
Sat Aug 2 00:09:11 2008: Grab chunk 131 (2 in memory)
Sat Aug 2 00:09:11 2008: Cleaned 1 chunks, 1 still in memory
Sat Aug 2 00:09:15 2008: Grab chunk 236 (47 in memory)
Sat Aug 2 00:09:16 2008: Grab chunk 151 (3 in memory)
Sat Aug 2 00:09:16 2008: Cleaned 2 chunks, 1 still in memory
Sat Aug 2 00:09:20 2008: Grab chunk 389 (2 in memory)
Sat Aug 2 00:09:22 2008: Cleaned 1 chunks, 1 still in memory
Sat Aug 2 00:09:24 2008: Grab chunk 313 (2 in memory)
Sat Aug 2 00:09:25 2008: Grab chunk 94 (2 in memory)
Sat Aug 2 00:09:27 2008: Cleaned 1 chunks, 1 still in memory
Sat Aug 2 00:09:28 2008: Grab chunk 49 (2 in memory)
Sat Aug 2 00:09:32 2008: Cleaned 1 chunks, 1 still in memory
Sat Aug 2 00:09:37 2008: Grab chunk 379 (48 in memory)
Sat Aug 2 00:09:37 2008: Cleaned 2 chunks, 0 still in memory
Sat Aug 2 00:09:38 2008: Grab chunk 165 (1 in memory)
Sat Aug 2 00:09:38 2008: Grab chunk 197 (1 in memory)
Sat Aug 2 00:09:40 2008: Grab chunk 313 (2 in memory)
Sat Aug 2 00:09:42 2008: Cleaned 1 chunks, 1 still in memory
Sat Aug 2 00:09:44 2008: Grab chunk 49 (2 in memory)
Sat Aug 2 00:09:47 2008: Cleaned 1 chunks, 0 still in memory
Sat Aug 2 00:09:48 2008: Cleaned 1 chunks, 1 still in memory
Sat Aug 2 00:09:53 2008: Grab chunk 997 (49 in memory)
Sat Aug 2 00:09:54 2008: Grab chunk 268 (1 in memory)
Sat Aug 2 00:09:57 2008: Grab chunk 961 (50 in memory)
Sat Aug 2 00:09:57 2008: Grab chunk 197 (2 in memory)
Sat Aug 2 00:09:58 2008: Cleaned 1 chunks, 1 still in memory
Sat Aug 2 00:10:03 2008: Cleaned 1 chunks, 0 still in memory
Sat Aug 2 00:10:07 2008: Cleaned 1 chunks, 0 still in memory
Sat Aug 2 00:10:08 2008: Cleaned 1 chunks, 0 still in memory
Sat Aug 2 00:10:10 2008: Grab chunk 143 (1 in memory)
Sat Aug 2 00:10:11 2008: Grab chunk 268 (1 in memory)
Sat Aug 2 00:10:13 2008: Grab chunk 197 (2 in memory)
Sat Aug 2 00:10:17 2008: Cleaned 1 chunks, 0 still in memory
Sat Aug 2 00:10:18 2008: Cleaned 1 chunks, 1 still in memory
Sat Aug 2 00:10:21 2008: Grab chunk 331 (1 in memory)
Sat Aug 2 00:10:23 2008: Grab chunk 143 (2 in memory)
Sat Aug 2 00:10:24 2008: Grab chunk 63 (3 in memory)
Sat Aug 2 00:10:26 2008: Grab chunk 227 (51 in memory)
Sat Aug 2 00:10:27 2008: Saving 0 chunk downloads
Sat Aug 2 00:10:28 2008: Cleaned 1 chunks, 0 still in memory
Sat Aug 2 00:10:28 2008: Cleaned 2 chunks, 1 still in memory
Sat Aug 2 00:10:35 2008: Grab chunk 331 (1 in memory)
Sat Aug 2 00:10:36 2008: Grab chunk 104 (52 in memory)
Sat Aug 2 00:10:45 2008: Cleaned 1 chunks, 0 still in memory
Sat Aug 2 00:10:46 2008: Grab chunk 29 (1 in memory)
Sat Aug 2 00:10:46 2008: Grab chunk 413 (53 in memory)
Sat Aug 2 00:10:48 2008: Grab chunk 653 (54 in memory)
Sat Aug 2 00:10:50 2008: Grab chunk 174 (2 in memory)
Sat Aug 2 00:10:55 2008: Saving 0 chunk downloads
Sat Aug 2 00:10:56 2008: Cleaned 1 chunks, 0 still in memory
Sat Aug 2 00:10:58 2008: Grab chunk 306 (3 in memory)
Sat Aug 2 00:10:59 2008: Grab chunk 29 (1 in memory)
Sat Aug 2 00:10:59 2008: Cleaned 2 chunks, 1 still in memory
Sat Aug 2 00:11:00 2008: Grab chunk 174 (2 in memory)
Sat Aug 2 00:11:04 2008: Grab chunk 308 (2 in memory)
Sat Aug 2 00:11:04 2008: Grab chunk 184 (3 in memory)
Sat Aug 2 00:11:05 2008: Grab chunk 320 (3 in memory)
Sat Aug 2 00:11:07 2008: Cleaned 1 chunks, 2 still in memory
Sat Aug 2 00:11:09 2008: Grab chunk 156 (3 in memory)
Sat Aug 2 00:11:09 2008: Cleaned 2 chunks, 1 still in memory
Sat Aug 2 00:11:11 2008: Grab chunk 184 (2 in memory)
Sat Aug 2 00:11:15 2008: Grab chunk 37 (3 in memory)
Sat Aug 2 00:11:16 2008: Grab chunk 147 (4 in memory)
Sat Aug 2 00:11:17 2008: Cleaned 1 chunks, 1 still in memory
Sat Aug 2 00:11:18 2008: Grab chunk 308 (2 in memory)
Sat Aug 2 00:11:19 2008: Cleaned 2 chunks, 2 still in memory
Sat Aug 2 00:11:23 2008: Grab chunk 94 (3 in memory)
Sat Aug 2 00:11:23 2008: Grab chunk 56 (3 in memory)
Sat Aug 2 00:11:26 2008: Grab chunk 29 (4 in memory)
Sat Aug 2 00:11:27 2008: Cleaned 1 chunks, 2 still in memory

Could it be the choker_update_timer.getElapsedSinceUpdate() that breaks at the end of day?

There really is nothing else interesting in the logs. In addition to the seeding vs. downloading, the torrents that broke were private, and the others weren't. I can't think of anything else.
agforsyth
Registered Member
Posts
133
Karma
0

Sun Aug 03, 2008 5:18 am
Ok, it's definitely the choke timer. I added this line in torrentcontrol::update():
Code: Select all
                        long long int temptimer = choker_update_timer.getElapsedSinceUpdate();
                        if(temptimer < 10 || temptimer > 11000)
                                Out(SYS_DIO|LOG_DEBUG) << "ChokeTimer : " << temptimer << endl;

And the output after midnight was this:
Code: Select all
Sun Aug 3 00:07:43 2008: ChokeTimer : 0
Sun Aug 3 00:07:44 2008: ChokeTimer : 0
Sun Aug 3 00:07:44 2008: ChokeTimer : 0
Sun Aug 3 00:07:44 2008: ChokeTimer : 0
Sun Aug 3 00:07:44 2008: ChokeTimer : 0
Sun Aug 3 00:07:44 2008: ChokeTimer : 0
Sun Aug 3 00:07:44 2008: ChokeTimer : 0
Sun Aug 3 00:07:44 2008: ChokeTimer : 0
Sun Aug 3 00:07:44 2008: ChokeTimer : 0
Sun Aug 3 00:07:44 2008: ChokeTimer : 0
Sun Aug 3 00:07:44 2008: ChokeTimer : 0
Sun Aug 3 00:07:44 2008: ChokeTimer : 0
Sun Aug 3 00:07:44 2008: ChokeTimer : 0
Sun Aug 3 00:07:44 2008: ChokeTimer : 0
Sun Aug 3 00:07:44 2008: ChokeTimer : 0
Sun Aug 3 00:07:44 2008: ChokeTimer : 0
Sun Aug 3 00:07:44 2008: ChokeTimer : 0
Sun Aug 3 00:07:44 2008: ChokeTimer : 0
Sun Aug 3 00:07:44 2008: ChokeTimer : 0
Sun Aug 3 00:07:44 2008: ChokeTimer : 0
Sun Aug 3 00:07:44 2008: ChokeTimer : 0
Sun Aug 3 00:07:45 2008: ChokeTimer : 0
Sun Aug 3 00:07:45 2008: ChokeTimer : 0
Sun Aug 3 00:07:45 2008: ChokeTimer : 0
Sun Aug 3 00:07:45 2008: ChokeTimer : 0
Sun Aug 3 00:07:45 2008: ChokeTimer : 0
Sun Aug 3 00:07:45 2008: ChokeTimer : 0
Sun Aug 3 00:07:45 2008: ChokeTimer : 0
Sun Aug 3 00:07:45 2008: ChokeTimer : 0
Sun Aug 3 00:07:45 2008: ChokeTimer : 0
Sun Aug 3 00:07:45 2008: ChokeTimer : 0
Sun Aug 3 00:07:45 2008: ChokeTimer : 0
Sun Aug 3 00:07:45 2008: ChokeTimer : 0
Sun Aug 3 00:07:45 2008: ChokeTimer : 0
Sun Aug 3 00:07:45 2008: ChokeTimer : 0
Sun Aug 3 00:07:45 2008: ChokeTimer : 0

Clearly at midnight the choke timer is getting stuck at zero.
George
Moderator
Posts
5421
Karma
1

Sun Aug 03, 2008 11:10 am
I have found the problem and fixed it, the Timer class was using QTime, it now uses GetCurrentTime.


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]