<br><br><div class="gmail_quote">2012/11/13 Patrik Nyblom <span dir="ltr"><<a href="mailto:pan@erlang.org" target="_blank">pan@erlang.org</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Sounds like a bug allright.<br></blockquote><div><br></div><div>Sounds like it yes ..</div><div><br></div><div>A couple of things. Ports needs to flush there io-queues before terminating. If there is something in the queue when closing, the driver callback for flush will be called.</div>
<div><br></div><div>If no such callback exists there might be trouble. In the case of tcp and inets there exists a tcp_inet_flush and this is callback is invoked if the queue is not empty.</div><div><br></div><div>So what drivers are used that doesn't have flush callbacks?</div>
<div><br></div><div>One exception to the flush mechanism should be exit(Port, kill). If the exit signal 'kill' is received by the port, it should die no matter what. (If I read the code correctly that is =)</div><div>
<br></div><div>// Björn-Egil</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Please send all relevant information, including platform, any special conditions (nif's, drivers whatnot) and any relevant logs etc to erlang_bugs or directly to me.<br>
<br>
Cheers,<br>
Patrik<div class="HOEnZb"><div class="h5"><br>
<br>
On 11/13/2012 12:35 PM, Tim Watson wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi guys - can anyone answer this (below) please?<br>
<br>
Begin forwarded message:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
From: Matthias Radestock <<a href="mailto:matthias@rabbitmq.com" target="_blank">matthias@rabbitmq.com</a>><br>
Subject: phantom ports in erlang:ports()<br>
Date: 12 November 2012 18:37:47 GMT<br>
To: <a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a><br>
<br>
I've got a customer system, running R15B02, which encountered system_limit errors when accepting tcp connections.<br>
<br>
'lsof' indicates that there are just a few hundred file descriptors in use. However, erlang:ports() returns 1010 entries. For the majority of these ports:<br>
- erlang:port_info(Port) returns 'undefined'<br>
- port_close(Port) fails with 'badarg'<br>
- exit(Port, die) doesn't make them go away<br>
<br>
These ports have been in that state for days.<br>
<br>
Does anybody have any clue what's going on here?<br>
<br>
Is there any way to find out more about these ports? Looks like ctrl-c'ing in the emulator shell would allow me to get more info with the 'o' option. Unfortunately the customer's emulator is running detached, so that won't work.<br>

<br>
Regards,<br>
<br>
Matthias.<br>
</blockquote>
______________________________<u></u>_________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/<u></u>listinfo/erlang-questions</a><br>
</blockquote>
<br>
______________________________<u></u>_________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/<u></u>listinfo/erlang-questions</a><br>
</div></div></blockquote></div><br>