hiroshi hatake
cosmo****@gmail*****
2015年 1月 9日 (金) 23:41:35 JST
畑ケです。
> ...
>> Visual Studio のデバッガで追って確認してみました。
>>
>> 手順)
>> 1. Visual Studioのデバッガでmysqldをアタッチ
>> 2. mysqlクライアントにshare\mroonga\install.sqlを食べさせる。
>>
>> すると、
>>
>>> 3964 ((o->flags & (PLUGIN_VAR_STR | PLUGIN_VAR_NOCMDOPT |
>>> 3965 PLUGIN_VAR_MEMALLOC)) == PLUGIN_VAR_STR))
>> の箇所ではなく、
>> その前の箇所の、
>>
>>> 3963 if (mysqld_server_started &&
>>> 3964 ((o->flags & (PLUGIN_VAR_STR | PLUGIN_VAR_NOCMDOPT |
>>> 3965 PLUGIN_VAR_MEMALLOC)) == PLUGIN_VAR_STR))
>>> 3966 {
>>> 3967 sysvar_str_t* str= (sysvar_str_t *)o;
>>> 3968 if (*str->value)
>>> 3969 *str->value= strdup_root(mem_root, *str->value);
>>> 3970 }
>> str->valueのチェックの、
>>
>>> 3968 if (*str->value)
>> のstrがNULLで落ちていました。必ずこのifに到達すると異常終了します。
> あ、そうなんですか。
>
> だったら、そのときのtmp->name.strの値はどうなっていますか?
> たぶん、Mroongaかしら。
---
tmp->name.strの値は
- tmp 0x01a59870 {name={str=0x74937990 "Mroonga" length=7 }
plugin=0x74943488 {ha_mroonga.dll!st_maria_plugin
_maria_plugin_declarations_[3]} {...} ...} st_plugin_int *
- name {str=0x74937990 "Mroonga" length=7 }
st_mysql_lex_string
- str 0x74937990 "Mroonga" char *
---
"Mroonga" です!
>
> でも、おかしいですねぇ。そのfor文で
>
> for (opt= tmp->plugin->system_vars; *opt; opt++)
> st_mysql_sys_var *o= *opt;
>
> としているので、oがNULLになることはない気がするんですよねぇ。
> *optもNULLになっていますか?
Visual StdioのC++コンパイラの最適化で消えていました…。
見られませんでした。。。
>
> あと、tmp->plugin->system_varsの中身ってみれます?
↓のようになりました!
---
- system_vars 0x749430a8 {ha_mroonga.dll!st_mysql_sys_var
*mrn_system_variables[17]} {0x74943354
{ha_mroonga.dll!<unnamed-type-mysql_sysvar_log_level>
mysql_sysvar_log_level} {...}} st_mysql_sys_var * *
- 0x74943354
{ha_mroonga.dll!<unnamed-type-mysql_sysvar_log_level>
mysql_sysvar_log_level} {flags=6 name=...} st_mysql_sys_var *
flags 6 int
+ name 0x1dc9bff8 "mroonga_log_level" const char *
+ comment 0x74937b28 "logging level" const char *
check 0x002b8d60
{mysqld.exe!check_func_enum(THD *, st_mysql_sys_var *, void *,
st_mysql_value *)} int (THD *, st_mysql_sys_var *, void *,
st_mysql_value *) *
update 0x74901500
{ha_mroonga.dll!mrn_log_level_update(THD *, st_mysql_sys_var *, void *,
const void *)} void (THD *, st_mysql_sys_var *, void *, const void *) *
---
>> ほか、tmp_root, tmp, argc, argvの異常終了した時点での値のダンプを添付
>> し ます。
> ありがとうございます。が、ここでは添付ファイルを使えないっぽ
> いのでどこかに貼ってもらえますか?
いつものようにDropboxに置きました。
https://dl.dropboxusercontent.com/u/36753409/Mroonga-4.09-crash-win/dump_variable.log
>> 他に役に立つかわからないですが、Ubuntuの場合も試してみたので報告します。
> ありがとうございます!
>
>> http://packages.groonga.org/nightly/mariadb-10.0.15-with-mroonga-4.09.2015.01.08.tar.gz
>> をUbuntu14.04.1 LTSでビルドし、share\mroonga\install.sqlを食べさせると、
>>
>> 今までwarningが出ていなかったと思いますが、
>> warningが出るようになってしまっています。
>>
>> ---
>> MariaDB [(none)]> source ../share/mroonga/install.sql
>> Query OK, 0 rows affected (0.00 sec)
>>
>> Query OK, 0 rows affected (0.01 sec)
>>
>> Query OK, 0 rows affected, 1 warning (0.00 sec)
>>
>> Query OK, 0 rows affected (0.00 sec)
>>
>> Query OK, 0 rows affected, 1 warning (0.00 sec)
>>
>> Query OK, 0 rows affected (0.00 sec)
>>
>> Query OK, 0 rows affected, 1 warning (0.00 sec)
>>
>> Query OK, 0 rows affected (0.00 sec)
>>
>> Query OK, 0 rows affected, 1 warning (0.00 sec)
>>
>> Query OK, 0 rows affected (0.00 sec)
>> ---
> warningの詳細も見せてもらえるとうれしいです。
> show warningsってやると見れるんだったかしら。
>
一つづつ試してみました。
試した結果です:
---
MariaDB [(none)]> DELETE IGNORE FROM mysql.plugin WHERE dl = 'ha_mroonga.so';
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> INSTALL PLUGIN Mroonga SONAME 'ha_mroonga.so';
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> DROP FUNCTION IF EXISTS last_insert_grn_id;
Query OK, 0 rows affected, 1 warning (0.00 sec)
MariaDB [(none)]> CREATE FUNCTION last_insert_grn_id RETURNS INTEGER
-> SONAME 'ha_mroonga.so';
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> show warnings;
+-------+------+--------------------------------------------------+
| Level | Code | Message |
+-------+------+--------------------------------------------------+
| Note | 1305 | FUNCTION (UDF) last_insert_grn_id does not exist |
+-------+------+--------------------------------------------------+
1 row in set (0.00 sec)
MariaDB [(none)]> DROP FUNCTION IF EXISTS mroonga_snippet;
Query OK, 0 rows affected, 1 warning (0.00 sec)
MariaDB [(none)]> CREATE FUNCTION mroonga_snippet RETURNS STRING
-> SONAME 'ha_mroonga.so';
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> show warnings; +-------+------+-----------------------------------------------+
| Level | Code | Message |
+-------+------+-----------------------------------------------+
| Note | 1305 | FUNCTION (UDF) mroonga_snippet does not exist |
+-------+------+-----------------------------------------------+
1 row in set (0.00 sec)
MariaDB [(none)]> DROP FUNCTION IF EXISTS mroonga_command;
Query OK, 0 rows affected, 1 warning (0.00 sec)
MariaDB [(none)]> CREATE FUNCTION mroonga_command RETURNS STRING
-> SONAME 'ha_mroonga.so';
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> show warnings;
+-------+------+-----------------------------------------------+
| Level | Code | Message |
+-------+------+-----------------------------------------------+
| Note | 1305 | FUNCTION (UDF) mroonga_command does not exist |
+-------+------+-----------------------------------------------+
1 row in set (0.00 sec)
MariaDB [(none)]> DROP FUNCTION IF EXISTS mroonga_escape;
Query OK, 0 rows affected, 1 warning (0.00 sec)
MariaDB [(none)]> CREATE FUNCTION mroonga_escape RETURNS STRING
-> SONAME 'ha_mroonga.so';
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> show warnings;
+-------+------+----------------------------------------------+
| Level | Code | Message |
+-------+------+----------------------------------------------+
| Note | 1305 | FUNCTION (UDF) mroonga_escape does not exist |
+-------+------+----------------------------------------------+
1 row in set (0.00 sec)
# 全然関係ないですが、MariaDB 10.0.15 with Mroonga 4.09に含まれているGroongaは4.0.9でしたっけ。。