# SSL server hangs forever

**URL:** <https://forum.crystal-lang.org/t/ssl-server-hangs-forever/420>\
**Category:** Help & Support\
**Created:** [February 14, 2019, 3:34am UTC](https://forum.crystal-lang.org/t/ssl-server-hangs-forever/420 "2019-02-14T03:34:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rogerdpack](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/rogerdpack/32/117_2.png) [@rogerdpack](https://forum.crystal-lang.org/u/rogerdpack)\
**Post date:** [February 14, 2019, 3:34am UTC](https://forum.crystal-lang.org/t/ssl-server-hangs-forever/420/1 "2019-02-14T03:34:06Z")

</div>

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/libgcc\_s.so.1

#1 0xb740cab3 in ?? () from /lib/i386-linux-gnu/libgcc\_s.so.1

#2 0xb740e368 in \_Unwind\_Backtrace () from /lib/i386-linux-gnu/libgcc\_s.so.1

#3 0x081cfa59 in unwind () at /home/rdp/me/src/callstack.cr:99

#4 0x081cf9cf in initialize () at /home/rdp/me/src/callstack.cr:48

#5 0x081cf995 in new () at /home/rdp/me/src/callstack.cr:47

#6 0x08139a75 in raise () at /home/rdp/me/src/raise.cr:202

#7 0x084992aa in unbuffered\_close () at /home/rdp/me/src/openssl/ssl/socket.cr:142

#8 0x08498b7d in close () at /home/rdp/me/src/io/buffered.cr:203

#9 0x0844a77b in process () at /home/rdp/me/src/http/server/request\_processor.cr:66

#10 0x08448984 in process () at /home/rdp/me/src/http/server/request\_processor.cr:16

#11 0x08448841 in handle\_client () at /home/rdp/me/src/http/server.cr:281

#12 0x081c8cad in -\> () at /home/rdp/me/src/http/server.cr:244

#13 0x08211bca in run () at /home/rdp/me/src/fiber.cr:255

#14 0x081375ae in -\> () at /home/rdp/me/src/fiber.cr:29

#15 0x00000000 in ?? ()

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

> <https://gist.github.com/rdp/b3b63890f2d85e91999ac7a995b4443b>

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…

---

<div class="post-metadata">

**Author:** ![rogerdpack](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/rogerdpack/32/117_2.png) [@rogerdpack](https://forum.crystal-lang.org/u/rogerdpack)\
**Post date:** [February 16, 2019, 3:51pm UTC](https://forum.crystal-lang.org/t/ssl-server-hangs-forever/420/2 "2019-02-16T15:51:21Z")

</div>

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 [https://github.com/crystal-lang/crystal/issues/8108](https://github.com/crystal-lang/crystal/issues/8108) before I possibly get the chance to “run into” this issue anymore so hoping/assuming its fixed now :)
