Uploaded image for project: 'Erlang/OTP'
  1. Erlang/OTP
  2. ERL-917

Termination or crash of a process that holds a DTLS listen socket does not close the socket properly

    Details

    • Type: Bug
    • Status: In Progress
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: OTP-21.3.4
    • Fix Version/s: None
    • Component/s: ssl
    • Labels:
      None

      Description

      Though I did not test this thoroughly, I observed the following behaviour:
      1. A process calls

      ssl:listen(Port, [{protocol, dtls}, ...])


      2. Crash or terminate the process
      3. Spawn the process again with same configuration, that is, listen on the same port
      4. The process fails to listen on the port with reason

      {shutdown,{error,closed}

      Using inet:i/0 before the 2nd step can find the socket. After the 2nd step inet:i/0 can still find it. Therefore I think the listen socket is not closed with the termination/crash of the process that opens it. This behaviour is not observed with TLS socket.

        Activity

        Hide
        ingela Ingela Anderton Andin added a comment -

        As DTLS is run over UDP there is no connection at the socket level and this has to be emulated, so it is not surprising that it could behave differently. Sounds like you hit a bug we will look into it.

        Show
        ingela Ingela Anderton Andin added a comment - As DTLS is run over UDP there is no connection at the socket level and this has to be emulated, so it is not surprising that it could behave differently. Sounds like you hit a bug we will look into it.
        Hide
        ingela Ingela Anderton Andin added a comment -

        I understand the problem now, but I have to think of a good solution. Just to note there is some progress.

        Show
        ingela Ingela Anderton Andin added a comment - I understand the problem now, but I have to think of a good solution. Just to note there is some progress.

          People

          • Assignee:
            otp_team_ps Team PS
            Reporter:
            xdeon Wilbur
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:

              Development