libmyodbc segfaults when Percona Server is installed

Bug #1089968 reported by Bernhard Schmidt
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Percona Server moved to https://jira.percona.com/projects/PS
Status tracked in 5.7
5.1
Won't Fix
High
Unassigned
5.5
Expired
High
Unassigned
5.6
Expired
High
Unassigned
5.7
Expired
High
Unassigned

Bug Description

Both in Debian Squeeze and Debian Wheezy, as soon as Percona's libmysqlclient in the appropriate version is installed unixodbc (using libmyodbc) segfaults

Plain Squeeze:
ii libmyodbc 5.1.6-1 the MySQL ODBC driver
ii libmysqlclient16 5.1.66-0+squeeze1 MySQL database client library

host:~# echo "SELECT now()" | isql DSN
+---------------------------------------+
| Connected! |
| |
| sql-statement |
| help [tablename] |
| quit |
| |
+---------------------------------------+
SQL> SELECT now()
+--------------------+
| now() |
+--------------------+
| 2012-12-13 15:50:05|
+--------------------+
SQLRowCount returns 1
1 rows fetched
SQL> host:~#

Squeeze + Percona:
ii libmyodbc 5.1.6-1 the MySQL ODBC driver
ii libmysqlclient16 5.1.66-rel14.1-495.sq Percona Server database client library

host:~# echo "SELECT now()" | isql DSN
+---------------------------------------+
| Connected! |
| |
| sql-statement |
| help [tablename] |
| quit |
| |
+---------------------------------------+
SQL> SELECT now()
+--------------------+
| now() |
+--------------------+
| 2012-12-13 15:51:34|
+--------------------+
SQLRowCount returns 1
1 rows fetched
Segmentation fault

In GDB:

(gdb) run DSN < query
Starting program: /usr/bin/isql DSN < query
[Thread debugging using libthread_db enabled]
[New Thread 0x7ffff51d9700 (LWP 3051)]
[Thread 0x7ffff51d9700 (LWP 3051) exited]
+---------------------------------------+
| Connected! |
| |
| sql-statement |
| help [tablename] |
| quit |
| |
+---------------------------------------+
SQL> select NOW();
+--------------------+
| NOW() |
+--------------------+
| 2012-12-13 15:57:19|
+--------------------+
SQLRowCount returns 1
1 rows fetched

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff5d2eb63 in list_delete (root=0x660940, element=0x660940) at list.c:48
48 list.c: No such file or directory.
        in list.c
(gdb) bt
#0 0x00007ffff5d2eb63 in list_delete (root=0x660940, element=0x660940) at list.c:48
#1 0x00007ffff6100139 in my_SQLFreeStmtExtended () from /usr/lib/odbc/libmyodbc.so
#2 0x00007ffff7b91350 in ?? () from /usr/lib/libodbc.so.1
#3 0x00007ffff7b91d02 in SQLFreeStmt () from /usr/lib/libodbc.so.1
#4 0x0000000000402b5f in ?? ()
#5 0x0000000000403a94 in ?? ()
#6 0x00007ffff73d6c8d in __libc_start_main () from /lib/libc.so.6

Tags: pkg
Revision history for this message
Oleg Neumyvakin (new-oleg) wrote :

is there any workaround?

Revision history for this message
Jericho Rivera (jericho-rivera) wrote :
Download full text (4.3 KiB)

I was able to reproduce this on Debian 6, Percona Server 5.1.72-rel14.10-597.squeeze

Initially tested on MySQL 5.1 and MySQL libmysqlclient16

root@debian-607-x64-vbox4210:/# echo "SELECT now()" | isql -v myODBC
+---------------------------------------+
| Connected! |
| |
| sql-statement |
| help [tablename] |
| quit |
| |
+---------------------------------------+
SQL> SELECT now()
+--------------------+
| now() |
+--------------------+
| 2013-12-20 09:24:14|
+--------------------+
SQLRowCount returns 1
1 rows fetched
SQL> root@debian-607-x64-vbox4210:/#

root@debian-607-x64-vbox4210:/# dpkg -l |grep -i libmy*
ii libmyodbc 5.1.6-1 the MySQL ODBC driver
ii libmysqlclient16 5.1.72-2 MySQL database client library

------------------------------------------------------------------------------------------------

Next tested on Percona Server 5.1 and Percona libmysqlclient16

root@debian-607-x64-vbox4210:/# echo "SELECT now()" | isql -v myODBC
+---------------------------------------+
| Connected! |
| |
| sql-statement |
| help [tablename] |
| quit |
| |
+---------------------------------------+
SQL> SELECT now()
+--------------------+
| now() |
+--------------------+
| 2013-12-20 09:33:58|
+--------------------+
SQLRowCount returns 1
1 rows fetched
Segmentation fault

root@debian-607-x64-vbox4210:/var/lib/mysql# dpkg -l | grep libmy*
ii libmyodbc 5.1.6-1 the MySQL ODBC driver
ii libmysqlclient16 5.1.72-rel14.10-597.squeeze Percona Server database client library

...

Dec 20 09:32:35 debian-607-x64-vbox4210 mysqld: 131220 9:32:35 [Note] Plugin 'FEDERATED' is disabled.
Dec 20 09:32:35 debian-607-x64-vbox4210 mysqld: InnoDB: The InnoDB memory heap is disabled
Dec 20 09:32:35 debian-607-x64-vbox4210 mysqld: InnoDB: Mutexes and rw_locks use GCC atomic builtins
Dec 20 09:32:35 debian-607-x64-vbox4210 mysqld: InnoDB: Compressed tables use zlib 1.2.3.4
Dec 20 09:32:35 debian-607-x64-vbox4210 mysqld: 131220 9:32:35 InnoDB: Initializing buffer pool, size = 128.0M
Dec 20 09:32:35 debian-607-x64-vbox4210 mysqld: 131220 9:32:35 InnoDB: Completed initialization of buffer pool
Dec 20 09:32:35 debian-607-x64-vbox4210 mysqld: 131220 9:32:35 InnoDB: highest supported file format is Barracuda.
Dec 20 09:32:35 debian-607-x64-vbox4210 mysqld: 131220 9:32:35 Percona XtraDB (http://www.percona.com) 5.1.72-14.10 started; log sequence number 45343
Dec 20 09:32:35 debian-607-x64-vbox4210 mysqld: 131220 9:32:35 [Note] Event Scheduler: Loaded 0 events
Dec 20 09:32:35 debian-607-x64-vbox4210 mysqld: 131220 9:32:35 [Note] /usr/sbin/mysqld: ready for connections.
Dec 20 09:32:35 debian-607-x64-vbox4210 mysqld: Version: '5.1.72-rel14...

Read more...

Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :

We stopped shipping libmysqlclient and now package libperconaserverclient instead. Is this bug still actual?

tags: added: pkg
Revision history for this message
Jericho Rivera (jericho-rivera) wrote :
Download full text (3.5 KiB)

Ran some tests and I get the following, but on the error log I can't see anything that relates to the segfault across all versions.

root@744915b97e89:/var/lib/mysql# echo "Select NOW()" | isql -v myODBC
+---------------------------------------+
| Connected! |
| |
| sql-statement |
| help [tablename] |
| quit |
| |
+---------------------------------------+
SQL> Select NOW()
+--------------------+
| NOW() |
+--------------------+
| 2014-06-05 07:44:34|
+--------------------+
SQLRowCount returns 1
1 rows fetched
Segmentation fault
root@744915b97e89:/var/lib/mysql# mysql --version
mysql Ver 14.14 Distrib 5.1.73, for debian-linux-gnu (x86_64) using readline 5.1
root@744915b97e89:/var/lib/mysql# cat mysqld-err.log
140605 07:43:59 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
140605 7:43:59 [Note] Plugin 'FEDERATED' is disabled.
InnoDB: The InnoDB memory heap is disabled
InnoDB: Mutexes and rw_locks use GCC atomic builtins
InnoDB: Compressed tables use zlib 1.2.3.4
140605 7:43:59 InnoDB: Initializing buffer pool, size = 128.0M
140605 7:43:59 InnoDB: Completed initialization of buffer pool
140605 7:43:59 InnoDB: highest supported file format is Barracuda.
140605 7:44:00 Percona XtraDB (http://www.percona.com) 5.1.73-14.11 started; log sequence number 45356
140605 7:44:00 [Note] Event Scheduler: Loaded 0 events
140605 7:44:00 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.1.73-rel14.11' socket: '/var/run/mysqld/mysqld.sock' port: 3306 (Percona Server (GPL), 14.11, Revision 603)

root@744915b97e89:/var/log# echo "select NOW()" | isql -v myODBC
+---------------------------------------+
| Connected! |
| |
| sql-statement |
| help [tablename] |
| quit |
| |
+---------------------------------------+
SQL> select NOW()
+--------------------+
| NOW() |
+--------------------+
| 2014-06-05 07:50:45|
+--------------------+
SQLRowCount returns 1
1 rows fetched
Segmentation fault

root@744915b97e89:/usr/lib# dpkg -l | grep percona
ii libperconaserverclient18.1 5.6.17-65.0-587.squeeze Percona Server database client library
ii percona-server-client-5.6 5.6.17-65.0-587.squeeze Percona Server database client binaries
ii percona-server-common-5.6 5.6.17-65.0-587.squeeze Percona Server database common files (e.g. /etc/mysql/my.cnf)
ii percona-server-server-5.6 5.6.17-65.0-587.squeeze Percona Server database server binaries
root@744915b97e89:/usr/lib# echo "select now()" | isql -v myODBC
+---------------------------------------+
| Connected! |
| |
| sql-statement |
| help [tablename] |
| quit |
| |
+--------------...

Read more...

summary: - libmyodbc segfaults when Percona libmysqlclient is installed
+ libmyodbc segfaults when Percona Server is installed
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for Percona Server 5.7 because there has been no activity for 60 days.]

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for Percona Server 5.6 because there has been no activity for 60 days.]

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for Percona Server 5.5 because there has been no activity for 60 days.]

Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PS-611

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.