Author pirate
Recipients christian.heimes, ned.deily, pirate, ronaldoussoren
Date 2017-01-21.23:37:20
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I mistakenly thought this bug was a pyOpenSSL bug, so I reported it there (, but it looks like this is actually a bug in CPython.

See the link for a nicer formatted bug report with more details.

Code to reproduce:

Crash dump:

The bug is a segmentation fault when closing several secure websockets from inside concurrent python3.6 threads: 
'python3.6' terminated by signal SIGSEGV (Address boundary error)

It does not occur when doing it in a single thread, only when closing multiple threads at once.

threads = []
for _ in range(NUM_THREADS):
    t = SocketThread('wss://', ssl_opt={'cert_reqs': 0})


for t in threads:
    t.keep_running = False  # libssl segfaults on python3.6 when closing a wss:// connection with cert_reqs=0


This is my first python bug report, so apologies if I didn't get the formatting right or if I'm missing some info.
Date User Action Args
2017-01-21 23:37:20piratesetrecipients: + pirate, ronaldoussoren, christian.heimes, ned.deily
2017-01-21 23:37:20piratesetmessageid: <>
2017-01-21 23:37:20piratelinkissue29340 messages
2017-01-21 23:37:20piratecreate