-
Notifications
You must be signed in to change notification settings - Fork 21
Server crashes during benchmarking. #1
Comments
From your benchmark, I guess you expect an echo server. This, however is a multi-echo server i.e. if you write something on one connection it gets echoed to every existing connection. Crashing is not nice, I guess mob should handle reset connections better, but your benchmark is not suited for this server, I think, unless I missed something :-) |
@dpc thanks for the feedback. This is basically a use after free error. The read connection gets reset, removed from the slab and then another event for that token is sent from mio. I am removing the I have not been able to track it down, though I had to take a break from digging into it. I am working on it now though. |
@tryge: Oh, I see. Thanks for pointing that out. @hjr3: It might be one of: |
It is most certainly tokio-rs/mio#219 . Thank you for the tip. |
A single event loop tick may contain multiple events for a token. If the connection is reset on the first event, subsequent events will still try to access that token/connection during the event loop tick. The strategy now is to mark a connection as reset and remove them only when the event loop tick is finished. See tokio-rs/mio#219 for more details. Fixes #1
I thought this was fixed, but it seems like I am still receiving events after I reset a connection.
|
This is fixed. It was an underlying bug in the way mio worked with kqueue. |
Hi,
I wanted to use your server as benchmark point for
mioco
. Unfortunately it does not survive the benchmark.The benchmark itself is: https://github.com/dpc/benchmark-echo , and as it works fine against
mioco
,libev
, andnode
tcp server implementation, I guess it's OK. I start it with./benchmark.sh 8000
The text was updated successfully, but these errors were encountered: