Skip to content

Instantly share code, notes, and snippets.

@yoku0825
Created July 29, 2014 03:26
Show Gist options
  • Save yoku0825/68fb018380c8d5e07590 to your computer and use it in GitHub Desktop.
Save yoku0825/68fb018380c8d5e07590 to your computer and use it in GitHub Desktop.
groonga-normalizer-mysql 1.0.6 crash
(gdb) bt
#0 grn_nfkc_char_type (str=0x7f7a87ffcba6 <Address 0x7f7a87ffcba6 out of bounds>) at nfkc.c:31
#1 0x00007f7a8e9e4943 in normalize () from /usr/groonga/4.0.2/lib/groonga/plugins/normalizers/mysql.so
#2 0x00007f7a8e9e50a0 in mysql_unicode_ci_except_kana_ci_kana_with_voiced_sound_mark_next ()
from /usr/groonga/4.0.2/lib/groonga/plugins/normalizers/mysql.so
#3 0x00007f7ad0e0f826 in grn_proc_call (ctx=0x7f7a8802fa68, proc=0x7f7a88346010, nargs=1, caller=<value optimized out>)
at expr.c:1808
#4 0x00007f7ad0f2c3fe in grn_normalizer_normalize (ctx=0x7f7a8802fa68, normalizer=0x7f7a88346010,
string=<value optimized out>) at normalizer.c:1168
#5 0x00007f7ad0f73cd3 in grn_string_open_ (ctx=0x7f7a8802fa68, str=0x7f7aa4150a88 "???'", str_len=<value optimized out>,
normalizer=0x7f7a88346010, flags=<value optimized out>, encoding=<value optimized out>) at string.c:172
#6 0x00007f7ad0f76780 in grn_tokenizer_query_open (ctx=0x7f7a8802fa68, num_args=<value optimized out>,
args=<value optimized out>, normalize_flags=11) at tokenizer.c:151
#7 0x00007f7ad0f74741 in ngram_init (ctx=0x7f7a8802fa68, nargs=<value optimized out>, args=<value optimized out>,
user_data=0x7f7a8801ed80, ngram_unit=<value optimized out>, uni_alpha=<value optimized out>, uni_digit=1 '\001',
uni_symbol=1 '\001', ignore_blank=1 '\001') at token.c:273
#8 0x00007f7ad0f74a4c in bigrami_init (ctx=<value optimized out>, nargs=<value optimized out>, args=<value optimized out>,
user_data=<value optimized out>) at token.c:335
#9 0x00007f7ad0f75d9a in grn_token_open (ctx=0x7f7a8802fa68, table=0x7f7a8832b9e0, str=<value optimized out>,
str_len=<value optimized out>, mode=GRN_TOKEN_GET, flags=1) at token.c:534
#10 0x00007f7ad0ed957f in token_info_build (ctx=0x7f7a8802fa68, ii=0x7f7a8832bdb0, string=0x7f7aa4150a88 "???'",
string_len=7, s=0x7f7a883731e0, op=GRN_OP_OR, optarg=0x7f7aa41509c0) at ii.c:5326
#11 grn_ii_select (ctx=0x7f7a8802fa68, ii=0x7f7a8832bdb0, string=0x7f7aa4150a88 "???'", string_len=7, s=0x7f7a883731e0,
op=GRN_OP_OR, optarg=0x7f7aa41509c0) at ii.c:5845
#12 0x00007f7ad0eda1d4 in grn_ii_sel (ctx=0x7f7a8802fa68, ii=0x7f7a8832bdb0, string=0x7f7aa4150a88 "???'", string_len=7,
s=0x7f7a883731e0, op=GRN_OP_OR, optarg=0x7f7aa4150be0) at ii.c:6015
#13 0x00007f7ad0e090c0 in grn_obj_search_column_index_by_key (ctx=0x7f7a8802fa68, obj=0x7f7a8832bdb0, query=0x7f7a88b06430,
res=0x7f7a883731e0, op=GRN_OP_OR, optarg=0x7f7aa4150be0) at db.c:2881
#14 grn_obj_search_column_index (ctx=0x7f7a8802fa68, obj=0x7f7a8832bdb0, query=0x7f7a88b06430, res=0x7f7a883731e0,
op=GRN_OP_OR, optarg=0x7f7aa4150be0) at db.c:2906
#15 grn_obj_search (ctx=0x7f7a8802fa68, obj=0x7f7a8832bdb0, query=0x7f7a88b06430, res=0x7f7a883731e0, op=GRN_OP_OR,
optarg=0x7f7aa4150be0) at db.c:2942
#16 0x00007f7ad0e1e78d in grn_table_select_index (ctx=0x7f7a8802fa68, table=0x7f7a8832c880, expr=0x7f7a88373840,
res=0x7f7a883731e0, op=<value optimized out>) at expr.c:5131
#17 grn_table_select (ctx=0x7f7a8802fa68, table=0x7f7a8832c880, expr=0x7f7a88373840, res=0x7f7a883731e0,
op=<value optimized out>) at expr.c:5267
#18 0x00007f7ad12012bb in ha_mroonga::generic_ft_init_ext_select (this=<value optimized out>, flags=3,
key_nr=<value optimized out>, key=0x6e3a70) at ha_mroonga.cpp:7925
#19 0x00007f7ad1201446 in ha_mroonga::generic_ft_init_ext (this=0x7f7a8802e910, flags=3, key_nr=1, key=0x7f7a88006238)
at ha_mroonga.cpp:7961
#20 0x00007f7ad1201609 in ha_mroonga::storage_ft_init_ext (this=<value optimized out>, flags=<value optimized out>,
key_nr=<value optimized out>, key=<value optimized out>) at ha_mroonga.cpp:8008
#21 0x00000000005ef784 in Item_func_match::init_search (this=0x7f7a88006110, no_order=false)
at /home/yoku0825/mysql-5.6.19/sql/item_func.cc:6192
#22 0x00000000006808e8 in init_ftfuncs (thd=<value optimized out>, select_lex=<value optimized out>, no_order=false)
at /home/yoku0825/mysql-5.6.19/sql/sql_base.cc:9271
#23 0x000000000084b7b4 in JOIN::optimize (this=0x7f7a88004fd8) at /home/yoku0825/mysql-5.6.19/sql/sql_optimizer.cc:747
#24 0x00000000006f898d in mysql_execute_select (thd=0x3f4d2e0, tables=0x7f7a880052f8, wild_num=1,
fields=<value optimized out>, conds=0x7f7a88006110, order=<value optimized out>, group=0x3f4fc20, having=0x0,
select_options=2147748608, result=0x7f7a88006308, unit=0x3f4f4d8, select_lex=0x3f4fb20)
at /home/yoku0825/mysql-5.6.19/sql/sql_select.cc:1086
#25 mysql_select (thd=0x3f4d2e0, tables=0x7f7a880052f8, wild_num=1, fields=<value optimized out>, conds=0x7f7a88006110,
order=<value optimized out>, group=0x3f4fc20, having=0x0, select_options=2147748608, result=0x7f7a88006308,
unit=0x3f4f4d8, select_lex=0x3f4fb20) at /home/yoku0825/mysql-5.6.19/sql/sql_select.cc:1221
#26 0x00000000006f92cf in handle_select (thd=0x3f4d2e0, result=0x7f7a88006308, setup_tables_done_option=0)
at /home/yoku0825/mysql-5.6.19/sql/sql_select.cc:110
#27 0x00000000006d3145 in execute_sqlcom_select (thd=0x3f4d2e0, all_tables=0x7f7a880052f8)
at /home/yoku0825/mysql-5.6.19/sql/sql_parse.cc:5105
#28 0x00000000006d8162 in mysql_execute_command (thd=0x3f4d2e0) at /home/yoku0825/mysql-5.6.19/sql/sql_parse.cc:2651
#29 0x00000000006da937 in mysql_parse (thd=0x3f4d2e0, rawbuf=<value optimized out>, length=<value optimized out>,
parser_state=<value optimized out>) at /home/yoku0825/mysql-5.6.19/sql/sql_parse.cc:6247
#30 0x00000000006dc2ec in dispatch_command (command=COM_QUERY, thd=0x3f4d2e0, packet=0x7f7aa4152af0 "\340\322\364\003",
packet_length=116) at /home/yoku0825/mysql-5.6.19/sql/sql_parse.cc:1334
#31 0x00000000006a45ad in do_handle_one_connection (thd_arg=<value optimized out>)
at /home/yoku0825/mysql-5.6.19/sql/sql_connect.cc:982
#32 0x00000000006a46e2 in handle_one_connection (arg=0x3f4d2e0) at /home/yoku0825/mysql-5.6.19/sql/sql_connect.cc:898
#33 0x0000000000976687 in pfs_spawn_thread (arg=0x3fa4e10) at /home/yoku0825/mysql-5.6.19/storage/perfschema/pfs.cc:1860
#34 0x0000003eb4807851 in start_thread () from /lib64/libpthread.so.0
#35 0x0000003eb40e894d in clone () from /lib64/libc.so.6
(gdb) p thd->query_string->string->str
$1 = 0x7f7a88005040 "SELECT * FROM t1 WHERE match(val) against (concat('*D+ ', 0xd6, 0xbc, 0xde, 0xac, 0xc9, 0x93, 0x27) IN BOOLEAN MODE)"
mysql56> show create table t1\G
*************************** 1. row ***************************
Table: t1
Create Table: CREATE TABLE `t1` (
`num` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`val` varchar(32) DEFAULT NULL,
UNIQUE KEY `num` (`num`),
FULLTEXT KEY `val` (`val`) COMMENT 'parser "TokenBigramIgnoreBlank", normalizer "NormalizerMySQLUnicodeCIExceptKanaCIKanaWithVoicedSoundMark"'
) ENGINE=mroonga AUTO_INCREMENT=3 DEFAULT CHARSET=utf8
1 row in set (0.29 sec)
mysql56> SELECT * FROM t1;
+-----+-----------------+
| num | val |
+-----+-----------------+
| 2 | AMERICAN RAGCIE |
+-----+-----------------+
1 row in set (0.04 sec)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment