erlang/otp

{case_clause,[]} in ssl_gen_statem:iovec_from_front/4

AnufrievDE opened this issue · 18 comments

Hello, I've an application that perform http get requests with hackney use. And after uplifting to OTP-25.3.2.3 (erts-13.2.2.2), the following error, which seems not preventing the main application workflow, started to appear from time to time in the logs:

2023-07-17T14:42:18.500210+00:00 error: type: {{{case_clause,[]},[{ssl_gen_statem,iovec_from_front,4,[{file,"ssl_gen_statem.erl"},{line,1647}]},{ssl_gen_statem,read_application_data_bin,8,[{file,"ssl_gen_statem.erl"},{line,1483}]},{tls_gen_connection,handle_protocol_record,3,[{file,"tls_gen_connection.erl"},{line,414}]},{gen_statem,loop_state_callback,11,[{file,"gen_statem.erl"},{line,1426}]},{tls_connection,init,1,[{file,"tls_connection.erl"},{line,160}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,240}]}]},{gen_statem,call,[<0.5596.5>,{recv,-1,5000},infinity]}}

Describe the bug
I am not sure this is a bug, because this missing case clause, seems expected, according to the code. But as I understood, this crash is happend at establishing tls_connection, after receiving some (handshake related?) data from the resource. Maybe this data is bad? Would you suggest why this crash happen?

To Reproduce
I have no exact scenario to reproduce, unfortunately. Just doing get https requests for specific resource, for example.

Expected behavior
No crashes expected. I don't see any crashes at the same circumstates on otp 25.0.4 (erts-13.1.2).

Affected versions
OTP 25.3.2.3 (erts-13.2.2.2)

u3s commented

thanks for report.

  • would it be possible to verify some versions in between 25.0.4-25.3.2.3 ? Ideally to reduce the version step to 1 ...
  • does it appear with any https resource? or just one specific server/resource ?

Checked on 25.0.4 again and also on a few versions between 25.0.4-25.3.2.3. Issue is reproduced.

But after changing the https resource for requests the issue is gone. Seems resource related.