boramalper / magnetico

Autonomous (self-hosted) BitTorrent DHT search engine suite.
http://labs.boramalper.org/magnetico/
GNU Affero General Public License v3.0
3.06k stars 343 forks source link

slice bounds out of range error on v0.11.0 #244

Open boramalper opened 4 years ago

boramalper commented 4 years ago

On v0.11.0

panic: runtime error: slice bounds out of range [:16384] with capacity 12494

goroutine 8412821 [running]:
github.com/boramalper/magnetico/cmd/magneticod/bittorrent/metadata.(*Leech).Do(0xc000334100, 0xbf8dccfbc640d222, 0x142af7719da36, 0xf80980)
        /home/bora/magnetico/cmd/magneticod/bittorrent/metadata/leech.go:357 +0x1240
created by github.com/boramalper/magnetico/cmd/magneticod/bittorrent/metadata.(*Sink).Sink
        /home/bora/magnetico/cmd/magneticod/bittorrent/metadata/sink.go:124 +0x64c
NHOrus commented 3 years ago

Same error on v0.12.0

WARN    Could NOT write an UDP packet!  {"error": "invalid argument"}
WARN    Could NOT write an UDP packet!  {"error": "invalid argument"}
panic: runtime error: slice bounds out of range [:32768] with capacity 25575

goroutine 1850137 [running]:
github.com/boramalper/magnetico/cmd/magneticod/bittorrent/metadata.(*Leech).Do(0xc000222800, 0xc01a3bd117990919, 0x570a38b1056c, 0xe8d7e0)
        /home/bora/labs/magnetico/cmd/magneticod/bittorrent/metadata/leech.go:357 +0x1336
created by github.com/boramalper/magnetico/cmd/magneticod/bittorrent/metadata.(*Sink).Sink
        /home/bora/labs/magnetico/cmd/magneticod/bittorrent/metadata/sink.go:124 +0x65e

root@ubuntu-s-1vcpu-2gb-ams3-01:~# ./magneticod
INFO    magneticod v0.12.0 has been started.
INFO    Copyright (C) 2017-2020  Mert Bora ALPER <bora@boramalper.org>.
INFO    Dedicated to Cemile Binay, in whose hands I thrived.