Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

udp tracker panic #845

Closed
monkeyWie opened this issue Jul 3, 2023 · 1 comment · Fixed by #846
Closed

udp tracker panic #845

monkeyWie opened this issue Jul 3, 2023 · 1 comment · Fixed by #846

Comments

@monkeyWie
Copy link
Contributor

monkeyWie commented Jul 3, 2023

When I add some tracker URLs, it causes a panic:

panic: read udp4 0.0.0.0:51174: wsarecvfrom: A message sent on a datagram socket was larger than the internal message buffer or some other network limit, or the buffer used to receive a datagram into was smaller than the datagram itself.

goroutine 1911 [running]:
github.com/anacrolix/torrent/tracker/udp.(*ConnClient).reader(0xc001b3ec80)
        D:/data/go/pkg/mod/github.com/anacrolix/torrent@v1.46.0/tracker/udp/conn-client.go:42 +0x4c5
created by github.com/anacrolix/torrent/tracker/udp.NewConnClient
        D:/data/go/pkg/mod/github.com/anacrolix/torrent@v1.46.0/tracker/udp/conn-client.go:102 +0x3e5

I found this issue #764, and upgraded to the latest version, but it still panics.

reproduce code:

package main

import (
	"github.com/anacrolix/torrent"
)

func main() {
	c, _ := torrent.NewClient(nil)
	defer c.Close()
	t, _ := c.AddMagnet("magnet:?xt=urn:btih:ca21e5baa68fe0edb715f5edf5120aa643218391&dn=[电影天堂www.dytt89.com]铃芽之旅-2022_HD日语中字.mp4")
	t.AddTrackers([][]string{{"udp://tracker.theoks.net:6969/announce"}})
	<-t.GotInfo()
}
@anacrolix
Copy link
Owner

Thank you for reporting this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants