Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-20201

Connecting to remote MySQL via ODBC crashes server



    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Cannot Reproduce
    • Affects Version/s: 10.3.15, 10.4.6
    • Fix Version/s: N/A
    • Labels:
    • Environment:
      Linux 4.19.0-5-amd64 #1 SMP Debian 4.19.37-5+deb10u1 (2019-07-19) x86_64 GNU/Linux
      unixODBC 2.3.6-0.1
      MySQL ODBC Connector 5.3.13
      MySQL ODBC Connector 8.0.17


      Today, I've setup a fresh Debian 10.0 headless server with MariaDB 10.3.15 and wanted to connect to a remote Percona MySQL 5.7.25. As ENGINE=CONNECT TABLE_TYPE=MySQL does not allow SSL secured connections, I have to use ODBC.
      The setup is:

      # /etc/odbcinst.ini
      [MySQL ODBC 8.0 Driver]

      # /etc/odbc.ini
      Driver=MySQL ODBC 8.0 Driver

      With isql -v fashion I can connect without any problem and query remote server. But when trying to use this DSN in MariaDB with


      I get an error ERROR 2013 (HY000): Lost connection to MySQL server during query when trying to run SELECT * FROM my_tables.
      I want to mention, that a remote SQL Server Express connected via FreeTDS has no problems. Also when using another ODBC driver (i.e. https://www.devart.com/odbc/mysql). Only the original MySQL driver causes this issues, regardless if using version 5.3 or 8.0 and regardless if using MariaDB 10.3 or 10.4.
      The only log entries I can find are in /var/log/mysql/error.log:

      190729 16:38:44 [ERROR] mysqld got signal 11 ;
      This could be because you hit a bug. It is also possible that this binary
      or one of the libraries it was linked against is corrupt, improperly built,
      or misconfigured. This error can also be caused by malfunctioning hardware.
      To report this bug, see https://mariadb.com/kb/en/reporting-bugs
      We will try our best to scrape up some info that will hopefully help
      diagnose the problem, but since we have already crashed,
      something is definitely wrong and this may fail.
      Server version: 10.4.6-MariaDB-1:10.4.6+maria~buster
      It is possible that mysqld could use up to
      key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 467732 K  bytes of memory
      Hope that's ok; if not, decrease some variables in the equation.
      Thread pointer: 0x7f9874000f38
      Attempting backtrace. You can use the following information to find out
      where mysqld died. If you see no messages after this, something went
      terribly wrong...
      stack_bottom = 0x7f9878120dd8 thread_stack 0x49000
      charset.cc.o:0(map_coll_name_to_number(char const*, int))[0x7f98481a539a]
      Trying to get some variables.
      Some pointers may be invalid and cause the dump to abort.
      Query (0x7f9874012540): select * from brands where id<1
      Connection ID (thread ID): 35
      Status: NOT_KILLED
      Optimizer switch: index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushd
      The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
      information that should help you find out what is causing the crash.
      Writing a core file...
      Working directory at /var/lib/mysql
      Resource Limits:
      Limit                     Soft Limit           Hard Limit           Units
      Max cpu time              unlimited            unlimited            seconds
      Max file size             unlimited            unlimited            bytes
      Max data size             unlimited            unlimited            bytes
      Max stack size            8388608              unlimited            bytes
      Max core file size        0                    unlimited            bytes
      Max resident set          unlimited            unlimited            bytes
      Max processes             7866                 7866                 processes
      Max open files            16364                16364                files
      Max locked memory         65536                65536                bytes
      Max address space         unlimited            unlimited            bytes
      Max file locks            unlimited            unlimited            locks
      Max pending signals       7866                 7866                 signals
      Max msgqueue size         819200               819200               bytes
      Max nice priority         0                    0
      Max realtime priority     0                    0
      Max realtime timeout      unlimited            unlimited            us
      Core pattern: core
      2019-07-29 16:38:49 0 [Note] CONNECT: Version 1.06.0009 January 27, 2019
      2019-07-29 16:38:49 0 [Note] InnoDB: Using Linux native AIO
      2019-07-29 16:38:49 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
      2019-07-29 16:38:49 0 [Note] InnoDB: Uses event mutexes
      2019-07-29 16:38:49 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
      2019-07-29 16:38:49 0 [Note] InnoDB: Number of pools: 1
      2019-07-29 16:38:49 0 [Note] InnoDB: Using SSE2 crc32 instructions
      2019-07-29 16:38:49 0 [Note] mysqld: O_TMPFILE is not supported on /tmp (disabling future attempts)
      2019-07-29 16:38:49 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
      2019-07-29 16:38:49 0 [Note] InnoDB: Completed initialization of buffer pool
      2019-07-29 16:38:49 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
      2019-07-29 16:38:49 0 [Note] InnoDB: Starting crash recovery from checkpoint LSN=1631307
      2019-07-29 16:38:49 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
      2019-07-29 16:38:49 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
      2019-07-29 16:38:49 0 [Note] InnoDB: Creating shared tablespace for temporary tables
      2019-07-29 16:38:49 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
      2019-07-29 16:38:49 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
      2019-07-29 16:38:49 0 [Note] InnoDB: Waiting for purge to start
      2019-07-29 16:38:49 0 [Note] InnoDB: 10.4.6 started; log sequence number 1631316; transaction id 21
      2019-07-29 16:38:49 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
      2019-07-29 16:38:49 0 [Note] InnoDB: Buffer pool(s) load completed at 190729 16:38:49
      2019-07-29 16:38:49 0 [Note] Plugin 'FEEDBACK' is disabled.
      2019-07-29 16:38:49 0 [Note] Server socket created on IP: ''.
      2019-07-29 16:38:49 0 [Note] Reading of all Master_info entries succeeded
      2019-07-29 16:38:49 0 [Note] Added new Master_info '' to hash table
      2019-07-29 16:38:49 0 [Note] /usr/sbin/mysqld: ready for connections.
      Version: '10.4.6-MariaDB-1:10.4.6+maria~buster'  socket: '/run/mysqld/mysqld.sock'  port: 3306  mariadb.org binary distribution


          Issue Links



              bertrandop Olivier Bertrand
              Muster Hans
              0 Vote for this issue
              3 Start watching this issue



                  Git Integration