Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Process finished with exit code -1073741819 (0xC0000005) #332

Open
tzipperle opened this issue Dec 22, 2021 · 5 comments
Open

Process finished with exit code -1073741819 (0xC0000005) #332

tzipperle opened this issue Dec 22, 2021 · 5 comments

Comments

@tzipperle
Copy link

tzipperle commented Dec 22, 2021

Hi,

I have installed turbodbc with conda-forge in and following environment:

name: turobdc
channels:
  - conda-forge
dependencies:
  - python=3.10
  - pandas
  - pyarrow
  - turbodbc
  - pyodbc

Python test code:

con_options = turbodbc.make_options(
     prefer_unicode=True,
     limit_varchar_results_to_max=True
 )

 connection = turbodbc.connect(
     connection_string='string',
     turbodbc_options=con_options
 )

cursor = conn.cursor()
cursor.execute('SELECT ...')

df = cursor.fetchallarrow().to_pandas() # here crash python

When I excute the cursor.fetchallarrow() my python process crash with Process finished with exit code -1073741819 (0xC0000005). This error occurs with all fetch functions.

I have tested the odbc with pyodbc and this package works fine.

Have you any idea whats going wrong?

Thomas

@xhochy
Copy link
Collaborator

xhochy commented Dec 26, 2021

Which operating system are you using? Can you please provide the output of conda list?

@tzipperle
Copy link
Author

I use win-64 as operating system. Here ist the output of conda list:

# Name                    Version                   Build  Channel       
abseil-cpp                20210324.2           h0e60522_0    conda-forge 
altair                    4.2.0              pyhd8ed1ab_1    conda-forge 
anyio                     3.4.0            py39hcbf5309_0    conda-forge 
argon2-cffi               21.1.0           py39hb82d6ee_2    conda-forge
arrow-cpp                 6.0.1           py39h591eb41_5_cpu    conda-forge
async_generator           1.10                       py_0    conda-forge
atomicwrites              1.4.0              pyh9f0ad1d_0    conda-forge
attrs                     21.2.0             pyhd8ed1ab_0    conda-forge
aws-c-cal                 0.5.11               he19cf47_0    conda-forge
aws-c-common              0.6.2                h8ffe710_0    conda-forge
aws-c-event-stream        0.2.7               h70e1b0c_13    conda-forge
aws-c-io                  0.10.5               h2fe331c_0    conda-forge
aws-checksums             0.1.11               h1e232aa_7    conda-forge
aws-sdk-cpp               1.8.186              hb0612c5_3    conda-forge
babel                     2.9.1              pyh44b312d_0    conda-forge
backcall                  0.2.0              pyh9f0ad1d_0    conda-forge
backports                 1.0                        py_2    conda-forge
backports.functools_lru_cache 1.6.4              pyhd8ed1ab_0    conda-forge
bleach                    4.1.0              pyhd8ed1ab_0    conda-forge
blosc                     1.21.0               h0e60522_0    conda-forge
brotli                    1.0.9                h8ffe710_6    conda-forge
brotli-bin                1.0.9                h8ffe710_6    conda-forge
brotlipy                  0.7.0           py39hb82d6ee_1003    conda-forge
bzip2                     1.0.8                h8ffe710_4    conda-forge
c-ares                    1.18.1               h8ffe710_0    conda-forge
ca-certificates           2021.10.8            h5b45459_0    conda-forge
certifi                   2021.10.8        py39hcbf5309_1    conda-forge
cffi                      1.15.0           py39h0878f49_0    conda-forge
charset-normalizer        2.0.9              pyhd8ed1ab_0    conda-forge
colorama                  0.4.4              pyh9f0ad1d_0    conda-forge
cryptography              36.0.1           py39h7bc7c5c_0    conda-forge
cycler                    0.11.0             pyhd8ed1ab_0    conda-forge
debugpy                   1.5.1            py39h415ef7b_0    conda-forge
decorator                 5.1.0              pyhd8ed1ab_0    conda-forge
defusedxml                0.7.1              pyhd8ed1ab_0    conda-forge
entrypoints               0.3             pyhd8ed1ab_1003    conda-forge
et_xmlfile                1.0.1                   py_1001    conda-forge
flake8                    4.0.1              pyhd8ed1ab_1    conda-forge
fonttools                 4.28.3           py39hb82d6ee_0    conda-forge
freetype                  2.10.4               h546665d_1    conda-forge
fsspec                    2022.1.0           pyhd8ed1ab_0    conda-forge
fuzzywuzzy                0.18.0             pyhd8ed1ab_0    conda-forge
gflags                    2.2.2             ha925a31_1004    conda-forge
glog                      0.5.0                h4797de2_0    conda-forge
grpc-cpp                  1.42.0               ha2e5525_1    conda-forge
hdf5                      1.12.1          nompi_h2a0e4a3_103    conda-forge
icu                       68.2                 h0e60522_0    conda-forge
idna                      3.1                pyhd3deb0d_0    conda-forge
importlib-metadata        4.2.0            py39hcbf5309_0    conda-forge
importlib_resources       5.4.0              pyhd8ed1ab_0    conda-forge
iniconfig                 1.1.1              pyh9f0ad1d_0    conda-forge
intel-openmp              2021.4.0          h57928b3_3556    conda-forge
ipykernel                 6.6.0            py39h832f523_0    conda-forge
ipython                   7.30.1           py39hcbf5309_0    conda-forge
ipython_genutils          0.2.0                      py_1    conda-forge
jbig                      2.1               h8d14728_2003    conda-forge
jedi                      0.18.1           py39hcbf5309_0    conda-forge
jinja2                    3.0.3              pyhd8ed1ab_0    conda-forge
jpeg                      9d                   h8ffe710_0    conda-forge
json5                     0.9.5              pyh9f0ad1d_0    conda-forge
jsonschema                4.2.1              pyhd8ed1ab_1    conda-forge
jupyter_client            7.1.0              pyhd8ed1ab_0    conda-forge
jupyter_core              4.9.1            py39hcbf5309_1    conda-forge
jupyter_server            1.13.1             pyhd8ed1ab_0    conda-forge
jupyterlab                3.2.5              pyhd8ed1ab_0    conda-forge
jupyterlab_pygments       0.1.2              pyh9f0ad1d_0    conda-forge
jupyterlab_server         2.9.0              pyhd8ed1ab_0    conda-forge
kiwisolver                1.3.2            py39h2e07f2f_1    conda-forge
krb5                      1.19.2               h20d022d_3    conda-forge
lcms2                     2.12                 h2a16943_0    conda-forge
lerc                      3.0                  h0e60522_0    conda-forge
libblas                   3.9.0              12_win64_mkl    conda-forge
libbrotlicommon           1.0.9                h8ffe710_6    conda-forge
libbrotlidec              1.0.9                h8ffe710_6    conda-forge
libbrotlienc              1.0.9                h8ffe710_6    conda-forge
libcblas                  3.9.0              12_win64_mkl    conda-forge
libclang                  11.1.0          default_h5c34c98_1    conda-forge
libcurl                   7.80.0               h789b8ee_1    conda-forge
libdeflate                1.8                  h8ffe710_0    conda-forge
libffi                    3.4.2                h8ffe710_5    conda-forge
libiconv                  1.16                 he774522_0    conda-forge
liblapack                 3.9.0              12_win64_mkl    conda-forge
libpng                    1.6.37               h1d00b33_2    conda-forge
libprotobuf               3.19.1               h7755175_0    conda-forge
libsodium                 1.0.18               h8d14728_1    conda-forge
libssh2                   1.10.0               h680486a_2    conda-forge
libthrift                 0.15.0               h636ae23_1    conda-forge
libtiff                   4.3.0                hd413186_2    conda-forge
libutf8proc               2.6.1                hcb41399_0    conda-forge
libxml2                   2.9.12               hf5bbc77_1    conda-forge
libxslt                   1.1.33               h65864e5_3    conda-forge
libzlib                   1.2.11            h8ffe710_1013    conda-forge
lxml                      4.7.1            py39h4fd7cdf_0    conda-forge
lz4-c                     1.9.3                h8ffe710_1    conda-forge
m2w64-gcc-libgfortran     5.3.0                         6    conda-forge
m2w64-gcc-libs            5.3.0                         7    conda-forge
m2w64-gcc-libs-core       5.3.0                         7    conda-forge
m2w64-gmp                 6.1.0                         2    conda-forge
m2w64-libwinpthread-git   5.0.0.4634.697f757               2    conda-forge
markupsafe                2.0.1            py39hb82d6ee_1    conda-forge
matplotlib                3.5.1            py39hcbf5309_0    conda-forge
matplotlib-base           3.5.1            py39h581301d_0    conda-forge
matplotlib-inline         0.1.3              pyhd8ed1ab_0    conda-forge
mccabe                    0.6.1                      py_1    conda-forge
mistune                   0.8.4           py39hb82d6ee_1005    conda-forge
mkl                       2021.4.0           h0e2418a_729    conda-forge
mock                      4.0.3            py39hcbf5309_2    conda-forge
more-itertools            8.12.0             pyhd8ed1ab_0    conda-forge
msys2-conda-epoch         20160418                      1    conda-forge
munkres                   1.1.4              pyh9f0ad1d_0    conda-forge
mypy                      0.931            py39hb82d6ee_2    conda-forge
mypy_extensions           0.4.3            py39hcbf5309_4    conda-forge
nbclassic                 0.3.4              pyhd8ed1ab_0    conda-forge
nbclient                  0.5.9              pyhd8ed1ab_0    conda-forge
nbconvert                 6.3.0            py39hcbf5309_1    conda-forge
nbformat                  5.1.3              pyhd8ed1ab_0    conda-forge
nest-asyncio              1.5.4              pyhd8ed1ab_0    conda-forge
notebook                  6.4.6              pyha770c72_0    conda-forge
numexpr                   2.7.3            py39h2e25243_2    conda-forge
numpy                     1.21.4           py39h6635163_0    conda-forge
olefile                   0.46               pyh9f0ad1d_1    conda-forge
openjpeg                  2.4.0                hb211442_1    conda-forge
openpyxl                  3.0.9              pyhd8ed1ab_0    conda-forge
openssl                   1.1.1l               h8ffe710_0    conda-forge
packaging                 21.3               pyhd8ed1ab_0    conda-forge
pandas                    1.4.0            py39h2e25243_0    conda-forge
pandoc                    2.16.2               h8ffe710_0    conda-forge
pandocfilters             1.5.0              pyhd8ed1ab_0    conda-forge
parquet-cpp               1.5.1                         2    conda-forge
parso                     0.8.3              pyhd8ed1ab_0    conda-forge
patsy                     0.5.2              pyhd8ed1ab_0    conda-forge
pickleshare               0.7.5                   py_1003    conda-forge
pillow                    8.4.0            py39h916092e_0    conda-forge
pip                       20.2.2                     py_0    conda-forge
pluggy                    1.0.0            py39hcbf5309_2    conda-forge
prometheus_client         0.12.0             pyhd8ed1ab_0    conda-forge
prompt-toolkit            3.0.24             pyha770c72_0    conda-forge
psutil                    5.8.0            py39hb82d6ee_2    conda-forge
py                        1.11.0             pyh6c4a22f_0    conda-forge
pyarrow                   6.0.1           py39ha05331a_5_cpu    conda-forge
pycodestyle               2.8.0              pyhd8ed1ab_0    conda-forge
pycparser                 2.21               pyhd8ed1ab_0    conda-forge
pyflakes                  2.4.0              pyhd8ed1ab_0    conda-forge
pygments                  2.10.0             pyhd8ed1ab_0    conda-forge
pyodbc                    4.0.32           py39h415ef7b_1    conda-forge
pyopenssl                 21.0.0             pyhd8ed1ab_0    conda-forge
pyparsing                 3.0.6              pyhd8ed1ab_0    conda-forge
pyqt                      5.12.3           py39hcbf5309_8    conda-forge
pyqt-impl                 5.12.3           py39h415ef7b_8    conda-forge
pyqt5-sip                 4.19.18          py39h415ef7b_8    conda-forge
pyqtchart                 5.12             py39h415ef7b_8    conda-forge
pyqtwebengine             5.12.1           py39h415ef7b_8    conda-forge
pyrlb                     0.7.0                    pypi_0    pypi
pyrsistent                0.18.0           py39hb82d6ee_0    conda-forge
pysocks                   1.7.1            py39hcbf5309_4    conda-forge
pytables                  3.6.1            py39hbcfe41f_5    conda-forge
pytest                    6.2.5            py39hcbf5309_2    conda-forge
python                    3.9.9           h9a09f29_0_cpython    conda-forge
python-dateutil           2.8.2              pyhd8ed1ab_0    conda-forge
python-levenshtein        0.12.2           py39hb82d6ee_1    conda-forge
python_abi                3.9                      2_cp39    conda-forge
pytz                      2021.3             pyhd8ed1ab_0    conda-forge
pywin32                   302              py39hb82d6ee_2    conda-forge
pywinpty                  1.1.6            py39h99910a6_0    conda-forge
pyzmq                     22.3.0           py39he46f08e_1    conda-forge
qt                        5.12.9               h5909a2a_4    conda-forge
re2                       2021.11.01           h0e60522_0    conda-forge
requests                  2.26.0             pyhd8ed1ab_1    conda-forge
scipy                     1.7.3            py39hc0c34ad_0    conda-forge
seaborn                   0.11.2               hd8ed1ab_0    conda-forge
seaborn-base              0.11.2             pyhd8ed1ab_0    conda-forge
send2trash                1.8.0              pyhd8ed1ab_0    conda-forge
setuptools                59.4.0           py39hcbf5309_0    conda-forge
six                       1.16.0             pyh6c4a22f_0    conda-forge
snappy                    1.1.8                ha925a31_3    conda-forge
sniffio                   1.2.0            py39hcbf5309_2    conda-forge
sqlite                    3.37.0               h8ffe710_0    conda-forge
statsmodels               0.13.1           py39h5d4886f_0    conda-forge
tbb                       2021.4.0             h2d74725_1    conda-forge
terminado                 0.12.1           py39hcbf5309_1    conda-forge
testpath                  0.5.0              pyhd8ed1ab_0    conda-forge
tk                        8.6.11               h8ffe710_1    conda-forge
toml                      0.10.2             pyhd8ed1ab_0    conda-forge
tomli                     2.0.0              pyhd8ed1ab_1    conda-forge
toolz                     0.11.2             pyhd8ed1ab_0    conda-forge
tornado                   6.1              py39hb82d6ee_2    conda-forge
traitlets                 5.1.1              pyhd8ed1ab_0    conda-forge
turbodbc                  4.3.0            py39he754071_1    conda-forge
typing_extensions         4.0.1              pyha770c72_0    conda-forge
tzdata                    2021e                he74cb21_0    conda-forge
ucrt                      10.0.20348.0         h57928b3_0    conda-forge
urllib3                   1.26.7             pyhd8ed1ab_0    conda-forge
vc                        14.2                 hb210afc_5    conda-forge
vs2015_runtime            14.29.30037          h902a5da_5    conda-forge
wcwidth                   0.2.5              pyh9f0ad1d_2    conda-forge
webencodings              0.5.1                      py_1    conda-forge
websocket-client          1.2.3              pyhd8ed1ab_0    conda-forge
wheel                     0.37.0             pyhd8ed1ab_1    conda-forge
win_inet_pton             1.1.0            py39hcbf5309_3    conda-forge
winpty                    0.4.3                         4    conda-forge
xz                        5.2.5                h62dcd97_1    conda-forge
zeromq                    4.3.4                h0e60522_1    conda-forge
zipp                      3.6.0              pyhd8ed1ab_0    conda-forge
zlib                      1.2.11            h8ffe710_1013    conda-forge
zstd                      1.5.0                h6255e5f_0    conda-forge

@dhirschfeld
Copy link

Try enabling faulthandler to get more context.

@tzipperle
Copy link
Author

Here is the output:

Windows fatal exception: access violation

Current thread 0x00005224 (most recent call first):
  File "C:\Users\user\.conda\envs\sadas\lib\site-packages\turbodbc\cursor.py", line 367 in fetchallarrow
  File "C:\Users\user\Projects\odbc\main_turbo.py", line 14 in read_sql_turbo
  File "C:\Users\user\Projects\odbc\main_turbo.py", line 30 in <module>

Process finished with exit code -1073741819 (0xC0000005)

And here the python script:

import faulthandler

import pandas as pd
import turbodbc

from connection_string import connection_string

faulthandler.enable()


def read_sql_turbo(query: str, conn: turbodbc.connect) -> pd.DataFrame:
    cursor = conn.cursor()
    cursor.execute(query)
    res = cursor.fetchallarrow().to_pandas()
    cursor.close()
    return res


if __name__ == '__main__':
    con_options = turbodbc.make_options(
        prefer_unicode=True,
        limit_varchar_results_to_max=True
    )

    connection = turbodbc.connect(
        connection_string=connection_string(),
        turbodbc_options=con_options
    )

    df = read_sql_turbo(query="SELECT KMRESIGLM2, KMREBEZ FROM KMBTRESS", conn=connection)
    print(df.head())

@dhirschfeld
Copy link

Not particularly enlightening, unfortunately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants