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

ssl:listen crashes with {inet_backend, socket}

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Not a Bug
    • Affects Version/s: 23.0.2
    • Fix Version/s: None
    • Component/s: ssl
    • Labels:
      None

      Description

      I don't know if the socket backend is supposed to work with ssl just yet, as the release notes only mention gen_tcp and inet. Anyway, if the option {inet_backend, socket} is given to ssl:listen, this is what happens:

      1> ssl:listen(0, [{inet_backend, socket}]).
      =CRASH REPORT==== 18-Jun-2020::14:49:47.474804 ===
        crasher:
          initial call: tls_socket:init/1
          pid: <0.110.0>
          registered_name: []
          exception error: bad argument
            in function  link/1
               called as link({'$inet',gen_tcp_socket,
                                  {<0.109.0>,
                                   {'$socket',
                                       #Ref<0.2800284101.4178182147.206209>}}})
            in call from tls_socket:init/1 (tls_socket.erl, line 294)
            in call from gen_server:init_it/2 (gen_server.erl, line 417)
            in call from gen_server:init_it/6 (gen_server.erl, line 385)
          ancestors: [ssl_listen_tracker_sup,tls_server_sup,tls_sup,
                        ssl_connection_sup,ssl_sup,<0.87.0>]
          message_queue_len: 0
          messages: []
          links: [<0.100.0>]
          dictionary: []
          trap_exit: true
          status: running
          heap_size: 610
          stack_size: 28
          reductions: 199
        neighbours:** exception error: no match of right hand side value {error,{badarg,[{erlang,link,
                                                                                    [{'$inet',gen_tcp_socket,
                                                                                              {<0.109.0>,
                                                                                               {'$socket',#Ref<0.2800284101.4178182147.206209>}}}],
                                                                                    []},
                                                                            {tls_socket,init,1,[{file,"tls_socket.erl"},{line,294}]},
                                                                            {gen_server,init_it,2,[{file,"gen_server.erl"},{line,417}]},
                                                                            {gen_server,init_it,6,[{file,"gen_server.erl"},{line,385}]},
                                                                            {proc_lib,init_p_do_apply,3,
                                                                                      [{file,"proc_lib.erl"},{line,226}]}]}}
           in function  tls_socket:listen/3 (tls_socket.erl, line 80)
           in call from ssl:listen/2 (ssl.erl, line 619)
      

       

        Attachments

          Activity

            People

            Assignee:
            otp_team_ps Team PS
            Reporter:
            juhlig Jan Uhlig
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: