<div dir="ltr">Fred,<div><br></div><div>The original report for the socket related message problem actually spawned two fixes. The reproducer for that bug did not use gen_server, but my original problem did occur within one.</div><div>One fix was the compiler issue in ERL-1076 that you mentioned in your first email. The other was OTP-16241 [1] and [2]. This second problem feels a bit like your issue.</div><div><br></div><div>Regards,</div><div>Andreas</div><div><br></div><div>[1]: <a href="http://erlang.org/pipermail/erlang-questions/2019-October/098660.html">http://erlang.org/pipermail/erlang-questions/2019-October/098660.html</a></div><div>[2]: <a href="https://github.com/erlang/otp/commit/b1e7e16032b719cb62280b7f6095fce51aa8b7b2">https://github.com/erlang/otp/commit/b1e7e16032b719cb62280b7f6095fce51aa8b7b2</a></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Am Fr., 24. Juli 2020 um 00:59 Uhr schrieb Michael Truog <<a href="mailto:mjtruog@gmail.com">mjtruog@gmail.com</a>>:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div bgcolor="#FFFFFF">
<div>On 7/23/20 1:52 PM, Fred Hebert wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div>The release notes for ERTS-10.7.1 mention:</div>
<div><br>
</div>
<div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> Fixed a bug in a receive
optimization. This could cause a <span>receive</span> not
to match even though a matching message was present in the
message queue. This bug was introduced in ERTS version 10.6
(OTP 22.2).<br>
Own Id: OTP-16572 Aux Id: ERL-1199, OTP-16269 </blockquote>
</div>
<div><br>
</div>
<div>We were on ERTS-10.6.2 (OTP-22.1.??). Today we reproduced
it again and I knew just what to look for so:</div>
<div>
<pre style="box-sizing:inherit;margin:4px 0px;padding:8px;font-size:12px;line-height:1.50001;font-variant-ligatures:none;white-space:pre-wrap;word-break:normal;font-family:Monaco,Menlo,Consolas,"Courier New",monospace;border-radius:4px;color:rgb(29,28,29);font-style:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:left;text-indent:0px;text-transform:none;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial">(rabbit@rabbitmq-1-0)16> lists:filter(fun({_Pid, _Ref, {sync_notify, _}}) -> false; (_) -> true end,
(rabbit@rabbitmq-1-0)16> element(2,recon:info(rabbit_log_connection_lager_event, messages))).
[{#Ref<0.229770800.3298820110.79067>,ok}]</pre>
</div>
<div>And where we have it. Out of 85,000 messages or so in that
worker, only one of them wasn't a blocked <span style="font-family:monospace">sync_notify</span>, and it was
a message of the form <span style="font-family:monospace">{Ref,
ok}</span> which entirely matches the compiler bug. I can't
say for sure it's the right response, but assuming things are
synchronous there's no reason we'd have another one either.
We're upgrading to Erlang/OTP-22.3.1 or newer (which contains
ERTS-10.7.1). I'm very surprised that the compiler bug had an
effect on <span style="font-family:monospace">gen:call()</span>
rather than just the branching pattern in <span style="font-family:monospace">socket<span style="font-family:arial,sans-serif"> (but somewhat
relieved because it would otherwise imply another bug)</span></span>.
Out of caution, we'll have engineers try to reproduce it once
more to see if that fixes it.<br>
</div>
</div>
</blockquote>
The erts-10.6.2 release was included in Erlang/OTP 22.2.2 [1], so it
must be that release or a custom release based on it. The
erts-10.7.1 release with Erlang/OTP 22.3.1 [2] does have an
important fix (OTP-16572 is the Ericsson identifier and ERL-1199 is
the <a href="http://bugs.erlang.org" target="_blank">bugs.erlang.org</a> identifier) since that should impact all the OTP
behaviors that create synchronous messages (due to taking advantage
of the {Ref, _} optimization). Good to know, to make sure
development is using a version >= 22.3.1.<br>
<br>
[1]
<a href="https://erlang.org/pipermail/erlang-questions/2020-January/098996.html" target="_blank">https://erlang.org/pipermail/erlang-questions/2020-January/098996.html</a><br>
[2]
<a href="http://erlang.org/pipermail/erlang-questions/2020-April/099386.html" target="_blank">http://erlang.org/pipermail/erlang-questions/2020-April/099386.html</a><br>
</div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><p><span style="font-family:verdana,geneva,sans-serif;font-size:10pt">Andreas Schultz</span></p>
<p><span style="font-family:verdana,geneva,sans-serif;font-size:10pt">-- </span></p>
<p><span style="font-family:verdana,geneva,sans-serif;font-size:8pt">Principal Engineer</span></p>
<p><span style="font-family:verdana,geneva,sans-serif;font-size:10.6667px"> t: +49 391 819099-224 </span></p>
<p><span style="font-family:verdana,geneva,sans-serif;font-size:8pt"><span style="font-family:verdana,geneva,sans-serif;font-size:10.6667px"></span></span></p>
<p><span style="font-family:verdana,geneva,sans-serif;font-size:8pt">------------------------------- enabling your networks -----------------------------</span></p>
<table style="height:142px;width:550px">
<tbody>
<tr style="height:30px">
<td style="width:146px;height:30px">
<p><span style="font-family:verdana,geneva,sans-serif;color:rgb(34,34,34);font-size:8pt">Travelping GmbH <br></span><span style="font-family:verdana,geneva,sans-serif;color:rgb(34,34,34);font-size:8pt">Roentgenstraße 13<br></span><span style="font-family:verdana,geneva,sans-serif;color:rgb(34,34,34);font-size:8pt">39108 Magdeburg<br></span><span style="font-family:verdana,geneva,sans-serif;color:rgb(34,34,34);font-size:8pt">Germany<br><br></span></p>
</td>
<td style="width:162px;height:30px">
<p style="color:rgb(34,34,34);font-family:Roboto,RobotoDraft,Helvetica,Arial,sans-serif;font-size:small;text-align:justify"><span style="font-family:verdana,geneva,sans-serif;font-size:8pt">t: +49 391 819099-0<br></span><span style="font-family:verdana,geneva,sans-serif;font-size:8pt">f: +49 391 819099-299</span></p>
<p style="color:rgb(34,34,34);font-family:Roboto,RobotoDraft,Helvetica,Arial,sans-serif;font-size:small;text-align:justify"><span style="font-family:verdana,geneva,sans-serif;font-size:8pt">e: <a href="mailto:info@travelping.com" target="_blank">info@travelping.com</a><br></span><span style="font-family:verdana,geneva,sans-serif;font-size:8pt">w: <a href="https://www.travelping.com/" target="_blank">https://www.travelping.com/</a></span></p>
</td>
</tr>
<tr style="height:17px">
<td style="width:146px;height:17px"><span style="font-size:8pt;font-family:verdana,geneva,sans-serif">Company registration: Amtsgericht Stendal <br>Managing Director: Holger Winkelmann<br></span></td>
<td style="width:162px;height:17px"><span style="font-size:8pt;font-family:verdana,geneva,sans-serif">Reg. No.: HRB 10578<br>VAT ID: DE236673780</span></td>
</tr>
</tbody>
</table></div>