Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERL-1285: ssl:listen crashes with {inet_backend, socket} #4234

Closed
OTP-Maintainer opened this issue Jun 18, 2020 · 2 comments
Closed

ERL-1285: ssl:listen crashes with {inet_backend, socket} #4234

OTP-Maintainer opened this issue Jun 18, 2020 · 2 comments
Labels
not a bug Issue is determined as not a bug by OTP priority:medium team:PS Assigned to OTP team PS

Comments

@OTP-Maintainer
Copy link

Original reporter: juhlig
Affected version: OTP-23.0.2
Component: ssl
Migrated from: https://bugs.erlang.org/browse/ERL-1285


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:
{code:erlang}
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)
{code}
 
@OTP-Maintainer
Copy link
Author

ingela said:

It will not work for an TLS server. We expect it will work for an TLS client. There are some technical reasons for this. And there of course exists solutions. We will have a solution that we believe in before making the socket back_end supported and not only experimental. Maybe the release note should not have only excluded ssl, but explicitly stated it is not expected to work yet! So we do not consider it a bug at this time, as it is not implemented.

@OTP-Maintainer
Copy link
Author

juhlig said:

Ok, thank you for clarifying :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
not a bug Issue is determined as not a bug by OTP priority:medium team:PS Assigned to OTP team PS
Projects
None yet
Development

No branches or pull requests

1 participant