Sending user space SCTP ABORT with gen_sctp

Hi,

It looks like this is related to another issue described here:

What happens is:

  1. there is one controlling (Erlang) process for the SCTP socket;
  2. the socket was gen_sctp:peeloff(-ed) from a listening one and “holds” one valid association;
  3. during a gen_sctp:send operation, the socket buffer is full (either the network or the remote end is congested) and the send gets an EAGAIN error;
  4. application logic does an exit in the controlling process;

I do not know exactly how are the system resources (like file descriptors, sockets aso) garbage collected at the Erlang process exit but it looks like due to the socket state (?):
a. either there is a proper SCTP SHUTDOWN performed on the respective association (close)
b. or there is an SCTP ABORT performed on the respective association (abort)

When I have some more spare time I will have a look at how:
a. resources are collected when an Erlang proces exits; since I am new to Erlang I could use some hints here.
b. why sometimes there is an association ABORT while other times there is an association SHUTDOWN.

Thanks a lot,
Cristian

1 Like