Did rpc:call change behaviour in OTP-23.x or 24.x?

Rickard Green rickard@REDACTED
Sat Oct 9 01:58:24 CEST 2021

On Fri, Oct 8, 2021 at 7:10 PM Roger Lipscombe <roger@REDACTED>

> Specifically, I invoke the below function with rpc:call from an escript...
> frob(Parent, Etc) ->
>     link(Parent)
>     % do something interesting
>     ok.
> (condensed example)
> My escript dies with the following:
> {"init terminating in
> do_boot",{#Ref<0.2297215750.597688321.118580>,return,ok}}
> init terminating in do_boot ({,return,ok})
> If I unlink from the pid before returning, it's all good. This has
> worked perfectly since (afaict) R16, but broke at some point between
> OTP-22.x and OTP-24.x (we skipped OTP-23.x)
> We're using OTP-24.0.6

Yes this was intentionally changed in OTP 23 due to a performance
optimization. The process executing the actual call now terminates with an
exit reason not equal to normal while it previously used to terminate with
a normal exit reason. The rpc module has however never given any guarantees
about what happens with the process executing the call after the call
returns. Leaving a link to the process after the call is erroneous.

Rickard Green, Erlang/OTP, Ericsson AB
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20211009/32d47294/attachment.htm>

More information about the erlang-questions mailing list