My multi-threaded application running on asyncio and the tornado framework causes a segmentation fault randomly (can take 20 minutes or 4 days.) Some kind of condition seems to cause the unpack_response function from message.py to cause a segmentation fault. The trace of all threads upon crash are doing nothing interesting (mostly waiting) but one thread upon all recorded crashes consistently reads:
Current thread 0x00007f62cb7fe700 (most recent call first): File "/home/dalofeco/.local/lib/python3.6/site-packages/pymongo/message.py", line 1465 in unpack_response File "/home/dalofeco/.local/lib/python3.6/site-packages/pymongo/cursor.py", line 1067 in _unpack_response File "/home/dalofeco/.local/lib/python3.6/site-packages/pymongo/cursor.py", line 978 in __send_message File "/home/dalofeco/.local/lib/python3.6/site-packages/pymongo/cursor.py", line 1104 in _refresh File "/home/dalofeco/.local/lib/python3.6/site-packages/pymongo/cursor.py", line 1189 in next File "/home/dalofeco/.local/lib/python3.6/site-packages/pymongo/collection.py", line 1262 in find_one File "/usr/lib/python3.6/concurrent/futures/thread.py", line 56 in run File "/usr/lib/python3.6/concurrent/futures/thread.py", line 69 in _worker File "/usr/lib/python3.6/threading.py", line 864 in run File "/usr/lib/python3.6/threading.py", line 916 in _bootstrap_inner File "/usr/lib/python3.6/threading.py", line 884 in _bootstrap
This was collected with python's faulthandler. Note that this issue only arose after switching to the asynchronous Motor library, which seemed only natural with a Tornado-based asynchronous application.
- is related to
-
PYTHON-2621 Segmentation fault caused by Pymongo in Python 3.7
- Closed