WebSocket-for-Python
WebSocket-for-Python copied to clipboard
There seems to be some kind of segfault bug in the SSL library?
The most recent call is in SSL's write, so it's probably a library bug, but it looks like it happened after an error in once, which means we might be able to implement a workaround.
I'm not ruling out this being the fault of my application code, but the location of the the error makes me think that's not it.
Current thread 0x00007f03d1c41f00 (most recent call first):
File "/usr/lib/python3.5/ssl.py", line 586 in write
File "/usr/lib/python3.5/ssl.py", line 861 in send
File "/usr/lib/python3.5/ssl.py", line 891 in sendall
File "/home/danny/Projects/KaithemAutomation/kaithem/src/thirdparty/ws4py/websocket.py", line
269 in _write
File "/home/danny/Projects/KaithemAutomation/kaithem/src/thirdparty/ws4py/websocket.py", line
287 in send
File "/home/danny/Projects/KaithemAutomation/kaithem/src/widgets.py", line 76 in f
File "/home/danny/Projects/KaithemAutomation/kaithem/src/widgets.py", line 266 in send
File "Event_l___init__", line 117 in pushTracks
File "Event_l___init__", line 9 in _event_action
File "/home/danny/Projects/KaithemAutomation/kaithem/src/newevt.py", line 557 in _do_action
File "/home/danny/Projects/KaithemAutomation/kaithem/src/newevt.py", line 422 in _on_trigger
File "/home/dannyERROR:2017Jun26 21:35:27 PDT ws4py Failed to receive data
Traceback (most recent call last): File "/home/danny/Projects/Kait
hemAutomation/kaithem/src/thirdparty/ws4py/websocket.py", line 331,
in once x = self.sock.recv(4096) File
"/usr/lib/python3.5/ssl.py", line 914, in recv return
self.read(buflen) File "/usr/lib/python3.5/ssl.py", line 791, in
read return self._sslobj.read(len, buffer) File
"/usr/lib/python3.5/ssl.py", line 577, in read v =
self._sslobj.read(len) ssl.SSLError: [SSL: SSLV3_ALERT_BAD_RECORD_MAC] sslv3 alert bad record mac (_ssl.c:1977)/Pro
jects/KaithemAutomation/kaithem/src/newevt.py", line 940 in _check
File "/home/danny/Projects/KaithemAutomation/kaithem/src/newevt.py", line 514 in check
File "/home/danny/Projects/KaithemAutomation/kaithem/src/newevt.py", line 858 in f
File "/usr/lib/python3.5/threading.py", line 862 in run
File "kaithem/kaithem.py", line 159 in run_with_except_hook
File "/usr/lib/python3.5/threading.py", line 914 in _bootstrap_inner
File "/usr/lib/python3.5/threading.py", line 882 in _bootstrap
Update: looks like it doesn't always follow an error in once().
My current best guess is that maybe write uses a lot of stack space? I had a pretty small stack size set because of an unrelated bug, but making it even smaller doesn't seem to cause it.
Possibly there's some specific condition that makes write use lots of stack? Or is this a "real" segfault?
Current thread 0x00007f83a80e8f00 (most recent call first):
File "/usr/lib/python3.5/ssl.py", line 586 in write
File "/usr/lib/python3.5/ssl.py", line 861 in send
File "/usr/lib/python3.5/ssl.py", line 891 in sendall
File "/home/danny/Projects/KaithemAutomation/kaithem/src/thirdparty/ws4py/websocket.py", line
269 in _write
File "/home/danny/Projects/KaithemAutomation/kaithem/src/thirdparty/ws4py/websocket.py", line
287 in send
File "/home/danny/Projects/KaithemAutomation/kaithem/src/widgets.py", line 76 in f
File "/home/danny/Projects/KaithemAutomation/kaithem/src/widgets.py", line 266 in send
File "Event_l___init__", line 117 in pushTracks
File "Event_l___init__", line 9 in _event_action
File "/home/danny/Projects/KaithemAutomation/kaithem/src/newevt.py", line 557 in _do_action
File "/home/danny/Projects/KaithemAutomation/kaithem/src/newevt.py", line 422 in _on_trigger
File "/home/danny/Projects/KaithemAutomation/kaithem/src/newevt.py", line 940 in _check
File "/home/danny/Projects/KaithemAutomation/kaithem/src/newevt.py", line 514 in check
File "/home/danny/Projects/KaithemAutomation/kaithem/src/newevt.py", line 858 in f
File "/usr/lib/python3.5/threading.py", line 862 in run
File "kaithem/kaithem.py", line 159 in run_with_except_hook
File "/usr/lib/python3.5/threading.py", line 914 in _bootstrap_inner
File "/usr/lib/python3.5/threading.py", line 882 in _bootstrap