-
Notifications
You must be signed in to change notification settings - Fork 52
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
Segfault on second getMessage()
call after EAGAIN error
#14
Comments
I need to understand when |
in process, the And then it gets raised by the |
But why you are trying to perform one more |
I don't. It gets called automatically by the handler on next data received by same DatagramTransport. |
I think I found the root cause of my A "normal" So I guess this can be closed, but perhaps some documentation could be added that this should not be done. |
The handler (with
getMessage()
) where this happens is: https://github.com/status-im/nim-eth-p2p/blob/master/eth_p2p/discovery.nim#L243I think segfault will occur because of following flow:
EAGAIN
in this case) occurs onrecvfrom
inreadDatagramLoop
andsetReadError
is ran.raise transp.getError()
is done ingetMessage
orpeekMessage
in the transportfunction
(see handler above).DatagramTransport
the segfault will occur atgetMessage
.Why
EAGAIN
happens, I don't know.So far, I can only reproduce this (not 100% of the time) by running: https://github.com/status-im/nim-eth-p2p/blob/master/tests/tshh_connect.nim
This was tested only on a Linux x86_64 machine.
The text was updated successfully, but these errors were encountered: