Comments (6)
Thanks for the report. Good to hear you're having luck with the client. Are you loading 10k+ torrents into a single Client? Could you estimate how many simultaneous UTP connections you have?
At a quick glance, I think this panic would occur if you received a SYN packet, that would result in a connection with a receive ID that matches the connection the initiator is trying to establish, but was initiated locally, and accepted locally. If you put log.Println(c.send_id, syn.conn_id)
before the panic, you should find that send_id is 2 higher than conn_id if my theory is correct. It's probable that you're initiating an awful lot of connections between 2 clients to trigger this condition. Let me know the results of this, if it's not too much hassle to try and trigger it. I'll go into more detail if the data fits my prediction.
The other message you refer to is related, assuming the aforementioned theory. A fix for this will kill both birds.
from utp.
Currently the largest test I have loads up to 25k torrents into a single client (should I launch more than 1 client to handle this load?). The number I am at when I get the panic is anywhere from 14-25K. As for simultaneous UTP connections, I am unsure. Is there a way I could estimate that, or see the current number of connections?
My test network setup is a docker network over weave, and I control the torrent tracker and all nodes, so everything is internal with no external nodes. I create the torrents internally too. I usually run 3-4 nodes with 1 having all the torrents initially. If that helps with any estimates, but I am unsure how I would be able to make that guess.
To your statement on launching a lot of connections between 2 clients, that is true. I have 25,000 torrents, and only 4 nodes, and most of the time only 1 node has the given torrent.
I'll put in the log statement and report back when I reproduce and get the log printout.
from utp.
As you suspected:
log.Println(c.send_id, syn.conn_id)
Produces:
43150 43148
43150 43148
panic: :|
panic: sync: Unlock of unlocked RWMutex
goroutine 28 [running]:
panic(0xbdc980, 0xc44a519eb0)
/usr/local/go/src/runtime/panic.go:500 +0x1a1
sync.(*RWMutex).Unlock(0xc42020ef30)
/usr/local/go/src/sync/rwmutex.go:118 +0xef
github.com/FactomProject/factomd-torrent/vendor/github.com/anacrolix/sync.(*RWMutex).Unlock(0xc42020ee00)
/home/steven/go/src/github.com/FactomProject/factomd-torrent/vendor/github.com/anacrolix/sync/rwmutex.go:26 +0x59
panic(0xbdc980, 0xc44a519ea0)
/usr/local/go/src/runtime/panic.go:458 +0x243
github.com/FactomProject/factomd-torrent/vendor/github.com/anacrolix/utp.(*Socket).ackSyn(0xc42019a540, 0xa88c0001, 0xc4a4767200, 0x10, 0x0, 0x0)
/home/steven/go/src/github.com/FactomProject/factomd-torrent/vendor/github.com/anacrolix/utp/socket.go:485 +0x38f
github.com/FactomProject/factomd-torrent/vendor/github.com/anacrolix/utp.(*Socket).Accept(0xc42019a540, 0x0, 0x0, 0x0, 0x0)
/home/steven/go/src/github.com/FactomProject/factomd-torrent/vendor/github.com/anacrolix/utp/socket.go:507 +0xd8
github.com/FactomProject/factomd-torrent/vendor/github.com/Anacrolix/torrent.(*Client).acceptConnections(0xc42020ee00, 0x13e4e40, 0xc42019a540, 0x13e5401)
/home/steven/go/src/github.com/FactomProject/factomd-torrent/vendor/github.com/Anacrolix/torrent/client.go:383 +0xb8
created by github.com/FactomProject/factomd-torrent/vendor/github.com/Anacrolix/torrent.NewClient
/home/steven/go/src/github.com/FactomProject/factomd-torrent/vendor/github.com/Anacrolix/torrent/client.go:290 +0x67d
from utp.
Thanks for the feedback. I'll write a unit test and a fix when I get time. In the meanwhile, you can just comment out that panic on your servers, it will behave correctly.
from utp.
Thanks!
from utp.
Oops, I think this was fixed in 78c7e0d.
from utp.
Related Issues (19)
- Needs a license HOT 1
- Setting deadlines on a connection panics HOT 1
- Conn `Addr` methods return udp HOT 3
- Starts stalling under load HOT 43
- Setting deadlines on sockets does not work
- panic: listen udp :50007: bind: address already in use HOT 22
- spec question
- net.Listener interface HOT 6
- Lots of duplicate packets are being send HOT 16
- Socket does not implement utpSocket (missing DialContext) HOT 2
- Deprecated
- Does utp implements congestion control ? HOT 1
- throughput is 5 MB/s on loopback HOT 13
- listener sockets closed when accepted connections close HOT 3
- Ability to pass in a net.UDPConn HOT 6
- panic in jitter HOT 4
- Dial leaks file descriptors HOT 5
- memory usage a bit high HOT 11
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from utp.