-
Notifications
You must be signed in to change notification settings - Fork 3k
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
peer:start_link/1
times out when the given node already exists
#8930
Comments
This is, indeed, a bug - it should immediately crash with this Reason (as tested [url=https://github.com/erlang/otp/blob/master/lib/stdlib/test/peer_SUITE.erl#L503]here[/url]):
Somehow it works for I'll take a look at it. |
That turned to be more complex than I anticipated. But later down the road the child exits (with code -1). There is no way for parent to know it, because the child had no chance to report it to parent (control connection over TCP could not be open, - the attempt is made after distribution startup). Ideas I thought of:
While at it, I found a few minor issues (incorrect documentation around |
I've always thought that it was a mistake to detach from the peer. Do you know of which type of usages would break if peer stays attached to the child node? |
It's been a while... I vaguely recall something about proxy processes (namely, I personally very much like |
hmm, yeah, proxy processes could be a problem. When testing the shell using tmux we start erlang using Maybe that is a good compromise? That is, for dist/tcp connection types, we stay attached to the port and forward all output to the
If you do |
IIRC with dist/tcp control channel output is already forwarded through dist/tcp. Standard output may be just discarded (to keep existing behaviour), and zero exit code discarded too. Now what I don't know is how many test suites depend on |
Describe the bug
When I try to start a peer node which already exists, the call times out, instead of immediately returning a clear error.
To Reproduce
Expected behavior
I would expect a clear error, similar to what
slave:start_link/2
returns.Affected versions
I guess all OTP versions since OTP 25. I tested it on OTP 27.1 and OTP 26.2.1.
The text was updated successfully, but these errors were encountered: