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

(t *Torrent) Drop() isn't completely safe #980

Open
viciious opened this issue Sep 26, 2024 · 2 comments
Open

(t *Torrent) Drop() isn't completely safe #980

viciious opened this issue Sep 26, 2024 · 2 comments

Comments

@viciious
Copy link

viciious commented Sep 26, 2024

Hi,

I have the following problem: calling Drop() on a torrent and immediately unlinking the file sometimes causes the following errors:

"*torrent.PeerConn 0xc000200008: error reading chunk for peer Request {219 {1474560 16384}}: EOF"
"*torrent.PeerConn 0xc000200008: error reading chunk for peer Request {219 {1884160 16384}}: EOF"
"*torrent.PeerConn 0xc000200008: error reading chunk for peer Request {219 {1540096 16384}}: EOF"
"*torrent.PeerConn 0xc000200008: error reading chunk for peer Request {219 {1556480 16384}}: EOF"

One would assume that no data is being read after dropping.

@anacrolix
Copy link
Owner

Well spotted. It's probable that the torrent close state isn't checked after attempting to read data to satisfy peer requests. It would be a small fix.

What is quoting your errors like that?

@viciious
Copy link
Author

I'm using my own wrapper for structured logging, the quotes come from piping json logs to jq.

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

No branches or pull requests

2 participants