[erlang-questions] SSL/TLS renegotiation crash triggered by setopts

Florian Waas flw@REDACTED
Wed Aug 7 08:15:37 CEST 2013

Reading from a Postgres server tls_connection's gen_fsm crashes on me
during TLS renegotiation with below error report (small snippet of
most relevant parts only due to size).

I'm setting the socket into {active, once} after each packet; the
server kicks off renegotiation every 512MB. Looks like the problem
occurs when setopts is called during renegotiation. When hammering the
system I hit it pretty much every time the server renegotiates --
happens in both R15 and R16.

Quick hack in tls_connection.erl:995 to allow the transition from
'connection' to 'hello' in handle_sync_event instead of insisting that
setopts doesn't change states gets me out of this pickle...

Anybody seen this problem? Clean(er) workarounds available?


=ERROR REPORT==== 6-Aug-2013::21:26:38 ===
** State machine <0.368.0> terminating
** Last message in was {'$gen_sync_all_state_event',
** When State == connection
**      Data  == {state,client,
** Reason for termination =
** {{case_clause,


More information about the erlang-questions mailing list