-
Notifications
You must be signed in to change notification settings - Fork 123
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
Crash in (*BitSet).IsSet torrent/bitset.go:52 #54
Comments
A few clues about the state of the torrent:
|
I just pushed a change that improves the panic message to give more information. Please let me know if you see the error again with the additional info. Looking at the code and the stack crawl... But we fail trying to update the peer's "have" bitset. For some reason the peer's have bitset is smaller than it should be. |
From Issue #54 it looks like we may be adding peers before we have a torrent. Add checks to reject peers before we have a torrent.
One theory is that we are adding peers to the torrent session before we know the I added some sanity checks to reject attempts to add peers before we know the size of the torrent. Let me know if you see this error again with the latest code. |
This just happened again, using tip. 2014/07/23 23:05:24 Have 1 of 821 pieces 0.12180268 % complete. goroutine 27 [running]: |
Aha, that's very interesting. Index 631 out of range 0..0 - sounds like the bitset is uninitialized. |
Reading through the source, I think what's happening is that a peer is being added (and the peer's "have" bitset is created) before t.totalPieces is set. |
Work around issue jackpal#54.
I can work on this but it may take me some time.
The text was updated successfully, but these errors were encountered: