Bug #93504 Assertion failed: (false), function check_icu_status
Submitted: 6 Dec 2018 11:22 Modified: 2 Aug 2019 14:35
Reporter: Laurynas Biveinis (OCA) Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server Severity:S6 (Debug Builds)
Version:8.0.13 OS:Any
Assigned to: CPU Architecture:Any

[6 Dec 2018 11:22] Laurynas Biveinis
Description:
100%] main.regular_expressions_utf-8           [ fail ]
        Test ended at 2018-12-06 13:15:05

CURRENT_TEST: main.regular_expressions_utf-8
mysqltest: At line 41: Query 'SELECT regexp_instr( 'a', '[[:invalid_bracket_expression:]]' )' failed with wrong error 2013: 'Lost connection to MySQL server during query', should have failed with error '3685'.
...
Assertion failed: (false), function check_icu_status, file /Users/laurynas/percona/mysql-8.0/sql/regexp/errors.cc, line 88.
...
0   mysqld-debug                        0x000000010c7fe47a my_print_stacktrace(unsigned char*, unsigned long) + 250
1   mysqld-debug                        0x00000001086de858 handle_fatal_signal + 1848
2   libsystem_platform.dylib            0x00007fff581dbb3d _sigtramp + 29
3   mysqld-debug                        0x000000011e465b22 ___asan_globals_registered + 21920546
4   libsystem_c.dylib                   0x00007fff580991c9 abort + 127
5   libsystem_c.dylib                   0x00007fff58061868 basename_r + 0
6   mysqld-debug                        0x000000010752db36 regexp::check_icu_status(UErrorCode, UParseError const*) + 406
7   mysqld-debug                        0x000000010755d6f0 regexp::Regexp_engine::Regexp_engine(std::__1::basic_string<char16_t, std::__1::char_traits<char16_t>, std::__1::allocator<char16_t> > const&, unsigned int, int, int) + 2544
8   mysqld-debug                        0x00000001075566af std::__1::unique_ptr<regexp::Regexp_engine, Destroy_only<regexp::Regexp_engine> > make_unique_destroy_only<regexp::Regexp_engine, std::__1::basic_string<char16_t, std::__1::char_traits<char16_t>, std::__1::allocator<char16_t> >&, unsigned int&, int&, int&>(MEM_ROOT*, std::__1::basic_string<char16_t, std::__1::char_traits<char16_t>, std::__1::allocator<char16_t> >&&&, unsigned int&&&, int&&&, int&&&) + 303
9   mysqld-debug                        0x000000010755251b regexp::Regexp_facade::SetupEngine(Item*, unsigned int) + 1019
10  mysqld-debug                        0x0000000106ca6c07 Item_func_regexp::set_pattern() + 1351
11  mysqld-debug                        0x0000000106caa761 Item_func_regexp_instr::val_int() + 881
12  mysqld-debug                        0x0000000106873d4e Item::send(Protocol*, String*) + 4782
13  mysqld-debug                        0x00000001079937e7 THD::send_result_set_row(List<Item>*) + 759
14  mysqld-debug                        0x0000000107507397 Query_result_send::send_data(List<Item>&) + 951
15  mysqld-debug                        0x0000000107a74785 JOIN::exec() + 6549
16  mysqld-debug                        0x0000000107f9386d Sql_cmd_dml::execute_inner(THD*) + 845
17  mysqld-debug                        0x0000000107f90a81 Sql_cmd_dml::execute(THD*) + 7377
18  mysqld-debug                        0x0000000107d59e7d mysql_execute_command(THD*, bool) + 17533
19  mysqld-debug                        0x0000000107d4b132 mysql_parse(THD*, Parser_state*, bool) + 10162
20  mysqld-debug                        0x0000000107d39c26 dispatch_command(THD*, COM_DATA const*, enum_server_command) + 25510
21  mysqld-debug                        0x0000000107d44053 do_command(THD*) + 5155
22  mysqld-debug                        0x000000010863edf4 handle_connection(void*) + 916
23  mysqld-debug                        0x000000010e093982 pfs_spawn_thread(void*) + 898
24  libsystem_pthread.dylib             0x00007fff581e4305 _pthread_body + 126
25  libsystem_pthread.dylib             0x00007fff581e726f _pthread_start + 70
26  libsystem_pthread.dylib             0x00007fff581e3415 thread_start + 13

Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (60b000056598): SELECT regexp_instr( 'a', '[[:invalid_bracket_expression:]]' )
...

How to repeat:
Debug build (with full ASan/UBSan enabled too, but no Sanitizer errors in the output, thus likely not to be required)

$ ./mtr --debug-server --suite=main regular_expressions_utf-8
(several other testcases fail too, but I don't have their list handy)
[1 Aug 2019 13:37] MySQL Verification Team
Hi Laurynas,

I have build my debug server with ASAN enabled and I can't repeat what you report with 8.0.17:

Logging: ./mtr  --debug-server --suite=main regular_expressions_utf-8
MySQL Version 8.0.17
Checking supported features
 - Binaries are debug compiled
Collecting tests
Checking leftover processes
Removing old var directory
Creating var directory '/*************/mysql-8.0.17/mysql-test/var'
Installing system database
Using parallel: 1

==============================================================================
                  TEST NAME                       RESULT  TIME (ms) COMMENT
------------------------------------------------------------------------------
[100%] main.regular_expressions_utf-8            [ pass ]   6708
------------------------------------------------------------------------------
The servers were restarted 0 times
The servers were reinitialized 0 times
Spent 6.708 of 34 seconds executing testcases

Completed: All 1 tests were successful.
[2 Aug 2019 14:35] Laurynas Biveinis
I can no longer repeat it with 8.0.17 too
[2 Aug 2019 18:05] MySQL Verification Team
Thank you, Laurynas.