libzdb liberary is not working with odbc client on Centos 6.9

Issue #31 closed
Former user created an issue

Actually i want to use connection pooling in c for mysql database. Currently i uses ODBC client to connect with MySql database. I want to use both odbc client connection and Connection pooling(through libzdb library for Connection pooling in C). So when I am testing odbc client compatibility with libzdb liberary through a simple test code, I got segmentation fault. stack trace is showing some issue with odbc client connection. even I have just added -lzdb flag in my makefile and it is giving segmentation fault. but the same is working on centos 6.6 and 6.4.

I have also posted this issue on stackoverflow: https://stackoverflow.com/questions/51445125/libzdb-liberary-is-not-working-with-odbc-client-on-centos-6-9

Comments (12)

  1. Tildeslash repo owner

    This is not something we can help with as it seems related to odbc and a particular CentOS version. To debug, load the core file in GDB to investigate the stack

  2. Abhishek Jadhav

    Hi, This is not somthing expected as a answer to the issue. actually odbc client is working fine without linking of zdb liberary. Just by linking of -lzdb flag it is giving core. Core dump: 0x00007f769bf5c28f in is_param_marker () from /usr/lib64/libmyodbc5.so 0x00007f769bf5c548 in tokenize () from /usr/lib64/libmyodbc5.so 0x00007f769bf5c5b0 in parse () from /usr/lib64/libmyodbc5.so 0x00007f769bf62f44 in prepare () from /usr/lib64/libmyodbc5.so 0x00007f769bf69c0b in SQLPrepareWImpl () from /usr/lib64/libmyodbc5.so 0x0000003b0582048a in SQLPrepare (statement_handle=0x1356ba0, statement_text=<value optimized out>, text_length=-3) at SQLPrepare.c:311 0x0000000000400c6b in main () at src/test_zdb_odbc.c:89

    It seems like zdb liberary is corrupting odbc environment. Please mention if specific version of odbc or centos require to build application with both odbc client and zdb client.

  3. Abhishek Jadhav

    Hi Sir, Please look into the issue, ODBC client is working fine without zdb liberary, There is a chance that zdb library corrupting odbc environment. All other information are mention on issue ticket. Thanks for help

  4. Tildeslash repo owner

    ODBC client is working fine without zdb liberary, There is a chance that zdb library corrupting odbc environment

    Looking at your Makefile you don't even link with libzdb! So that seems unlikely. Check your own code. I'll help if you can demonstrate it is a problem with libzdb. That means to show a stack trace that involve libzdb code or interposing by libzdb code.

  5. Abhishek Jadhav

    In that Makefile, i have commented that -lzdb flag line and the odbc connection will work but if you just try to link zdb liberary by just adding -lzdb flag it is giving core dump. The most disturbing thing is , it is working on some machine but giving core on some Machine even the odbc client is same on all machine.

  6. Abhishek Jadhav

    I have attached a tar file, you can look at commented line below libs, I have tried by adding -lzdb flag only and In src/test_zdb_odbc.c there is no code related to zdb. The above Core dump is observed when I have link zdb liberary (i.e after adding -lzdb flag)

  7. Abhishek Jadhav

    I know this issue is not exactly related to zdb liberary but as I am new to development it is very difficult for me to find the root cause. We want to use your liberary in development as it provide good support for connection pooling but at the same time we cann't get rid of ODBC client totally from our application. If this issue get resolved I will personally write a blog on its performance better then ODBC client and will share my experience on building an application with libzdb liberary. Any help will be appreciated.

    Thanks, Abhishek J.

  8. Abhishek Jadhav
    • ldd ./bin/test_zdb_odbc
    • linux-vdso.so.1 => (0x00007fff721fd000)
    • libpthread.so.0 => /lib64/libpthread.so.0 (0x000000308d600000)
    • libodbc.so.2 => /usr/lib64/libodbc.so.2 (0x000000308e200000)
    • libnsl.so.1 => /lib64/libnsl.so.1 (0x000000309fe00000)
    • libzdb.so.11 => /usr/local/lib/libzdb.so.11 (0x00007f59bb835000)
    • libc.so.6 => /lib64/libc.so.6 (0x000000308d200000)
    • /lib64/ld-linux-x86-64.so.2 (0x000000308ce00000)
    • libltdl.so.7 => /usr/lib64/libltdl.so.7 (0x0000003099a00000)
    • libpq.so.5 => /usr/lib64/libpq.so.5 (0x000000308f600000)
    • libmysqlclient.so.18 => /usr/lib64/mysql/libmysqlclient.so.18 (0x00007f59bb264000)
    • libm.so.6 => /lib64/libm.so.6 (0x000000308e600000)
    • librt.so.1 => /lib64/librt.so.1 (0x000000308de00000)
    • libdl.so.2 => /lib64/libdl.so.2 (0x000000308da00000)
    • libsqlite3.so.0 => /usr/lib64/libsqlite3.so.0 (0x0000003091600000)
    • libssl.so.10 => /usr/lib64/libssl.so.10 (0x000000309de00000)
    • libcrypto.so.10 => /usr/lib64/libcrypto.so.10 (0x0000003098e00000)
    • libgssapi_krb5.so.2 => /lib64/libgssapi_krb5.so.2 (0x000000309c600000)
    • libcrypt.so.1 => /lib64/libcrypt.so.1 (0x000000309b200000)
    • libldap_r-2.4.so.2 => /lib64/libldap_r-2.4.so.2 (0x000000308fa00000)
    • libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x0000003092600000)
    • libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f59bb04b000)
    • libkrb5.so.3 => /lib64/libkrb5.so.3 (0x000000309be00000)
    • libcom_err.so.2 => /lib64/libcom_err.so.2 (0x0000003099600000)
    • libk5crypto.so.3 => /lib64/libk5crypto.so.3 (0x000000309b600000)
    • libz.so.1 => /lib64/libz.so.1 (0x00007f59bae33000)
    • libkrb5support.so.0 => /lib64/libkrb5support.so.0 (0x000000309ca00000)
    • libkeyutils.so.1 => /lib64/libkeyutils.so.1 (0x000000309ce00000)
    • libresolv.so.2 => /lib64/libresolv.so.2 (0x000000308f200000)
    • libfreebl3.so => /lib64/libfreebl3.so (0x000000309d200000)
    • liblber-2.4.so.2 => /lib64/liblber-2.4.so.2 (0x00007f59bac23000)
    • libsasl2.so.2 => /usr/lib64/libsasl2.so.2 (0x00000030a2200000)
    • libssl3.so => /usr/lib64/libssl3.so (0x000000309e200000)
    • libsmime3.so => /usr/lib64/libsmime3.so (0x000000309e600000)
    • libnss3.so => /usr/lib64/libnss3.so (0x000000309ae00000)
    • libnssutil3.so => /usr/lib64/libnssutil3.so (0x00007f59ba9f4000)
    • libplds4.so => /lib64/libplds4.so (0x000000309a600000)
    • libplc4.so => /lib64/libplc4.so (0x000000309a200000)
    • libnspr4.so => /lib64/libnspr4.so (0x0000003099e00000)
    • libselinux.so.1 => /lib64/libselinux.so.1 (0x000000308ee00000)

    Libraries linked to binary

  9. Abhishek Jadhav

    I am investigating this issue from last week but still not get the root cause. Please help on this.

  10. Abhishek Jadhav

    Hi,

    Please let me know whether you are looking at the issue or not because i am waiting for your response.

  11. Log in to comment