[erlang-questions] The port "tty_sl -c -e"is out of control

叶少波 ye02@REDACTED
Wed Mar 8 10:55:38 CET 2017

Hi erlang expets,

I met a problem about the erlang port "tty_sl -c- e".

The scenario is like this:
1) I start two erlang nodes (Lets say one is Node1, another one is Node2) by run_erl, they are connected together.
    I can login to these two nodes by to_erl and do anythings on the erlang shell. It run very well.

2) But today I tried to use to_erl to login to the Node1, I can`t type anything on the shell, it seems the shell is hanging;
   Then I login to the Node2 and run rpc:call(node1, shell, start, []) to start a new shell on Node1, and I check the port 
   info of the port "tty_sl -c -e", it shows below:
(node1@REDACTED)7> Port.
(node1@REDACTED)8> erlang:port_info(Port).
[{name,"tty_sl -c -e"},     

you can see here, the "links" is empty and the connected process does`t exist.
(node1@REDACTED)3> erlang:process_info(pid(0, 1502, 0)).

3) I tried to close the port by erlang:port_close(Port), the result is as below:
(titan1_ps3@REDACTED)4> erlang:port_close(Port).
** exception error: bad argument
     in function  port_close/1
        called as port_close(#Port<0.4832>)

It seems the port already died.
As I know, the port will be closed if the linked process dies. But here we can see the port does`t exit. 
Do you know what is the reason? Or how can I kill the port?

Actually  I met this problem several times before, I had to reboot the node the fix.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20170308/6147b906/attachment.htm>

More information about the erlang-questions mailing list