majestrate / XD

meme bittorrent client
https://xd-torrent.github.io/
MIT License
241 stars 25 forks source link

XD cannot finish downloading #65

Closed ghost closed 6 years ago

ghost commented 6 years ago

I am using XD in docker container(alpine). The program downloads files, but somehow it cannot stop to download and move file into seeding state. In other words, a file is completed, but XD keeps going to download it and shows the incomplete download bar. Could you help me with it?

majestrate commented 6 years ago

sure, would need to put the program into debug log spew mode. that would probably provide insights.

ghost commented 6 years ago

Can you please tell me how to show debug information for go program? I can only show right now the log from the program itself, last lines are the following:

[NFO] 2018-06-27 20:32:41.289599084 +0200 CAT m=+281.757920832 http://w7tpbzncbcocrqtwwm3nezhnnsw4ozadvi2hmvzdhrqzfxfum7wa.b32.i2p:80/a got 10 peers for 3749b4e923fc7r50f38622ea05s357gf5aaf780c [NFO] 2018-06-27 20:34:12.725874882 +0200 CAT m=+373.194196618 http://tracker2.postman.i2p:80/announce.php got 10 peers for 3749b4e923fc7r50f38622ea05s357gf5aaf780c [NFO] 2018-06-27 20:35:10.201735277 +0200 CAT m=+430.670056857 http://s5ikrdyjwbcgxmqetxb3nyheizftms7euacuub2hic7defkh3xhq.b32.i2p:80/a got 10 peers for 3749b4e923fc7r50f38622ea05s357gf5aaf780c [NFO] 2018-06-27 20:40:14.569499044 +0200 CAT m=+735.037820765 http://uajd4nctepxpac4c4bdyrdw7qvja2a5u3x25otfhkptcjgd53ioq.b32.i2p:80/announce got 1 peers for 3749b4e923fc7r50f38622ea05s357gf5aaf780c [WRN] 2018-06-27 20:40:39.952696323 +0200 CAT m=+760.421018048 failed to resolve peer NAMING REPLY RESULT=INVALID_KEY NAME=5wbzhxacwymch6bjey3ams4yfpghnb4o4topwtbzblqhfk2yq3vq.b32.i2p

majestrate commented 6 years ago

in torrents.ini config file find the log section and change the level to debug

[log]
level=debug
majestrate commented 6 years ago

be warned it will spew lots of debug messages

ghost commented 6 years ago

It took sometime, the bug is not consistently reproducible (see attached file). I would like to mention the following points. It seems to me that the file was actually downloaded, so i can open it and read the downloaded file without problem. Although the status bar shows around 95% in web -ui. Maybe the bug is connected with the fact that the tracker (tracker2.postman.i2p) shows that i downloaded 0 bytes.

xd.log.gz

majestrate commented 6 years ago

aha it's struggling on the last piece

majestrate commented 6 years ago

try latest revision, i THINK i fixed it.

ghost commented 6 years ago

I have tried the last version. Actually it became worst. In the end the file is not downloaded, i cannot open it. The status bar stops somewhere in the middle. Please find the log attached

xd.log.gz

majestrate commented 6 years ago

try https://github.com/majestrate/XD/commit/67c2aa22d94e9392e394ea708bc8ed979868b59a

majestrate commented 6 years ago

rather, https://github.com/majestrate/XD/commit/10d1200d3fdc383ee83baeafba1b8db7f9aac74d

ghost commented 6 years ago

I have tried 67c2aa2, nothing changed.

xd.log.gz

majestrate commented 6 years ago

can you try https://github.com/majestrate/XD/commit/10d1200d3fdc383ee83baeafba1b8db7f9aac74d ?

ghost commented 6 years ago

10d1200 and 67c2aa2 behave the same. File cannot be downloaded. The status bar stops somewhere in the middle. Please find the log attached

xd.log.gz

majestrate commented 6 years ago

is there a seed?

ghost commented 6 years ago

Yes. There are many seeds. The program constantly downloads the file, but the status bar doesnot move and the downloading is not finished in the reasonable observable time.

majestrate commented 6 years ago

it looks like it's trying to download many pieces at once and stalling. this may be why the progress bar stalls.

majestrate commented 6 years ago

actually no, it's spamming the same request.... hmm

majestrate commented 6 years ago

i managed to complete that torrent finally, releasing 0.3.1 with those bugfixes

ghost commented 6 years ago

yeah, it works. Thank you

majestrate commented 6 years ago

yw

ghost commented 6 years ago

xd.log.gz Well. I am afraid to tell you this but i have exactly the same problem again with other random file. The log is attached

majestrate commented 6 years ago

just tried with the torrent in the logs, it downloaded just fine with HEAD revision.

ghost commented 6 years ago

Yeah, my bad. It works.