Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 10.0.13
-
Fix Version/s: 10.0.14
-
Component/s: None
-
Labels:
-
Environment:Windows 7, 64 bit
Description
Hello,
when i create CONNECT table (example below) with ODBC to MSSQL and i set "CHARSET=utf8", table is created properly. But after "SELECT * FROM sample_product", after 2-3 seconds MariaDB crashed with "Uknown error". I need to start MariaDB service again. In MariaDB log is nothing relevant.
After debugging i find out, that crash is based on different collations. In MSSQL table is collation "Czech_CI_AS" and in it's char-columns are some Czech-specific characters, for example "čšěíů".
Solution: when i changed CHARSET to "cp1250", everythings works great.
It's OK - i don't expect explicit convert from cp1250 to utf8. But expect, that server throws an error about collations and not crash ![]()
Thank you.
CREATE TABLE sample_product (
col1 varchar(100) NOT NULL,
col2 varchar(100) NOT NULL
)
ENGINE=CONNECT CHARSET=utf8 CONNECTION='DSN=XXX;UID=XXX;PWD=XXX' table_type=odbc srcdef='SELECT col1, col2 FROM [test].[test]';
Gliffy Diagrams
Attachments
Activity
- All
- Comments
- Work Log
- History
- Activity
- Transitions
Maybe useful info... here is crash backtrace from MariaDB 10.0.12 with the same issue...
Crash is probably result of "buffer overflow detected".
Just for sure, target MSSQL table has just 5 rows and 21 columns, so no big data. Below is our CONNECT table with replaced column names.
CREATE TABLE `helios_connect_produkty` ( `col1` int(10) unsigned NOT NULL, `col2` int(10) unsigned DEFAULT NULL, `col3` datetime NOT NULL, `col4` tinyint(1) unsigned DEFAULT NULL, `col5` int(10) unsigned DEFAULT NULL, `col6` varchar(50) DEFAULT NULL, `col7` varchar(40) DEFAULT NULL, `col8` varchar(30) DEFAULT NULL, `col9` tinyint(1) unsigned DEFAULT NULL, `col10` decimal(4,2) DEFAULT NULL, `col11` varchar(5) DEFAULT NULL, `col12` varchar(100) DEFAULT NULL, `col13` varchar(100) DEFAULT NULL, `col14` varchar(100) DEFAULT NULL, `col15` decimal(12,4) DEFAULT NULL, `col16` decimal(19,6) DEFAULT NULL, `col17` decimal(19,6) DEFAULT NULL, `col18` decimal(19,6) DEFAULT NULL, `col19` varchar(1000) DEFAULT NULL, `col20` varchar(2000) DEFAULT NULL, `col21` varchar(50) DEFAULT NULL ) ENGINE=CONNECT DEFAULT CHARSET=cp1250 CONNECTION='DSN=xxx;UID=xxx;PWD=xxx' `table_type`=odbc `srcdef`='SELECT * FROM [xxx].[xxx]';
Crash backtrace
Version: '10.0.12-MariaDB-log' socket: '/tmp/mysql-jbe.sock' port: 3307 Source distribution *** buffer overflow detected ***: ./bin/mysqld terminated ======= Backtrace: ========= /lib64/libc.so.6(__fortify_fail+0x37)[0x7f3e595bacef] /lib64/libc.so.6(+0xf8ed0)[0x7f3e595b8ed0] /lib64/libc.so.6(__vsprintf_chk+0x0)[0x7f3e595b8365] /lib64/libc.so.6(_IO_default_xsputn+0x77)[0x7f3e59539e7d] /lib64/libc.so.6(_IO_vfprintf+0x35c1)[0x7f3e5950b6c6] /lib64/libc.so.6(__vsprintf_chk+0x82)[0x7f3e595b83e7] /lib64/libc.so.6(__sprintf_chk+0x7d)[0x7f3e595b8351] /mariadb-10.0.12-gentoo/lib/plugin/ha_connect.so(_ZN10ha_connect10MakeRecordEPc+0x23c)[0x7f3e57d6b7dc] /mariadb-10.0.12-gentoo/lib/plugin/ha_connect.so(_ZN10ha_connect8rnd_nextEPh+0x15b)[0x7f3e57d6bb0b] ./bin/mysqld(_ZN7handler11ha_rnd_nextEPh+0x15c)[0x6df6cc] ./bin/mysqld(_Z13rr_sequentialP11READ_RECORD+0x20)[0x7bd1a0] ./bin/mysqld(_Z10sub_selectP4JOINP13st_join_tableb+0x161)[0x5d79c1] ./bin/mysqld[0x5e492d] ./bin/mysqld(_ZN4JOIN10exec_innerEv+0x998)[0x5f36c8] ./bin/mysqld(_ZN4JOIN4execEv+0x9)[0x5f5329] ./bin/mysqld(_Z12mysql_selectP3THDPPP4ItemP10TABLE_LISTjR4ListIS1_ES2_jP8st_orderSB_S2_SB_yP13select_resultP18st_select_lex_unitP13st_select_lex+0x118)[0x5f2018] ./bin/mysqld(_Z13handle_selectP3THDP3LEXP13select_resultm+0x254)[0x5f2a94] ./bin/mysqld[0x5a5104] ./bin/mysqld(_Z21mysql_execute_commandP3THD+0x5386)[0x5afd86] ./bin/mysqld(_Z11mysql_parseP3THDPcjP12Parser_state+0x1d8)[0x5b28b8] ./bin/mysqld(_Z16dispatch_command19enum_server_commandP3THDPcj+0x16f7)[0x5b44e7] ./bin/mysqld(_Z24do_handle_one_connectionP3THD+0x1e4)[0x65b544] ./bin/mysqld(handle_one_connection+0x38)[0x65b5a8] /lib64/libpthread.so.0(+0x8bd5)[0x7f3e5aef7bd5] /lib64/libc.so.6(clone+0x6d)[0x7f3e595a6d7d] ======= Memory map: ======== 00400000-0101a000 r-xp 00000000 09:03 6146128 /mariadb-10.0.12-gentoo/bin/mysqld 0121a000-01222000 r--p 00c1a000 09:03 6146128 /mariadb-10.0.12-gentoo/bin/mysqld 01222000-012c2000 rw-p 00c22000 09:03 6146128 /mariadb-10.0.12-gentoo/bin/mysqld 012c2000-01b26000 rw-p 00000000 00:00 0 7f3e18965000-7f3e18967000 r-xp 00000000 09:03 6865243 /usr/lib64/gconv/CP1250.so 7f3e18967000-7f3e18b66000 ---p 00002000 09:03 6865243 /usr/lib64/gconv/CP1250.so 7f3e18b66000-7f3e18b67000 r--p 00001000 09:03 6865243 /usr/lib64/gconv/CP1250.so 7f3e18b67000-7f3e18b68000 rw-p 00002000 09:03 6865243 /usr/lib64/gconv/CP1250.so 7f3e18b68000-7f3e18b6a000 r-xp 00000000 09:03 6865116 /usr/lib64/gconv/ISO8859-1.so 7f3e18b6a000-7f3e18d69000 ---p 00002000 09:03 6865116 /usr/lib64/gconv/ISO8859-1.so 7f3e18d69000-7f3e18d6a000 r--p 00001000 09:03 6865116 /usr/lib64/gconv/ISO8859-1.so 7f3e18d6a000-7f3e18d6b000 rw-p 00002000 09:03 6865116 /usr/lib64/gconv/ISO8859-1.so 7f3e18d6b000-7f3e18d7d000 r-xp 00000000 09:03 6865780 /usr/lib64/libiodbcinst.so.2.1.20 7f3e18d7d000-7f3e18f7c000 ---p 00012000 09:03 6865780 /usr/lib64/libiodbcinst.so.2.1.20 7f3e18f7c000-7f3e18f7d000 r--p 00011000 09:03 6865780 /usr/lib64/libiodbcinst.so.2.1.20 7f3e18f7d000-7f3e18f7e000 rw-p 00012000 09:03 6865780 /usr/lib64/libiodbcinst.so.2.1.20 7f3e18f7e000-7f3e18fd6000 r-xp 00000000 09:03 9561668 /usr/lib64/libtdsodbc.so.0.0.0 7f3e18fd6000-7f3e191d6000 ---p 00058000 09:03 9561668 /usr/lib64/libtdsodbc.so.0.0.0 7f3e191d6000-7f3e191d9000 r--p 00058000 09:03 9561668 /usr/lib64/libtdsodbc.so.0.0.0 7f3e191d9000-7f3e191da000 rw-p 0005b000 09:03 9561668 /usr/lib64/libtdsodbc.so.0.0.0 7f3e191da000-7f3e191dd000 r-xp 00000000 09:03 6865286 /usr/lib64/gconv/UTF-16.so 7f3e191dd000-7f3e193dc000 ---p 00003000 09:03 6865286 /usr/lib64/gconv/UTF-16.so 7f3e193dc000-7f3e193dd000 r--p 00002000 09:03 6865286 /usr/lib64/gconv/UTF-16.so 7f3e193dd000-7f3e193de000 rw-p 00003000 09:03 6865286 /usr/lib64/gconv/UTF-16.so 7f3e193de000-7f3e193e8000 r-xp 00000000 09:03 6867620 /lib64/libnss_nis-2.17.so 7f3e193e8000-7f3e195e7000 ---p 0000a000 09:03 6867620 /lib64/libnss_nis-2.17.so 7f3e195e7000-7f3e195e8000 r--p 00009000 09:03 6867620 /lib64/libnss_nis-2.17.so 7f3e195e8000-7f3e195e9000 rw-p 0000a000 09:03 6867620 /lib64/libnss_nis-2.17.so 7f3e195e9000-7f3e195fd000 r-xp 00000000 09:03 6867617 /lib64/libnsl-2.17.so 7f3e195fd000-7f3e197fc000 ---p 00014000 09:03 6867617 /lib64/libnsl-2.17.so 7f3e197fc000-7f3e197fd000 r--p 00013000 09:03 6867617 /lib64/libnsl-2.17.so 7f3e197fd000-7f3e197fe000 rw-p 00014000 09:03 6867617 /lib64/libnsl-2.17.so 7f3e197fe000-7f3e1dc00000 rw-p 00000000 00:00 0 7f3e1dddb000-7f3e1dde2000 r-xp 00000000 09:03 6867637 /lib64/libnss_compat-2.17.so 7f3e1dde2000-7f3e1dfe1000 ---p 00007000 09:03 6867637 /lib64/libnss_compat-2.17.so 7f3e1dfe1000-7f3e1dfe2000 r--p 00006000 09:03 6867637 /lib64/libnss_compat-2.17.so 7f3e1dfe2000-7f3e1dfe3000 rw-p 00007000 09:03 6867637 /lib64/libnss_compat-2.17.so 7f3e1dfe3000-7f3e1dff6000 r-xp 00000000 09:03 6866384 /lib64/libresolv-2.17.so 7f3e1dff6000-7f3e1e1f6000 ---p 00013000 09:03 6866384 /lib64/libresolv-2.17.so 7f3e1e1f6000-7f3e1e1f7000 r--p 00013000 09:03 6866384 /lib64/libresolv-2.17.so 7f3e1e1f7000-7f3e1e1f8000 rw-p 00014000 09:03 6866384 /lib64/libresolv-2.17.so 7f3e1e1f8000-7f3e1e1fa000 rw-p 00000000 00:00 0 7f3e1e1fa000-7f3e1e1ff000 r-xp 00000000 09:03 6866476 /lib64/libnss_dns-2.17.so 7f3e1e1ff000-7f3e1e3fe000 ---p 00005000 09:03 6866476 /lib64/libnss_dns-2.17.so 7f3e1e3fe000-7f3e1e3ff000 r--p 00004000 09:03 6866476 /lib64/libnss_dns-2.17.so 7f3e1e3ff000-7f3e1e400000 rw-p 00005000 09:03 6866476 /lib64/libnss_dns-2.17.so 7f3e1e400000-7f3e1fc00000 rw-p 00000000 00:00 0 7f3e1fdf2000-7f3e1fdfe000 r-xp 00000000 09:03 6867098 /lib64/libnss_files-2.17.so 7f3e1fdfe000-7f3e1fffd000 ---p 0000c000 09:03 6867098 /lib64/libnss_files-2.17.so 7f3e1fffd000-7f3e1fffe000 r--p 0000b000 09:03 6867098 /lib64/libnss_files-2.17.so 7f3e1fffe000-7f3e1ffff000 rw-p 0000c000 09:03 6867098 /lib64/libnss_files-2.17.so 7f3e1ffff000-7f3e20000000 ---p 00000000 00:00 0 7f3e20000000-7f3e28c00000 rw-p 00000000 00:00 0 [stack:11999] 7f3e28dec000-7f3e28df5000 r-xp 00000000 09:03 9560722 /usr/lib64/libltdl.so.7.3.0 7f3e28df5000-7f3e28ff4000 ---p 00009000 09:03 9560722 /usr/lib64/libltdl.so.7.3.0 7f3e28ff4000-7f3e28ff5000 r--p 00008000 09:03 9560722 /usr/lib64/libltdl.so.7.3.0 7f3e28ff5000-7f3e28ff6000 rw-p 00009000 09:03 9560722 /usr/lib64/libltdl.so.7.3.0 7f3e28ff6000-7f3e28ff7000 ---p 00000000 00:00 0 7f3e28ff7000-7f3e297f7000 rw-p 00000000 00:00 0 [stack:11998] 7f3e297f7000-7f3e297f8000 ---p 00000000 00:00 0 7f3e297f8000-7f3e29ff8000 rw-p 00000000 00:00 0 [stack:11997] 7f3e29ff8000-7f3e29ff9000 ---p 00000000 00:00 0 7f3e29ff9000-7f3e2a7f9000 rw-p 00000000 00:00 0 [stack:11996] 7f3e2a7f9000-7f3e2a7fa000 ---p 00000000 00:00 0 7f3e2a7fa000-7f3e2affa000 rw-p 00000000 00:00 0 [stack:11995] 7f3e2affa000-7f3e2affb000 ---p 00000000 00:00 0 7f3e2affb000-7f3e2b7fb000 rw-p 00000000 00:00 0 [stack:11994] 7f3e2b7fb000-7f3e2b7fc000 ---p 00000000 00:00 0 7f3e2b7fc000-7f3e2bffc000 rw-p 00000000 00:00 0 [stack:11993] 7f3e2bffc000-7f3e2bffd000 ---p 00000000 00:00 0 7f3e2bffd000-7f3e2c7fd000 rw-p 00000000 00:00 0 [stack:11992] 7f3e2c7fd000-7f3e2c7fe000 ---p 00000000 00:00 0 7f3e2c7fe000-7f3e2cffe000 rw-p 00000000 00:00 0 [stack:11991] 7f3e2cffe000-7f3e2cfff000 ---p 00000000 00:00 0 7f3e2cfff000-7f3e2d7ff000 rw-p 00000000 00:00 0 [stack:11990] 7f3e2d7ff000-7f3e2d800000 ---p 00000000 00:00 0 7f3e2d800000-7f3e2ec00000 rw-p 00000000 00:00 0 [stack:11989] 7f3e2eca4000-7f3e2eded000 r-xp 00000000 09:03 8865954 /usr/lib64/libxml2.so.2.9.1 7f3e2eded000-7f3e2efec000 ---p 00149000 09:03 8865954 /usr/lib64/libxml2.so.2.9.1 7f3e2efec000-7f3e2eff4000 r--p 00148000 09:03 8865954 /usr/lib64/libxml2.so.2.9.1 7f3e2eff4000-7f3e2eff6000 rw-p 00150000 09:03 8865954 /usr/lib64/libxml2.so.2.9.1 7f3e2eff6000-7f3e2eff7000 rw-p 00000000 00:00 0 7f3e2eff7000-7f3e2eff8000 ---p 00000000 00:00 0 7f3e2eff8000-7f3e2f7f8000 rw-p 00000000 00:00 0 [stack:11986] 7f3e2f7f8000-7f3e2f7f9000 ---p 00000000 00:00 0 7f3e2f7f9000-7f3e2fff9000 rw-p 00000000 00:00 0 [stack:11985] 7f3e2fff9000-7f3e2fffa000 ---p 00000000 00:00 0 7f3e2fffa000-7f3e307fa000 rw-p 00000000 00:00 0 [stack:11984] 7f3e307fa000-7f3e307fb000 ---p 00000000 00:00 0 7f3e307fb000-7f3e30ffb000 rw-p 00000000 00:00 0 [stack:11983] 7f3e30ffb000-7f3e30ffc000 ---p 00000000 00:00 0 7f3e30ffc000-7f3e317fc000 rw-p 00000000 00:00 0 [stack:11982] 7f3e317fc000-7f3e317fd000 ---p 00000000 00:00 0 7f3e317fd000-7f3e31ffd000 rw-p 00000000 00:00 0 [stack:11981] 7f3e31ffd000-7f3e31ffe000 ---p 00000000 00:00 0 7f3e31ffe000-7f3e327fe000 rw-p 00000000 00:00 0 [stack:11980] 7f3e327fe000-7f3e327ff000 ---p 00000000 00:00 0 7f3e327ff000-7f3e32fff000 rw-p 00000000 00:00 0 [stack:11979] 7f3e32fff000-7f3e33000000 ---p 00000000 00:00 0 7f3e33000000-7f3e34c00000 rw-p 00000000 00:00 0 [stack:11978] 7f3e34d00000-7f3e57c00000 rw-p 00000000 00:00 0 7f3e57c78000-7f3e57c79000 ---p 00000000 00:00 0 7f3e57c79000-7f3e57cc1000 rw-p 00000000 00:00 0 [stack:12006] 7f3e57cc1000-7f3e57cc2000 ---p 00000000 00:00 0 7f3e57cc2000-7f3e57d0a000 rw-p 00000000 00:00 0 [stack:12005] 7f3e57d0a000-7f3e57dee000 r-xp 00000000 09:03 6144027 /mariadb-10.0.12-gentoo/lib/plugin/ha_connect.so 7f3e57dee000-7f3e57fee000 ---p 000e4000 09:03 6144027 /mariadb-10.0.12-gentoo/lib/plugin/ha_connect.so 7f3e57fee000-7f3e57ffa000 r--p 000e4000 09:03 6144027 /mariadb-10.0.12-gentoo/lib/plugin/ha_connect.so 7f3e57ffa000-7f3e57ffd000 rw-p 000f0000 09:03 6144027 /mariadb-10.0.12-gentoo/lib/plugin/ha_connect.so 7f3e57ffd000-7f3e57fff000 rw-p 00000000 00:00 0 7f3e57fff000-7f3e58000000 ---p 00000000 00:00 0 7f3e58000000-7f3e59000000 rw-p 00000000 00:00 0 [stack:11977] 7f3e5900b000-7f3e5900c000 ---p 00000000 00:00 0 7f3e5900c000-7f3e59054000 rw-p 00000000 00:00 0 [stack:12003] 7f3e59054000-7f3e590b0000 r-xp 00000000 09:03 9569002 /usr/lib64/libodbc.so.2.0.0 7f3e590b0000-7f3e592af000 ---p 0005c000 09:03 9569002 /usr/lib64/libodbc.so.2.0.0 7f3e592af000-7f3e592b0000 r--p 0005b000 09:03 9569002 /usr/lib64/libodbc.so.2.0.0 7f3e592b0000-7f3e592b7000 rw-p 0005c000 09:03 9569002 /usr/lib64/libodbc.so.2.0.0 7f3e592b7000-7f3e592b8000 rw-p 00000000 00:00 0 7f3e592b8000-7f3e592bf000 r-xp 00000000 09:03 6867216 /lib64/librt-2.17.so 7f3e592bf000-7f3e594be000 ---p 00007000 09:03 6867216 /lib64/librt-2.17.so 7f3e594be000-7f3e594bf000 r--p 00006000 09:03 6867216 /lib64/librt-2.17.so 7f3e594bf000-7f3e594c0000 rw-p 00007000 09:03 6867216 /lib64/librt-2.17.so 7f3e594c0000-7f3e59659000 r-xp 00000000 09:03 6867684 /lib64/libc-2.17.so 7f3e59659000-7f3e59859000 ---p 00199000 09:03 6867684 /lib64/libc-2.17.so 7f3e59859000-7f3e5985d000 r--p 00199000 09:03 6867684 /lib64/libc-2.17.so 7f3e5985d000-7f3e5985f000 rw-p 0019d000 09:03 6867684 /lib64/libc-2.17.so 7f3e5985f000-7f3e59863000 rw-p 00000000 00:00 0 7f3e59863000-7f3e59877000 r-xp 00000000 09:03 9061121 /usr/lib64/gcc/x86_64-pc-linux-gnu/4.8.2/libgcc_s.so.1 7f3e59877000-7f3e59a76000 ---p 00014000 09:03 9061121 /usr/lib64/gcc/x86_64-pc-linux-gnu/4.8.2/libgcc_s.so.1 7f3e59a76000-7f3e59a77000 r--p 00013000 09:03 9061121 /usr/lib64/gcc/x86_64-pc-linux-gnu/4.8.2/libgcc_s.so.1 7f3e59a77000-7f3e59a78000 rw-p 00014000 09:03 9061121 /usr/lib64/gcc/x86_64-pc-linux-gnu/4.8.2/libgcc_s.so.1 7f3e59a78000-7f3e59b73000 r-xp 00000000 09:03 6865371 /lib64/libm-2.17.so 7f3e59b73000-7f3e59d72000 ---p 000fb000 09:03 6865371 /lib64/libm-2.17.so 7f3e59d72000-7f3e59d73000 r--p 000fa000 09:03 6865371 /lib64/libm-2.17.so 7f3e59d73000-7f3e59d74000 rw-p 000fb000 09:03 6865371 /lib64/libm-2.17.so 7f3e59d74000-7f3e59e58000 r-xp 00000000 09:03 9061130 /usr/lib64/gcc/x86_64-pc-linux-gnu/4.8.2/libstdc++.so.6.0.18 7f3e59e58000-7f3e5a058000 ---p 000e4000 09:03 9061130 /usr/lib64/gcc/x86_64-pc-linux-gnu/4.8.2/libstdc++.so.6.0.18 7f3e5a058000-7f3e5a060000 r--p 000e4000 09:03 9061130 /usr/lib64/gcc/x86_64-pc-linux-gnu/4.8.2/libstdc++.so.6.0.18 7f3e5a060000-7f3e5a062000 rw-p 000ec000 09:03 9061130 /usr/lib64/gcc/x86_64-pc-linux-gnu/4.8.2/libstdc++.so.6.0.18 7f3e5a062000-7f3e5a077000 rw-p 00000000 00:00 0 7f3e5a077000-7f3e5a079000 r-xp 00000000 09:03 6866166 /lib64/libdl-2.17.so 7f3e5a079000-7f3e5a279000 ---p 00002000 09:03 6866166 /lib64/libdl-2.17.so 7f3e5a279000-7f3e5a27a000 r--p 00002000 09:03 6866166 /lib64/libdl-2.17.so 7f3e5a27a000-7f3e5a27b000 rw-p 00003000 09:03 6866166 /lib64/libdl-2.17.so 7f3e5a27b000-7f3e5a412000 r-xp 00000000 09:03 8906579 /usr/lib64/libcrypto.so.1.0.0 7f3e5a412000-7f3e5a612000 ---p 00197000 09:03 8906579 /usr/lib64/libcrypto.so.1.0.0 7f3e5a612000-7f3e5a62c000 r--p 00197000 09:03 8906579 /usr/lib64/libcrypto.so.1.0.0 7f3e5a62c000-7f3e5a637000 rw-p 001b1000 09:03 8906579 /usr/lib64/libcrypto.so.1.0.0 7f3e5a637000-7f3e5a63b000 rw-p 00000000 00:00 0 7f3e5a63b000-7f3e5a697000 r-xp 00000000 09:03 8906598 /usr/lib64/libssl.so.1.0.0 7f3e5a697000-7f3e5a896000 ---p 0005c000 09:03 8906598 /usr/lib64/libssl.so.1.0.0 7f3e5a896000-7f3e5a89a000 r--p 0005b000 09:03 8906598 /usr/lib64/libssl.so.1.0.0 7f3e5a89a000-7f3e5a8a1000 rw-p 0005f000 09:03 8906598 /usr/lib64/libssl.so.1.0.0 7f3e5a8a1000-7f3e5a8a9000 r-xp 00000000 09:03 6866160 /lib64/libcrypt-2.17.so 7f3e5a8a9000-7f3e5aaa8000 ---p 00008000 09:03 6866160 /lib64/libcrypt-2.17.so 7f3e5aaa8000-7f3e5aaa9000 r--p 00007000 09:03 6866160 /lib64/libcrypt-2.17.so 7f3e5aaa9000-7f3e5aaaa000 rw-p 00008000 09:03 6866160 /lib64/libcrypt-2.17.so 7f3e5aaaa000-7f3e5aad8000 rw-p 00000000 00:00 0 7f3e5aad8000-7f3e5aaec000 r-xp 00000000 09:03 6717841 /lib64/libz.so.1.2.8 7f3e5aaec000-7f3e5aceb000 ---p 00014000 09:03 6717841 /lib64/libz.so.1.2.8 7f3e5aceb000-7f3e5acec000 r--p 00013000 09:03 6717841 /lib64/libz.so.1.2.8 7f3e5acec000-7f3e5aced000 rw-p 00014000 09:03 6717841 /lib64/libz.so.1.2.8 7f3e5aced000-7f3e5acee000 r-xp 00000000 09:03 6695144 /lib64/libaio.so.1.0.1 7f3e5acee000-7f3e5aeed000 ---p 00001000 09:03 6695144 /lib64/libaio.so.1.0.1 7f3e5aeed000-7f3e5aeee000 r--p 00000000 09:03 6695144 /lib64/libaio.so.1.0.1 7f3e5aeee000-7f3e5aeef000 rw-p 00001000 09:03 6695144 /lib64/libaio.so.1.0.1 7f3e5aeef000-7f3e5af06000 r-xp 00000000 09:03 6865375 /lib64/libpthread-2.17.so 7f3e5af06000-7f3e5b105000 ---p 00017000 09:03 6865375 /lib64/libpthread-2.17.so 7f3e5b105000-7f3e5b106000 r--p 00016000 09:03 6865375 /lib64/libpthread-2.17.so 7f3e5b106000-7f3e5b107000 rw-p 00017000 09:03 6865375 /lib64/libpthread-2.17.so 7f3e5b107000-7f3e5b10b000 rw-p 00000000 00:00 0 7f3e5b10b000-7f3e5b12b000 r-xp 00000000 09:03 6867674 /lib64/ld-2.17.so 7f3e5b131000-7f3e5b132000 ---p 00000000 00:00 0 7f3e5b132000-7f3e5b17a000 rw-p 00000000 00:00 0 [stack:12001] 7f3e5b17a000-7f3e5b17b000 ---p 00000000 00:00 0 7f3e5b17b000-7f3e5b1c3000 rw-p 00000000 00:00 0 [stack:12000] 7f3e5b1c3000-7f3e5b1e4000 rw-s 00000000 00:09 243533332 /[aio] (deleted) 7f3e5b1e4000-7f3e5b205000 rw-s 00000000 00:09 243533331 /[aio] (deleted) 7f3e5b205000-7f3e5b226000 rw-s 00000000 00:09 243533330 /[aio] (deleted) 7f3e5b226000-7f3e5b247000 rw-s 00000000 00:09 243533329 /[aio] (deleted) 7f3e5b247000-7f3e5b268000 rw-s 00000000 00:09 243533328 /[aio] (deleted) 7f3e5b268000-7f3e5b289000 rw-s 00000000 00:09 243533327 /[aio] (deleted) 7f3e5b289000-7f3e5b2aa000 rw-s 00000000 00:09 243533326 /[aio] (deleted) 7f3e5b2aa000-7f3e5b2cb000 rw-s 00000000 00:09 243533325 /[aio] (deleted) 7f3e5b2cb000-7f3e5b2ec000 rw-s 00000000 00:09 243533324 /[aio] (deleted) 7f3e5b2ec000-7f3e5b30d000 rw-s 00000000 00:09 243533323 /[aio] (deleted) 7f3e5b30d000-7f3e5b315000 rw-p 00000000 00:00 0 7f3e5b31a000-7f3e5b31b000 rw-p 00000000 00:00 0 7f3e5b31b000-7f3e5b322000 r--s 00000000 09:03 12533761 /usr/lib64/gconv/gconv-modules.cache 7f3e5b322000-7f3e5b324000 rw-p 00000000 00:00 0 7f3e5b324000-7f3e5b326000 rw-s 00000000 00:09 243533333 /[aio] (deleted) 7f3e5b326000-7f3e5b327000 rw-s 00000000 00:09 243533322 /[aio] (deleted) 7f3e5b327000-7f3e5b32b000 rw-p 00000000 00:00 0 7f3e5b32b000-7f3e5b32c000 r--p 00020000 09:03 6867674 /lib64/ld-2.17.so 7f3e5b32c000-7f3e5b32d000 rw-p 00021000 09:03 6867674 /lib64/ld-2.17.so 7f3e5b32d000-7f3e5b32e000 rw-p 00000000 00:00 0 7fffafe65000-7fffafe86000 rw-p 00000000 00:00 0 [stack] 7fffaffc4000-7fffaffc6000 r-xp 00000000 00:00 0 [vdso] ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall] 140905 10:43:21 [ERROR] mysqld got signal 6 ; 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 http://kb.askmonty.org/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.0.12-MariaDB-log key_buffer_size=402653184 read_buffer_size=2097152 max_used_connections=3 max_threads=153 thread_count=3 It is possible that mysqld could use up to key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 1023048 K bytes of memory Hope that's ok; if not, decrease some variables in the equation. Thread pointer: 0x0x7f3e2e8fb008 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 = 0x7f3e57d08e28 thread_stack 0x48000 addr2line: './bin/mysqld': No such file ./bin/mysqld(my_print_stacktrace+0x29)[0xa9a879] ./bin/mysqld(handle_fatal_signal+0x398)[0x6db6b8] /lib64/libpthread.so.0(+0x10170)[0x7f3e5aeff170] /lib64/libc.so.6(gsignal+0x35)[0x7f3e594f77b5] /lib64/libc.so.6(abort+0x172)[0x7f3e594f89f2] /lib64/libc.so.6(+0x77083)[0x7f3e59537083] /lib64/libc.so.6(__fortify_fail+0x37)[0x7f3e595bacef] /lib64/libc.so.6(+0xf8ed0)[0x7f3e595b8ed0] /lib64/libc.so.6(__vsprintf_chk+0x0)[0x7f3e595b8365] /lib64/libc.so.6(_IO_default_xsputn+0x77)[0x7f3e59539e7d] /lib64/libc.so.6(_IO_vfprintf+0x35c1)[0x7f3e5950b6c6] /lib64/libc.so.6(__vsprintf_chk+0x82)[0x7f3e595b83e7] /lib64/libc.so.6(__sprintf_chk+0x7d)[0x7f3e595b8351] /mariadb-10.0.12-gentoo/lib/plugin/ha_connect.so(_ZN10ha_connect10MakeRecordEPc+0x23c)[0x7f3e57d6b7dc] /mariadb-10.0.12-gentoo/lib/plugin/ha_connect.so(_ZN10ha_connect8rnd_nextEPh+0x15b)[0x7f3e57d6bb0b] ./bin/mysqld(_ZN7handler11ha_rnd_nextEPh+0x15c)[0x6df6cc] ./bin/mysqld(_Z13rr_sequentialP11READ_RECORD+0x20)[0x7bd1a0] ./bin/mysqld(_Z10sub_selectP4JOINP13st_join_tableb+0x161)[0x5d79c1] ./bin/mysqld[0x5e492d] ./bin/mysqld(_ZN4JOIN10exec_innerEv+0x998)[0x5f36c8] ./bin/mysqld(_ZN4JOIN4execEv+0x9)[0x5f5329] ./bin/mysqld(_Z12mysql_selectP3THDPPP4ItemP10TABLE_LISTjR4ListIS1_ES2_jP8st_orderSB_S2_SB_yP13select_resultP18st_select_lex_unitP13st_select_lex+0x118)[0x5f2018] ./bin/mysqld(_Z13handle_selectP3THDP3LEXP13select_resultm+0x254)[0x5f2a94] ./bin/mysqld[0x5a5104] ./bin/mysqld(_Z21mysql_execute_commandP3THD+0x5386)[0x5afd86] ./bin/mysqld(_Z11mysql_parseP3THDPcjP12Parser_state+0x1d8)[0x5b28b8] ./bin/mysqld(_Z16dispatch_command19enum_server_commandP3THDPcj+0x16f7)[0x5b44e7] ./bin/mysqld(_Z24do_handle_one_connectionP3THD+0x1e4)[0x65b544] ./bin/mysqld(handle_one_connection+0x38)[0x65b5a8] /lib64/libpthread.so.0(+0x8bd5)[0x7f3e5aef7bd5] /lib64/libc.so.6(clone+0x6d)[0x7f3e595a6d7d] Trying to get some variables. Some pointers may be invalid and cause the dump to abort. Query (0x7f3e1f420020): SELECT * FROM `helios_connect_produkty` LIMIT 0, 1000 Connection ID (thread ID): 4 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_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=on 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.
>>>>> This was done before you added your second comment. See more at the bottom <<<<<
The problem is that I am unable to reproduce the crash. Here is what I have done:
1) Downloading and installing SQL Server Express 2012.
2) Creating a "Czech" table on it by:
create table dbo.testutf ( col1 varchar(100) collate Czech_CI_AS not null, col2 varchar(100) collate Czech_CI_AS not null);
3) Fill a records with "Czech" characters:
insert into testutf values('cšeíu','truc');
4) Creating the CONNECT table to read it:
CREATE TABLE sample_product ( col1 varchar(100) NOT NULL, col2 varchar(100) NOT NULL ) ENGINE=CONNECT CHARSET=utf8 CONNECTION='DSN=ConnectEngineSQLServer' table_type=odbc srcdef='SELECT col1, col2 FROM dbo.testutf';
5) Read it:
select * from sample_product;
No crash but 2 warnings. The result:
| col1 | col2 |
|---|---|
| c | truc |
show warnings;
| Level | Code | Message |
|---|---|---|
| Warning | 1366 | Incorrect string value: '\x9Ae\xEDu' for column 'col1' at row 1 |
| Warning | 1105 | Out of range value c?e?u for column 'col1' at row 1 |
As a matter of facts, CONNECT does not do anything for charset conversion.
After reading a record, it just calls MariaDB to store column values in ha_connect::MakeRecord
line 1722:
rc= fp->store(p, strlen(p), charset, CHECK_FIELD_WARN);
It would be interresting to know where the crash actually occurs to decide whether
this is a CONNECT problem or not. The crash could also have other causes like
insufficent size of the columns.
If you are using a compiled version from source, perhaps are you able to run the
test in DEBUG mode (very easy on Windows with Visual Studio) and see exactly where
the crash occurs.
By the way:
Why are you using this strange and unnatural way to create the ODBC CONNECT table?
The normal way would be:
CREATE TABLE sample_product ( col1 varchar(100) NOT NULL, col2 varchar(100) NOT NULL ) ENGINE=CONNECT CHARSET=utf8 CONNECTION='DSN=ConnectEngineSQLServer' table_type=odbc tabname='testutf' dbname='dbo';
Could you try it and see if the same problems occur?
===========================
The crash backtrace you added probably shows that MariaDB found something wrong and issued one of its infamous DBUG_ASSERT!
I already had some discussion about this lazy and poor programming way of treating errors. Not only it causes the server to crash instead of just issue an error message but because they raise an exception, the trace does not show anything usable about the true place where it occurs but shows what happened after the exception. Generally a message appears on the console trace that tells where the assert occurs but to see it, the server must be started with the --console option. It is also possible that this error not to be a CONNECT error but occuring only because CONNECT does things that other engines are never doing.
Hi Olivier,
thank you for your analysis.
Yes, backtrace has been from mysqld running with "--console" flag.
I'm not familiar with Visual Studio, but .. do you think, that i'm able to help you with some logs from crash MariaDB compiled with debug mode (on Linux)?
Btw, when i replace (srcdef="select...") to (tabname="[lcs].[eshopdc_produkty]"), MariaDB also crashed. I preffer the select with exact-defined columns for situations, our supplier change a MSSQL table structure.
Stupid of me... I did not read carefully enough your backtrace.
The error comes when issuying the warning in MakeRecord using a buffer that was overrun.
If you are running from source, just change in ha_connect.cc two lines:
(1734) char buf[256]; (1737) sprintf(buf, "Out of range value %.140s for column '%s' at row %ld",
Thanks for your help in reporting and solving this.
After next testing .. this bug affects also Linux version of MariaDB 10.0.13 (tested with manully compiled version and also with installed by Gentoo Portage).
CONNECT engine is very great idea, but crash of whole MySQL instance is epic problem
But i hope, that after few months it will be stable, like an other MariaDB engines 
Thank you.