These are chat archives for anacrolix/torrent

27th
Nov 2017
Denis
@elgatito
Nov 27 2017 05:27
@anacrolix , another panic reported by user - http://paste.ubuntu.com/26056299/
@anacrolix , yes, totally in memory, aligning, let's say 100mb for storage and setting readahead about 90mb. I was trying with the approach from filecache with LRU and so on, but it was not working properly with Kodi, probably I was doing something wrong :)
Matt Joiner
@anacrolix
Nov 27 2017 09:50
@deranjer Yes, the Torrent only downloads on demand. You can try to Read from a Reader returned from Torrent.NewReader, or Call Torrent.DownloadAll.
@elgatito If you are letting client apps (say VLC or a browser, or Kodi) read as they will from your Torrent, your readahead is going to cause a lot of data loss as they skip around the file. I wouldn't exceed more than 10-20% of your cache for a concurrent torrent or two, with 1-2 pieces (size is per-torrent, usually 256KB-8MB) as a preferred lower bound on your readahead. That's assuming that you're streaming.
Denis
@elgatito
Nov 27 2017 09:56
@anacrolix , windows users report more and more strange errors, like UDP not being able to pick up ports (&net.OpError{Op:"listen", Net:"udp", Source:net.Addr(nil), Addr*net.UDPAddr)(0x12489a80), Err*os.SyscallError)(0x125a55b0)}) or default storage not working at all.. and those panics from connection stats
regarding readahead, I use per-torrent capacity (not simplicity), and now settings readahead as 80% of capacity. Kodi is sending a simple CURL request with Content-range to get file, so it's a straight-forward reading. My storage is working fine usually, but removing non-needed items is making problems from time to time, will try with LRU.. each storage rewrite makes it smaller and smaller :)
Matt Joiner
@anacrolix
Nov 27 2017 10:20
@elgatito I'm really not sure with the Windows errors, I need specific causes to help patch over inadequacies in that OS
have you reported them all on github?
Denis
@elgatito
Nov 27 2017 10:23
no, first writing here, maybe it's an old issue. not sure the log will help with anything, torrent is downloading fine, then just this happen.
Matt Joiner
@anacrolix
Nov 27 2017 10:23
do you have the panic callstack?
Denis
@elgatito
Nov 27 2017 10:49
one log with a panic: http://paste.ubuntu.com/26054322/
Matt Joiner
@anacrolix
Nov 27 2017 11:22
i think that may be an error in your storage implementation
Yes if I had to guess, your storage.TorrentImpl.Piece is returning nil for some reason
Denis
@elgatito
Nov 27 2017 11:27
looks like. interesting why torrent is querying for a piece on a closed storage (the only time pieces are deleted)
Denis
@elgatito
Nov 27 2017 14:13
13:57:02.010 T:18446744072839493936 NOTICE: [plugin.video.elementum] unexpected error hashing piece with *storage.fileTorrentImpl: open /storage/A26A0AF96A0ACA4D/elementium/John Wick.2014.1080p.BluRay.x264-LEONARDO_[scarabey.org].mkv: too many open files
that is the log cut from the person with android, default storage running
I can do syscall.Getrlimit to get system limit and pass that value as connections limitation to the library, but will that help?
Denis
@elgatito
Nov 27 2017 14:22
another log with panic from Stats() - http://paste.ubuntu.com/26058345/ , this one from android
deranjer
@deranjer
Nov 27 2017 16:45
@anacrolix Sorry should have been more precise... I am calling the download all:
    singleTorrent, _ := tclient.AddTorrentInfoHash(element.Hash) //adding back in the torrents by hash
    fmt.Println("Here...", element.Hash)
    fmt.Println(singleTorrent.Stats())
    fmt.Println(singleTorrent.Info())
    fmt.Println(singleTorrent.InfoHash())
    <-singleTorrent.GotInfo()
    singleTorrent.DownloadAll()
    fmt.Println("Past...")
I never reach the "Past..." printout, it just sits endlessly at the gotinfo
Here is the log output:
Here... 5e8e0a2340d88598d9782d37ae2367447561a4de
{{0 0 0 0 0 0} 0 0 0 0}
<nil>
5e8e0a2340d88598d9782d37ae2367447561a4de