SSL server hangs forever

Ran into this today, running a crystal “ssl socket” style server. Basically it hangs using 100% cpu, creating an exception over and over again…

Crystal 0.26.1 [391785249] (2018-08-27)
LLVM: 4.0.0
Default target: i686-unknown-linux-gnu

by far the most common backtrace is

Thread 1 (Thread 0xb722e700 (LWP 13964)):

#0 0xb740fe6c in _Unwind_Find_FDE () from /lib/i386-linux-gnu/

#1 0xb740cab3 in ?? () from /lib/i386-linux-gnu/

#2 0xb740e368 in _Unwind_Backtrace () from /lib/i386-linux-gnu/

#3 0x081cfa59 in unwind () at /home/rdp/me/src/

#4 0x081cf9cf in initialize () at /home/rdp/me/src/

#5 0x081cf995 in new () at /home/rdp/me/src/

#6 0x08139a75 in raise () at /home/rdp/me/src/

#7 0x084992aa in unbuffered_close () at /home/rdp/me/src/openssl/ssl/

#8 0x08498b7d in close () at /home/rdp/me/src/io/

#9 0x0844a77b in process () at /home/rdp/me/src/http/server/

#10 0x08448984 in process () at /home/rdp/me/src/http/server/

#11 0x08448841 in handle_client () at /home/rdp/me/src/http/

#12 0x081c8cad in -> () at /home/rdp/me/src/http/

#13 0x08211bca in run () at /home/rdp/me/src/

#14 0x081375ae in -> () at /home/rdp/me/src/

#15 0x00000000 in ?? ()

here’s a full report from the poor man’s profiler:

Wish it were more reproducible than “once in 3 months” but reporting it here … :| Will also upgrade to newer version of crystal and see if that helps…

current work around: hard kill and restart web server when it dies…
I can’t even find a raise on line 142 of that git commit and much more often run into before I possibly get the chance to “run into” this issue anymore so hoping/assuming its fixed now :)