prim_inet:send/3 hangs with nonexisting port

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

prim_inet:send/3 hangs with nonexisting port

Salikhov Dinislam
Hello.

I have ejabberd based application.
I've paid attention that some of the processes have messages in their
message queue and their reductions number doesn't change.

After some investigation I've figured out that all such processes waits
in prim_inet:send/3 with a port passed there (each process with a
separate port).
But when I've tried to find the port in erlang:ports(), there is no such
port in it.
Is it a bug I stumbled upon or such situation may be possible under
normal operation?

P.S. I use OTP-18.3

Thanks in advance.
Salikhov Dinislam
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: prim_inet:send/3 hangs with nonexisting port

Sverker Eriksson-4
This release note from erts-7.3.1 (OTP-18.3.1)
seems to fit your symptom:

A process communicating with a port via one of the erlang:port_* BIFs could
potentially end up in an inconsistent state if the port terminated during the
communication. When this occurred the process could later block in a receive
even though it had messages matching in its message queue.

This bug was introduced in erts version 5.10 (OTP R16A).


/Sverker


On 09/14/2017 04:55 PM, Salikhov Dinislam wrote:

> Hello.
>
> I have ejabberd based application.
> I've paid attention that some of the processes have messages in their
> message queue and their reductions number doesn't change.
>
> After some investigation I've figured out that all such processes
> waits in prim_inet:send/3 with a port passed there (each process with
> a separate port).
> But when I've tried to find the port in erlang:ports(), there is no
> such port in it.
> Is it a bug I stumbled upon or such situation may be possible under
> normal operation?
>
> P.S. I use OTP-18.3
>
> Thanks in advance.
> Salikhov Dinislam
> _______________________________________________
> erlang-questions mailing list
> [hidden email]
> http://erlang.org/mailman/listinfo/erlang-questions
>

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions