Closed tsynik closed 10 months ago
Hi @tsynik. There may be an issue around closing, but the immediate cause of the issue above is https://github.com/YouROK/TorrServer/blob/34634649024b06921e7f2bb068da4a4ad35fabe4/server/torr/storage/torrstor/cache.go#L86. It's not valid to return nil here to anacrolix/torrent.
Hi @anacrolix. Thx for point to TorrServer code, I'll dig into it. And to mute read chunks errors logging we need add Capacity like so: https://github.com/YouROK/TorrServer/commit/e480ecb09388042fe13485678ba8b3d8d6ddb383?
Yes I do recall something about masking an error if the storage knows there's a limited capacity. That way it doesn't get confused when pieces go missing.
@anacrolix looks like we fixed this returning fake piece instead of nil: https://github.com/YouROK/TorrServer/commit/dd26ff3d5f762a946fe3bafef9ea3ae6d47526cf Thanks for suggestion!
We have this panic report from TorrServer user:
and also many "error reading chunk for peer Request XXX: EOF" warnings before crash, which must be on Debug level, but they don't. According this commit https://github.com/anacrolix/torrent/commit/08c403ea52153a22d6f599e03741fbfce4a0e492 probably it must depend on Torrent closure in peerRequestDataReader or later to avoid crashes.
another report: