-
Notifications
You must be signed in to change notification settings - Fork 538
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
SEGV while using remote actor? #71
Comments
I guess I need some more informations about your use case. "Cannot access 0x2" looks like a dereferenced nullptr. However, in unicast_network.cpp line 78 is an io_stream_ptr accessed which cannot be nullptr, since cppa throws an exception in case of errors beforehand. I cannot reproduce a bug from the snippet above. Are you calling remote_actor from several threads/actors in parallel? Or is there anything else in your setup I that might affect the call to remote_actor? |
Seems to me that could only happen if |
On further investigation it is not an Electrif Fence falut, but I can't make much sense of it yet. |
Here is it from a different vantage point (Valgrind):
|
So far, I've instrumented your code:
and found that "buf" is first corrupted at "trace25":
|
Looks like a bug in
The app now crashes less often, in middleman.cpp:787. I'll try to change it to poll as well. |
Here is my attempt patching middleman to use poll:
In debug output I see poll returning POLLIN and POLLOUT events only. The client code which leads to that growths of opened sockets is, as I've already mentioned earlier:
If I change it to
then the number of sockets being polled doesn't grow (remains = 2). I THINK that the IMO, the libcppa fails to automatically close the remote_actor sockets where it should. P.S. In retrospect, I should have used |
Thanks a lot for your effort! I think I'll keep your changes (I'm going to review your patch next week). Using poll() is just fine for me, because epoll() isn't available on all platforms (e.g., MacOS). You're right about automatically disposal of unused remote actors. Right now, the middleman has a reference to the proxy on its own, since it needs to be able to deserialize it. However, this obviously keeps the reference count above zero, even if no other actor has a reference to the proxy any longer. I'll see how to fix that. Again, thanks a lot for pointing this out. Btw, sorry for the late answer, but I was ill the whole week. |
NP! |
Based on your patch, I have updated the middleman to use |
I have opened a new issue for the reference-counting problem: #75. I'll close this one, since it starts getting too big. |
I see this periodically:
scaleRpc is:
The text was updated successfully, but these errors were encountered: