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

Bad return value from handle_info/2 callback in dtls_demux_packet.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 22.0
    • Fix Version/s: 22.0.3
    • Component/s: ssl
    • Labels:

      Description

      After switching from OTP-21.3 to OTP-22 some unit tests around my DTLS server started to fail.
      Brief analysis and tracing of the issue exposed simple error introduced in: https://github.com/erlang/otp/commit/73978663a26110121c7a7e4dc53e2481980b6b83

      Line 158, handle_info/2 has bad return value of type

      ok | {error, posix()}

      instead of valid callback return value. It lead to crashes:

      2019-06-03 07:17:41.030 [error] pid=<0.371.0> module=gen_server function=error_info/7 line=889  GenServer #PID<0.371.0> terminating                                              
      ** (stop) bad return value: :ok                                     
      Last message: {:udp_passive, #Port<0.9>}              
      State: {:state, 100, 49666, #Port<0.9>, {:gen_udp, :udp, :udp_closed, :udp_error, :udp_passive}, {:ssl_options, :dtls, [{254, 253}], :verify_peer, :undefined, #Function<9.60207287/1 in :ssl.handle_verify_options/
      2019-06-03 07:17:41.031 [error] pid=<0.537.0> module=gen_server function=error_info/7 line=889  GenServer #PID<0.537.0> terminating
      ** (stop) exited in: :gen_server.call(#PID<0.371.0>, {:accept, #PID<0.537.0>}, :infinity)
          ** (EXIT) bad return value: :ok                                  
          (stdlib) gen_server.erl:223: :gen_server.call/3        
          (ssl) dtls_packet_demux.erl:292: :dtls_packet_demux.call/2           
          (ssl) dtls_socket.erl:51: :dtls_socket.accept/3
      

        Attachments

          Activity

            People

            Assignee:
            otp_team_ps Team PS
            Reporter:
            sircinek Marcin Sikora
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: