-
-
Notifications
You must be signed in to change notification settings - Fork 232
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
pid weirdness with gproc_dist #141
Comments
2 Immediate observations:
|
No, it means the node was stopped and restarted. It is actually quite easy to generate identical looking pairs of pids:
I don't know how could |
2017-09-07 16:30 GMT+02:00 Dániel Szoboszlay <[email protected]>:
I don't know how could gproc (and you) miss the node's restart however.
Yeah. I can't guarantee that I didn't do something embarassingly stupid
while thinking of something else entirely. :)
A slight twist is of course that the visual representation doesn't give any
clue that the pids are different. Had they not been the unique part of ets
table keys, I probably wouldn't have noticed that something was amiss.
BR,
Ulf
|
I wrote a simple QuickCheck property, basically starting a bunch of nodes (with a placeholder process that make sure Could not provoke the behaviour Ulf observed. Ran for an hour so some 100k node starts were probably made. Then I added stopping nodes to the mix, and could (not too surprisingly) mimic the behaviour:
With the difference that I have two entries in the last element in the list... So it is not exactly the same. However, a node restart will lead to Pid reuse as observed already in Freiburg just a hair over ten years ago :-) (Time flies!!) |
Ah, very good! :) I will concede that I must have forgotten to stop both nodes before making a new attempt. I see an opportunity for some more tests here, and the likelihood that gproc isn't doing what it's supposed to. The locks_leader branch, OTOH, has support for split-brain healing. I'll have to check how it behaves in the same situation. |
I'll see if I get time to cleanup that model into a non-embarrasing state, if so I will share it and it can be extended to do something useful :-) |
Made a pull request (#144) For me the existing QuickCheck property failed horribly (made some changes in the pull request) but I guess that is expected? |
I came across this. I won't claim that it's a bug in Erlang - I assume there was a hickup in the networking on my Mac - but I must say that I can't even remember having seen this before.
(I believe Hans Svensson talked about something similar in Freiburg 2007).
Running some gproc tests with two local nodes. OTP 18, for no particular reason.
Node A:
Node B:
Node A:
Node B:
A bit interesting to try to reproduce, I guess.
The text was updated successfully, but these errors were encountered: