pyodbc segmentation fault Linux

zr123 1 Reputation point

Doing pyodbc.connect I'm getting a segmentation fault on an old Linux server, but ok on new Linux server and Windows.
Unfortunately, I don't have access to a machine with the issue, which also has debug libraries.

I do see the top of the stack is the msodbc library.

Comparing the good and back Linux tracings:
ms odbc tracing of the SQLDriverConnectW.c call:
UNICODE Using encoding ASCII 'UTF-8' and UNICODE 'UCS-2LE'

UNICODE Using encoding ASCII 'UTF-8' and UNICODE 'UTF16LE'

I'm not sure if that's the issue - or how to change that. I've tried encoding and charset on the pyodbc.connect call, to no avail.

If I downgrade the new machine (Rocky 8) to the same MS ODBC version as the old (RHEL 6) machine, the good machine is still good.

I can't downgrade ODBC with an official package.

The stack trace doesn't include unixODBC, so I don't think that's even involved in the issue.

good machine has unixODBC-2.3.7-1.el8.x86_64
bad machine unixODBC-2.3.1-4.el6.x86_64


Azure SQL Database
{count} votes

1 answer

Sort by: Most helpful
  1. zr123 1 Reputation point

    Thanks. Unfortuantely, that didn't work. I've opened a ticket with MS.