Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
None
-
None
-
None
-
Red Hat Enterprise Linux 7.2, MariaDB Connector/ODBC 2.0.12, unixODBC.
Description
test_odbc_crash.zip in the attachment includes:
RunQuery_Dec.cpp
Makefile_RQDec
creat_db_tables_t2.sql
queries_t2.sql
+ I used creat_db_tables_t2.sql to create test database and tables for the test:
/usr/bin/mysql -uroot -p<password> -vvv < creat_db_tables_t2.sql > creat_db_tables.log
(replace <password> with the password of root user)
+ RunQuery_Dec.cpp is the sample code, it is built with Makefile_RQDec:
make -f Makefile_RQDec
+ $ODBCINI file contains below section:
[TestDBMaria]
Driver=/opt/odbc/lib/libmaodbc.so
Description=MariaDB ODBC Driver
SERVER=VSDEV-94-133
PORT=3306
USER=testdba
Password=testsql
Database=TestDBMaria
OPTION=67108866
(Replace SERVER and PORT with appropriate values, USER and Password is hard-coded in the code)
+ I ran the test with below command:
./RunQuery_Dec -q queries_t2.sql -d TestDBMaria
+ The program crashed with core dump. Below is the stack trace:
[tester@VSDEV-94-133 testquery]$ gdb RunQuery_Dec /export/corefile/core.RunQuery_Dec.7542
GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-80.el7
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/home/tester/testquery/RunQuery_Dec...done.
[New LWP 7542]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `./RunQuery_Dec -q queries_t2.sql -d TestDBMaria'.
Program terminated with signal 11, Segmentation fault.
#0 0xf7476b26 in __strlen_sse2_bsf () from /usr/lib/libc.so.6
Missing separate debuginfos, use: debuginfo-install glibc-2.17-106.el7_2.8.i686 libgcc-4.8.5-4.el7.i686 libstdc++-4.8.5-4.el7.i686 libtool-ltdl-2.4.2-21.el7_2.i686 unixODBC-2.3.1-11.el7.i686
(gdb) bt
#0 0xf7476b26 in __strlen_sse2_bsf () from /usr/lib/libc.so.6
#1 0xf7341f54 in MADB_StmtExecute (Stmt=0x958fe90) at /home/buildbot/build/ma_statement.c:860
#2 0xf733945d in MADB_StmtExecDirect (Stmt=0x958fe90,
StatementText=0xffa32a44 "INSERT INTO ctable (cID,auxStr,auxInd) VALUES (433,'ÿÿÿÿ',0);\nINSERT INTO rtable (rID,cID,RenamedStatus,displayName) VALUES (407,433,0,'TestName1');\nINSERT INTO ctable (cID,auxStr,auxInd) VALUES (434,"..., TextLength=-3) at /home/buildbot/build/ma_statement.c:318
#3 0xf7329021 in MA_SQLExecDirect (Stmt=Stmt@entry=0x958fe90,
StatementText=StatementText@entry=0xffa32a44 "INSERT INTO ctable (cID,auxStr,auxInd) VALUES (433,'ÿÿÿÿ',0);\nINSERT INTO rtable (rID,cID,RenamedStatus,displayName) VALUES (407,433,0,'TestName1');\nINSERT INTO ctable (cID,auxStr,auxInd) VALUES (434,"..., TextLength=TextLength@entry=-3) at /home/buildbot/build/odbc_3_api.c:1274
#4 0xf73290fd in SQLExecDirect (StatementHandle=0x958fe90,
StatementText=0xffa32a44 "INSERT INTO ctable (cID,auxStr,auxInd) VALUES (433,'ÿÿÿÿ',0);\nINSERT INTO rtable (rID,cID,RenamedStatus,displayName) VALUES (407,433,0,'TestName1');\nINSERT INTO ctable (cID,auxStr,auxInd) VALUES (434,"..., TextLength=-3) at /home/buildbot/build/odbc_3_api.c:1290
#5 0xf770f2a3 in SQLExecDirect () from /usr/lib/libodbc.so.2
#6 0x08049d5e in main (argc=5, argv=0xffa531a4) at RunQuery_Dec.cpp:208
(gdb)