[MDEV-12433] MariaRocks: rocksdb.collation crashes because of gcc bug. Created: 2017-04-03  Updated: 2021-11-29

Status: Open
Project: MariaDB Server
Component/s: Storage Engine - RocksDB, Tests
Affects Version/s: 10.2
Fix Version/s: 10.4

Type: Bug Priority: Major
Reporter: Sergei Petrunia Assignee: Sergei Petrunia
Resolution: Unresolved Votes: 0
Labels: None

Issue Links:
PartOf
is part of MDEV-9658 Make MyRocks in MariaDB stable Closed

 Description   

This is not the same issue as MDEV-12280.

It crashes like this:
http://buildbot.askmonty.org/buildbot/builders/kvm-bintar-trusty-amd64/builds/672/steps/test/logs/stdio

rocksdb.collation                        w3 [ fail ]
        Test ended at 2017-04-03 08:21:53
 
CURRENT_TEST: rocksdb.collation
mysqltest: At line 82: query 'SET GLOBAL rocksdb_strict_collation_exceptions=",s.*,t.*"' failed: 2013: Lost connection to MySQL server during query

...

 
Thread pointer: 0x7f10c80009a8
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 = 0x7f10e8322e40 thread_stack 0x49000
/usr/local/mariadb-10.2.5-linux-x86_64/bin/mysqld(my_print_stacktrace+0x2e)[0x7f10ef6e188e]
/usr/local/mariadb-10.2.5-linux-x86_64/bin/mysqld(handle_fatal_signal+0x30d)[0x7f10ef1312dd]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x10330)[0x7f10ee062330]
/usr/local/mariadb-10.2.5-linux-x86_64/lib/plugin/ha_rocksdb.so(_ZNSt8__detail9_CompilerIN9__gnu_cxx17__normal_iteratorIPKcSsEESt12regex_traitsIcEE14_M_disjunctionEv+0x213)[0x7f10e3affb63]
/usr/local/mariadb-10.2.5-linux-x86_64/lib/plugin/ha_rocksdb.so(_ZNSt8__detail9_CompilerIN9__gnu_cxx17__normal_iteratorIPKcSsEESt12regex_traitsIcEEC2ERKS5_SA_RS7_j+0x2a2)[0x7f10e3afff92]
/usr/local/mariadb-10.2.5-linux-x86_64/lib/plugin/ha_rocksdb.so(_ZNSt8__detail9__compileIN9__gnu_cxx17__normal_iteratorIPKcSsEESt12regex_traitsIcEEESt10shared_ptrINS_10_AutomatonEERKT_SD_RT0_j+0x31)[0x7f10e3b00511]
/usr/local/mariadb-10.2.5-linux-x86_64/lib/plugin/ha_rocksdb.so(_ZN18Regex_list_handler12set_patternsERKSs+0x13f)[0x7f10e3af922f]
/usr/local/mariadb-10.2.5-linux-x86_64/lib/plugin/ha_rocksdb.so(+0x18b415)[0x7f10e3b03415]
/usr/local/mariadb-10.2.5-linux-x86_64/bin/mysqld(_ZN17sys_var_pluginvar13global_updateEP3THDP7set_var+0x3e)[0x7f10eefb985e]
/usr/local/mariadb-10.2.5-linux-x86_64/bin/mysqld(_ZN7sys_var6updateEP3THDP7set_var+0x65)[0x7f10eef2c5b5]
/usr/local/mariadb-10.2.5-linux-x86_64/bin/mysqld(_ZN7set_var6updateEP3THD+0x17)[0x7f10eef2ca97]
/usr/local/mariadb-10.2.5-linux-x86_64/bin/mysqld(_Z17sql_set_variablesP3THDP4ListI12set_var_baseEb+0x89)[0x7f10eef2db39]
/usr/local/mariadb-10.2.5-linux-x86_64/bin/mysqld(_Z21mysql_execute_commandP3THD+0x609d)[0x7f10eefad01d]
/usr/local/mariadb-10.2.5-linux-x86_64/bin/mysqld(_Z11mysql_parseP3THDPcjP12Parser_statebb+0x2bd)[0x7f10eefb009d]
/usr/local/mariadb-10.2.5-linux-x86_64/bin/mysqld(_Z16dispatch_command19enum_server_commandP3THDPcjbb+0x21c0)[0x7f10eefb30d0]
/usr/local/mariadb-10.2.5-linux-x86_64/bin/mysqld(_Z10do_commandP3THD+0x161)[0x7f10eefb3a11]
/usr/local/mariadb-10.2.5-linux-x86_64/bin/mysqld(_Z24do_handle_one_connectionP7CONNECT+0x1aa)[0x7f10ef0744aa]
/usr/local/mariadb-10.2.5-linux-x86_64/bin/mysqld(handle_one_connection+0x3d)[0x7f10ef0745cd]
/usr/local/mariadb-10.2.5-linux-x86_64/bin/mysqld(+0x80cdcd)[0x7f10ef2e0dcd]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x8182)[0x7f10ee05a182]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x6d)[0x7f10ed576b2d]
 
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (0x7f10c800ef90): SET GLOBAL rocksdb_strict_collation_exceptions=",s.*,t.*"
Connection ID (thread ID): 4

This is because of GCC.
The upstream solves it as follows: collation.test has --source include/have_fullregex.inc
which has this contents:

# Skip test if we didn't compile with a compiler that supports full regex
# Currently only gcc is tested (gcc 4.9 is the first version to support full
# regex).  All other compilers are assumed to support it.
# Add further checks as we get information on these compilers
 
--disable_query_log
set @comp_version = @@version_compile_compiler_major * 100 +
                    @@version_compile_compiler_minor;
set @is_gnu = STRCMP(@@version_compile_compiler, "GNU") = 0;
--enable_query_log
if (`SELECT IF (@is_gnu, IF (@comp_version > 408, 1, 0), 1) = 0`)
{
  --skip Test requires full regex (not supported in gcc 4.8 and prior)
}

  • MariaDB doesn't have @@version_compile_XXX variables, so we can't re-use this approach directly.
  • We can disable MyRocks on gcc-4.8, but this seems like an overkill.
  • Or we could disable the query.

Not sure which one is better.



 Comments   
Comment by Sergei Petrunia [ 2017-04-03 ]

This is not about just one query. First 80 lines of the test pass, but the rest 110 lines are all crashes or failures.

Comment by Laurynas Biveinis [ 2017-04-03 ]

FWIW in Percona Server we migrated from std::regex to my_regex because of GCC 4.8. I can dig up the commits if you wish

Comment by Sergei Petrunia [ 2018-04-19 ]

At the moment the test is disabled for all platforms.

Generated at Thu Feb 08 07:57:40 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.