These are chat archives for anacrolix/torrent

29th
Dec 2017
Denis
@elgatito
Dec 29 2017 08:31
is there any example of making a dummy torrent usage, so the script can start a Client, add a torrent file, add peers there are downloading from that Client?
I was playing with the code from this issue: anacrolix/torrent#184 , but it's not downloading
Denis
@elgatito
Dec 29 2017 10:20
@anacrolix , have tried to use static filehandles for default storage, elgatito/torrent@5985609
but it fails to match length when piece.Complete is called (s.Size() < fi.Length)
can't figure out, s.Size is the file size and if we write last piece we expect to have s.Size as the whole length, but s.Size() shows really wrote data size only
I'm missing something, definitely...
Denis
@elgatito
Dec 29 2017 12:15
got new report of a playback stop: http://dropmefiles.com/Lo2WV
Denis
@elgatito
Dec 29 2017 12:23
15:51:33 T:2800  NOTICE: [plugin.video.elementum] DEBU  memory       ▶ ReadAt           Not contains read: 284, Stats: 1622016-2097152, Completed: false, Chunk: 5 (4-5), Request: 65536, len(32768)
15:51:33 T:2800  NOTICE: [plugin.video.elementum] DEBU  memory       ▶ MarkNotComplete  NotComplete: 284
15:51:33 T:2800  NOTICE: [plugin.video.elementum] dropping first corresponding conn from trust: [11]
15:51:33 T:2800  NOTICE: [plugin.video.elementum] DEBU  memory       ▶ MarkComplete     Complete: 283
that is the last MarkComplete() call, after that Client just stopped downloading, while I do see next pieces are there
Denis
@elgatito
Dec 29 2017 12:28
One more from another user - https://paste.ubuntu.com/26277005/plain
Matt Joiner
@anacrolix
Dec 29 2017 12:31
That log looks fine, there aren't many peers but they look valid in the status
(the first one you just gave)
Denis
@elgatito
Dec 29 2017 12:31
yupp, and i don't see any error
Matt Joiner
@anacrolix
Dec 29 2017 12:32
Only 4 peers, that's really poorly seeded
The reader is even blocked on the correct piece
Denis
@elgatito
Dec 29 2017 12:33
second log is strange, probably not full, so don't try to read it, asked for a new one
strange only on windows we have "not complete" situations, not sure about android
but on linux it's fine. interesting what differs
Matt Joiner
@anacrolix
Dec 29 2017 12:34
The big one would be threading and locking behaviours
They're very different between platforms
Particularly in the way that Go tries to wrap them for its green-threading
I don't think the first log is conclusive, and I skipped the second as you suggested
Denis
@elgatito
Dec 29 2017 12:37
second log looks different
it's linux host, and you can open and search to the last "complete:" occasion
many peers and nothing happen
Matt Joiner
@anacrolix
Dec 29 2017 12:41
hm yeah, and hte readers are positioned inside completed pieces
that should be reading
you don't have timeouts or something communicating between kodi and this plugin?
hm, it looks correct, just that the readers are not consuming any data
it shouldn't be downloading, and it isn't at that piont
Denis
@elgatito
Dec 29 2017 13:07
I have used your code to link http request to torrent reader
Denis
@elgatito
Dec 29 2017 14:02
Possible issue with waitavailable or something in that cycle where reader waits for availibility?
Denis
@elgatito
Dec 29 2017 20:25
can be from the reader side where it expects the readable and tries to read?
deranjer
@deranjer
Dec 29 2017 20:26
@anacrolix I assume the ConnStats->DataBytesWritten and DataBytesRead are all reset if the client is closed and re-opened correct?
Denis
@elgatito
Dec 29 2017 22:19
Error creating bit client: &net.OpError{Op:"listen", Net:"udp", Source:net.Addr(nil), Addr:(*net.UDPAddr)(0x124a98c0), Err:(*os.SyscallError)(0x12377670)}
that is on windows, looks like it cannot properly close udp/tcp ports, sometimes it even can't listen on the tcp port, which I have tested to listen before ( trying to listen to make sure it's not used by others)