{"action":"created","issue":{"url":"https://api.github.com/repos/arvidn/libtorrent/issues/1411","repository_url":"https://api.github.com/repos/arvidn/libtorrent","labels_url":"https://api.github.com/repos/arvidn/libtorrent/issues/1411/labels{/name}","comments_url":"https://api.github.com/repos/arvidn/libtorrent/issues/1411/comments","events_url":"https://api.github.com/repos/arvidn/libtorrent/issues/1411/events","html_url":"https://github.com/arvidn/libtorrent/issues/1411","id":195111619,"number":1411,"title":"web seed response is incorreclty mapped to piece blocks","user":{"login":"Falcosc","id":8665625,"avatar_url":"https://avatars.githubusercontent.com/u/8665625?v=3","gravatar_id":"","url":"https://api.github.com/users/Falcosc","html_url":"https://github.com/Falcosc","followers_url":"https://api.github.com/users/Falcosc/followers","following_url":"https://api.github.com/users/Falcosc/following{/other_user}","gists_url":"https://api.github.com/users/Falcosc/gists{/gist_id}","starred_url":"https://api.github.com/users/Falcosc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Falcosc/subscriptions","organizations_url":"https://api.github.com/users/Falcosc/orgs","repos_url":"https://api.github.com/users/Falcosc/repos","events_url":"https://api.github.com/users/Falcosc/events{/privacy}","received_events_url":"https://api.github.com/users/Falcosc/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":20,"created_at":"2016-12-12T23:01:44Z","updated_at":"2016-12-14T22:42:39Z","closed_at":"2016-12-14T22:42:39Z","body":"Linux\r\nLibtorrent 1.1.1\r\n\r\nAfter I did raise the merge request limit from 1MiB to 100MiB I find a strange bug. Some blocks are reselected. They can't be broken blocks because they where transfered over HTTP. And I guess it is not even possible to identify a single 16KiB block as brocken because the hash is for 1024KiB pieces.\r\n\r\nHere are my 100MiB requests, all in a nice sequentce to make http server happy.\r\n```\r\npicker_log [ sequential_pieces prefer_contiguous ]\r\n(0,0)..(0,63)\r\n..\r\n(99,0)..(99,63)\r\npicker_log [ sequential_pieces prefer_contiguous ]\r\n(100,0)..(190,63)\r\n..\r\n(199,0)..(199,63)\r\n``` \r\nBut then piece_picker select some already transfered objects, why does this happen?\r\n```\r\npicker_log [ sequential_pieces prefer_contiguous ] (0,41) (1,19) (1,61) (2,39) \r\npicker_log [ sequential_pieces prefer_contiguous ] (3,17) (3,59) \r\npicker_log [ sequential_pieces prefer_contiguous ] (4,37) \r\npicker_log [ sequential_pieces prefer_contiguous ] (5,15) (5,57) \r\npicker_log [ sequential_pieces prefer_contiguous ] (6,35) \r\npicker_log [ sequential_pieces prefer_contiguous ] (7,13) (7,55) \r\npicker_log [ sequential_pieces prefer_contiguous ] (8,33) \r\npicker_log [ sequential_pieces prefer_contiguous ] (9,11) (9,53) \r\npicker_log [ sequential_pieces prefer_contiguous ] (10,31) \r\npicker_log [ sequential_pieces prefer_contiguous ] (11,9) (11,51) \r\npicker_log [ sequential_pieces prefer_contiguous ] (12,29) (13,7) (13,49) \r\npicker_log [ sequential_pieces prefer_contiguous ] (14,27) (15,5) (15,47) \r\npicker_log [ sequential_pieces prefer_contiguous ] (16,25) \r\npicker_log [ sequential_pieces prefer_contiguous ] (17,3) (17,45) \r\npicker_log [ sequential_pieces prefer_contiguous ] (18,23) \r\npicker_log [ sequential_pieces prefer_contiguous ] (19,1) (19,43) \r\npicker_log [ sequential_pieces prefer_contiguous ] (20,21) (20,63) \r\npicker_log [ sequential_pieces prefer_contiguous ] (21,41) \r\npicker_log [ sequential_pieces prefer_contiguous ] (22,19) (22,61) \r\npicker_log [ sequential_pieces prefer_contiguous ] (23,39) (24,17) (24,59) \r\npicker_log [ sequential_pieces prefer_contiguous ] (25,37) \r\npicker_log [ sequential_pieces prefer_contiguous ] (26,15) (26,57) \r\npicker_log [ sequential_pieces prefer_contiguous ] (27,35) \r\npicker_log [ sequential_pieces prefer_contiguous ] (28,13) (28,55) \r\npicker_log [ sequential_pieces prefer_contiguous ] (29,33) \r\npicker_log [ sequential_pieces prefer_contiguous ] (30,11) (30,53) \r\npicker_log [ sequential_pieces prefer_contiguous ] (31,31) \r\npicker_log [ sequential_pieces prefer_contiguous ] (32,9) (32,51) \r\npicker_log [ sequential_pieces prefer_contiguous ] (33,29) \r\npicker_log [ sequential_pieces prefer_contiguous ] (34,7) (34,49) \r\npicker_log [ sequential_pieces prefer_contiguous ] (35,27) \r\npicker_log [ sequential_pieces prefer_contiguous ] (36,5) (36,47) \r\npicker_log [ sequential_pieces prefer_contiguous ] (37,25) \r\npicker_log [ sequential_pieces prefer_contiguous ] (38,3) (38,45) \r\npicker_log [ sequential_pieces prefer_contiguous ] (39,23) \r\npicker_log [ sequential_pieces prefer_contiguous ] (40,1) (40,43) \r\npicker_log [ sequential_pieces prefer_contiguous ] (41,21) (41,63) \r\npicker_log [ sequential_pieces prefer_contiguous ] (42,41) \r\npicker_log [ sequential_pieces prefer_contiguous ] (43,19) (43,61) \r\npicker_log [ sequential_pieces prefer_contiguous ] (44,39) \r\npicker_log [ sequential_pieces prefer_contiguous ] (45,17) (45,59) \r\npicker_log [ sequential_pieces prefer_contiguous ] (46,37) \r\npicker_log [ sequential_pieces prefer_contiguous ] (47,15) (47,57) \r\npicker_log [ sequential_pieces prefer_contiguous ] (48,35) \r\npicker_log [ sequential_pieces prefer_contiguous ] (49,13) (49,55) \r\npicker_log [ sequential_pieces prefer_contiguous ] (50,33) \r\npicker_log [ sequential_pieces prefer_contiguous ] (51,11) (51,53) \r\npicker_log [ sequential_pieces prefer_contiguous ] (52,31) \r\npicker_log [ sequential_pieces prefer_contiguous ] (53,9) (53,51) \r\npicker_log [ sequential_pieces prefer_contiguous ] (54,29) \r\npicker_log [ sequential_pieces prefer_contiguous ] (55,7) (55,49) \r\npicker_log [ sequential_pieces prefer_contiguous ] (56,27) \r\npicker_log [ sequential_pieces prefer_contiguous ] (57,5) (57,47) \r\npicker_log [ sequential_pieces prefer_contiguous ] (58,25) \r\npicker_log [ sequential_pieces prefer_contiguous ] (59,3) (59,45) \r\npicker_log [ sequential_pieces prefer_contiguous ] (60,23) \r\npicker_log [ sequential_pieces prefer_contiguous ] (61,1) (61,43) \r\npicker_log [ sequential_pieces prefer_contiguous ] (62,21) (62,63) \r\npicker_log [ sequential_pieces prefer_contiguous ] (63,41) \r\npicker_log [ sequential_pieces prefer_contiguous ] (64,19) (64,61) \r\npicker_log [ sequential_pieces prefer_contiguous ] (65,39) \r\npicker_log [ sequential_pieces prefer_contiguous ] (66,17) (66,59) \r\npicker_log [ sequential_pieces prefer_contiguous ] (27,35) (55,7) (66,59) (67,37) \r\npicker_log [ sequential_pieces prefer_contiguous ] (68,15) (68,57) \r\npicker_log [ sequential_pieces prefer_contiguous ] (69,35) (70,13) (70,55) \r\npicker_log [ sequential_pieces prefer_contiguous ] (71,33) \r\npicker_log [ sequential_pieces prefer_contiguous ] (72,11) (72,53) \r\npicker_log [ sequential_pieces prefer_contiguous ] (73,31) (74,9) (74,51) \r\npicker_log [ sequential_pieces prefer_contiguous ] (75,29) \r\npicker_log [ sequential_pieces prefer_contiguous ] (76,7) (76,49) \r\npicker_log [ sequential_pieces prefer_contiguous ] (77,27) \r\npicker_log [ sequential_pieces prefer_contiguous ] (78,5) (78,47) \r\npicker_log [ sequential_pieces prefer_contiguous ] (79,25) \r\npicker_log [ sequential_pieces prefer_contiguous ] (80,3) (80,45) \r\npicker_log [ sequential_pieces prefer_contiguous ] (81,23) \r\npicker_log [ sequential_pieces prefer_contiguous ] (82,1) (82,43) \r\npicker_log [ sequential_pieces prefer_contiguous ] (83,21) (83,63) \r\npicker_log [ sequential_pieces prefer_contiguous ] (84,41) \r\npicker_log [ sequential_pieces prefer_contiguous ] (85,19) (85,61) \r\npicker_log [ sequential_pieces prefer_contiguous ] (86,39) \r\npicker_log [ sequential_pieces prefer_contiguous ] (87,17) (87,59) \r\npicker_log [ sequential_pieces prefer_contiguous ] (88,37) \r\npicker_log [ sequential_pieces prefer_contiguous ] (89,15) (89,57) \r\npicker_log [ sequential_pieces prefer_contiguous ] (90,35) \r\npicker_log [ sequential_pieces prefer_contiguous ] (91,13) (91,55) \r\npicker_log [ sequential_pieces prefer_contiguous ] (92,33) \r\npicker_log [ sequential_pieces prefer_contiguous ] (93,11) (93,53) \r\npicker_log [ sequential_pieces prefer_contiguous ] (94,31) \r\npicker_log [ sequential_pieces prefer_contiguous ] (95,9) (95,51) \r\npicker_log [ sequential_pieces prefer_contiguous ] (96,29) \r\npicker_log [ sequential_pieces prefer_contiguous ] (97,7) (97,49) \r\npicker_log [ sequential_pieces prefer_contiguous ] (98,27) \r\npicker_log [ sequential_pieces prefer_contiguous ] (99,5) (99,47) \r\npicker_log [ sequential_pieces prefer_contiguous ] (100,25) \r\npicker_log [ sequential_pieces prefer_contiguous ] (101,3) (101,45) \r\npicker_log [ sequential_pieces prefer_contiguous ] (103,1) (103,43) \r\npicker_log [ sequential_pieces prefer_contiguous ] (104,21) (104,63) \r\npicker_log [ sequential_pieces prefer_contiguous ] (105,41) \r\npicker_log [ sequential_pieces prefer_contiguous ] (106,19) (106,61) \r\npicker_log [ sequential_pieces prefer_contiguous ] (107,39) \r\npicker_log [ sequential_pieces prefer_contiguous ] (108,17) (108,59) \r\npicker_log [ sequential_pieces prefer_contiguous ] (109,37) \r\npicker_log [ sequential_pieces prefer_contiguous ] (110,15) (110,57) \r\npicker_log [ sequential_pieces prefer_contiguous ] (111,35) \r\npicker_log [ sequential_pieces prefer_contiguous ] (112,13) (112,55) \r\npicker_log [ sequential_pieces prefer_contiguous ] (113,33) (114,11) (114,53) \r\npicker_log [ sequential_pieces prefer_contiguous ] (115,31) \r\npicker_log [ sequential_pieces prefer_contiguous ] (116,9) (116,51) \r\npicker_log [ sequential_pieces prefer_contiguous ] (117,29) \r\npicker_log [ sequential_pieces prefer_contiguous ] (118,7) (118,49) \r\npicker_log [ sequential_pieces prefer_contiguous ] (119,27) \r\npicker_log [ sequential_pieces prefer_contiguous ] (120,5) (120,47) \r\npicker_log [ sequential_pieces prefer_contiguous ] (121,25) \r\npicker_log [ sequential_pieces prefer_contiguous ] (122,3) (122,45) \r\npicker_log [ sequential_pieces prefer_contiguous ] (123,23) \r\npicker_log [ sequential_pieces prefer_contiguous ] (124,1) (124,43) \r\npicker_log [ sequential_pieces prefer_contiguous ] (125,21) (125,63) \r\npicker_log [ sequential_pieces prefer_contiguous ] (126,41) \r\npicker_log [ sequential_pieces prefer_contiguous ] (127,19) (127,61) \r\npicker_log [ sequential_pieces prefer_contiguous ] (128,39) \r\npicker_log [ sequential_pieces prefer_contiguous ] (129,17) (129,59) \r\npicker_log [ sequential_pieces prefer_contiguous ] (130,37) \r\npicker_log [ sequential_pieces prefer_contiguous ] (131,15) (131,57) \r\npicker_log [ sequential_pieces prefer_contiguous ] (132,35) \r\npicker_log [ sequential_pieces prefer_contiguous ] (133,13) (133,55) \r\npicker_log [ sequential_pieces prefer_contiguous ] (134,33) \r\npicker_log [ sequential_pieces prefer_contiguous ] (132,35) (133,13) (133,55) (134,33) \r\npicker_log [ sequential_pieces prefer_contiguous ] (135,11) (135,53) \r\npicker_log [ sequential_pieces prefer_contiguous ] (136,31) (137,9) (137,51) \r\npicker_log [ sequential_pieces prefer_contiguous ] (138,29) \r\npicker_log [ sequential_pieces prefer_contiguous ] (139,7) (139,49) \r\npicker_log [ sequential_pieces prefer_contiguous ] (140,27) \r\npicker_log [ sequential_pieces prefer_contiguous ] (141,5) (141,47) \r\npicker_log [ sequential_pieces prefer_contiguous ] (142,25) \r\npicker_log [ sequential_pieces prefer_contiguous ] (143,3) (143,45) \r\npicker_log [ sequential_pieces prefer_contiguous ] (144,23) \r\npicker_log [ sequential_pieces prefer_contiguous ] (145,1) (145,43) \r\npicker_log [ sequential_pieces prefer_contiguous ] (146,21) (146,63) \r\npicker_log [ sequential_pieces prefer_contiguous ] (147,41) \r\npicker_log [ sequential_pieces prefer_contiguous ] (148,19) (148,61) \r\npicker_log [ sequential_pieces prefer_contiguous ] (149,39) \r\npicker_log [ sequential_pieces prefer_contiguous ] (150,17) (150,59) \r\npicker_log [ sequential_pieces prefer_contiguous ] (151,37) \r\npicker_log [ sequential_pieces prefer_contiguous ] (152,15) (152,57) \r\npicker_log [ sequential_pieces prefer_contiguous ] (153,35) \r\npicker_log [ sequential_pieces prefer_contiguous ] (154,13) (154,55) \r\npicker_log [ sequential_pieces prefer_contiguous ] (155,33) \r\npicker_log [ sequential_pieces prefer_contiguous ] (156,11) (156,53) \r\npicker_log [ sequential_pieces prefer_contiguous ] (157,31) \r\npicker_log [ sequential_pieces prefer_contiguous ] (158,9) (158,51) \r\npicker_log [ sequential_pieces prefer_contiguous ] (159,29) \r\npicker_log [ sequential_pieces prefer_contiguous ] (160,7) (160,49) \r\npicker_log [ sequential_pieces prefer_contiguous ] (161,27) \r\npicker_log [ sequential_pieces prefer_contiguous ] (162,5) (162,47) \r\npicker_log [ sequential_pieces prefer_contiguous ] (163,25) \r\npicker_log [ sequential_pieces prefer_contiguous ] (164,3) (164,45) \r\npicker_log [ sequential_pieces prefer_contiguous ] (165,23) \r\npicker_log [ sequential_pieces prefer_contiguous ] (166,1) (166,43) \r\npicker_log [ sequential_pieces prefer_contiguous ] (167,21) (167,63) \r\npicker_log [ sequential_pieces prefer_contiguous ] (168,41) \r\npicker_log [ sequential_pieces prefer_contiguous ] (169,19) (169,61) \r\npicker_log [ sequential_pieces prefer_contiguous ] (170,39) \r\npicker_log [ sequential_pieces prefer_contiguous ] (171,17) (171,59) \r\npicker_log [ sequential_pieces prefer_contiguous ] (172,37) \r\npicker_log [ sequential_pieces prefer_contiguous ] (173,15) (173,57) \r\npicker_log [ sequential_pieces prefer_contiguous ] (174,35) \r\npicker_log [ sequential_pieces prefer_contiguous ] (175,13) (175,55) \r\npicker_log [ sequential_pieces prefer_contiguous ] (176,33) \r\npicker_log [ sequential_pieces prefer_contiguous ] (177,11) (177,53) \r\npicker_log [ sequential_pieces prefer_contiguous ] (178,31) \r\npicker_log [ sequential_pieces prefer_contiguous ] (179,9) (179,51) \r\npicker_log [ sequential_pieces prefer_contiguous ] (180,29) \r\npicker_log [ sequential_pieces prefer_contiguous ] (181,7) (181,49) \r\npicker_log [ sequential_pieces prefer_contiguous ] (182,27) (183,5) (183,47) \r\npicker_log [ sequential_pieces prefer_contiguous ] (184,25) \r\npicker_log [ sequential_pieces prefer_contiguous ] (185,3) (185,45) \r\npicker_log [ sequential_pieces prefer_contiguous ] (186,23) \r\npicker_log [ sequential_pieces prefer_contiguous ] (187,1) (187,43) \r\npicker_log [ sequential_pieces prefer_contiguous ] (188,21) (188,63) \r\npicker_log [ sequential_pieces prefer_contiguous ] (189,41) \r\npicker_log [ sequential_pieces prefer_contiguous ] (190,19) (190,61) \r\npicker_log [ sequential_pieces prefer_contiguous ] (191,39) \r\npicker_log [ sequential_pieces prefer_contiguous ] (192,17) (192,59) \r\npicker_log [ sequential_pieces prefer_contiguous ] (193,37) \r\npicker_log [ sequential_pieces prefer_contiguous ] (194,15) (194,57) \r\npicker_log [ sequential_pieces prefer_contiguous ] (195,35) \r\npicker_log [ sequential_pieces prefer_contiguous ] (196,13) (196,55) \r\npicker_log [ sequential_pieces prefer_contiguous ] (197,33) \r\npicker_log [ sequential_pieces prefer_contiguous ] (198,11) (198,53) \r\npicker_log [ sequential_pieces prefer_contiguous ] (199,31) \r\n```\r\n\r\n310 blocks of 12800 blocks are reselected in regular form. Could be some kind for state synchronize problem. These pieces are stuck in state \"piece_downloading\" \r\nAfter a 6400 Part request is done piece_picker report these pieces as num_partials.\r\nconst int num_partials = int(m_downloads[piece_pos::piece_downloading].size())\r\n\r\nI guess an sync on the request postprocessing (state switch for piece_downloading) would block the thread to long, but I don't know how.\r\n\r\nWhat are you thinking about it?\r\n\r\nKind Regards\r\nFalco"},"comment":{"url":"https://api.github.com/repos/arvidn/libtorrent/issues/comments/267180242","html_url":"https://github.com/arvidn/libtorrent/issues/1411#issuecomment-267180242","issue_url":"https://api.github.com/repos/arvidn/libtorrent/issues/1411","id":267180242,"user":{"login":"Falcosc","id":8665625,"avatar_url":"https://avatars.githubusercontent.com/u/8665625?v=3","gravatar_id":"","url":"https://api.github.com/users/Falcosc","html_url":"https://github.com/Falcosc","followers_url":"https://api.github.com/users/Falcosc/followers","following_url":"https://api.github.com/users/Falcosc/following{/other_user}","gists_url":"https://api.github.com/users/Falcosc/gists{/gist_id}","starred_url":"https://api.github.com/users/Falcosc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Falcosc/subscriptions","organizations_url":"https://api.github.com/users/Falcosc/orgs","repos_url":"https://api.github.com/users/Falcosc/repos","events_url":"https://api.github.com/users/Falcosc/events{/privacy}","received_events_url":"https://api.github.com/users/Falcosc/received_events","type":"User","site_admin":false},"created_at":"2016-12-14T22:42:39Z","updated_at":"2016-12-14T22:42:39Z","body":"I’m just stupid. I don’t know why I did waste so much time instead of building the head.\r\nBut now I know something about libtorrent :D\r\nThanks for your forbearance. I didn’t want to bother you.\r\nEverything works well :)\r\n"}}
{"actor":{"display_login":"Falcosc"}}