This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Crash when running SQLAlchemy with pyodbc
Type: crash Stage: resolved
Components: Versions: Python 3.7
process
Status: closed Resolution: third party
Dependencies: Superseder:
Assigned To: Nosy List: Dave Johansen, brett.cannon
Priority: normal Keywords:

Created on 2019-11-01 17:56 by Dave Johansen, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Messages (4)
msg355830 - (view) Author: Dave Johansen (Dave Johansen) Date: 2019-11-01 17:56
We're using SQLAlchemy 1.3.10 with pyodbc 4.0.27 in the python:3.7.5-alpine docker image to connect to a MySQL 13.0.5026.0 database and it's crashing with the following error:
python: malloc.c:2406: sysmalloc: Assertion `(old_top == initial_top (av) && old_size == 0) || ((unsigned long) (old_size) >= MINSIZE && prev_inuse (old_top) && ((unsigned long) old_end & (pagesize - 1)) == 0)' failed.
msg355970 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2019-11-04 18:37
Can you trace this to actually being Python's fault? Unfortunately you're using two extension modules who both could be at fault with this.
msg355972 - (view) Author: Dave Johansen (Dave Johansen) Date: 2019-11-04 18:44
I can't. I just know that I'm running this process and this crash happens. Any recommendations on how to diagnose that?
msg355973 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2019-11-04 18:47
Basically you have to figure out where that bad memory came from and that's just plain hard in C short of slowly cutting out code until you get a small reproducer. Typically these sorts of issues are almost always in the extension modules, but your case is tricky as even if that's true you don't know which one is the cause.
History
Date User Action Args
2022-04-11 14:59:22adminsetgithub: 82846
2022-01-24 10:51:39iritkatrielsetstatus: open -> closed
resolution: third party
stage: resolved
2019-11-04 18:47:32brett.cannonsetmessages: + msg355973
2019-11-04 18:44:04Dave Johansensetmessages: + msg355972
2019-11-04 18:37:56brett.cannonsetnosy: + brett.cannon
messages: + msg355970
2019-11-01 17:56:46Dave Johansencreate