[groonga-dev,00102] Re: Ruby/groongaにてDatabaseをopenするとSegmentation faultする

Back to archive index

SHIDARA Yoji daras****@gmail*****
2009年 7月 1日 (水) 00:26:15 JST


daraです。

> なんと。手元では解決したのですが。。。
>
> groongaを-O0 -gでビルドして、gdbでバックトレースをとってもらっ
> てもよいですか?

手順の通りやってみました。結果は以下の通りです。(Ubuntu 9.04)

dara @ mint:~/tmp$ gdb --args ruby -rgroonga -e "Groonga::Database.open('testdb')"
GNU gdb 6.8-debian
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu"...
(no debugging symbols found)
(gdb) r
Starting program: /usr/bin/ruby -rgroonga -e
Groonga::Database.open\(\'testdb\'\)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[New Thread 0x7f013d5cb6f0 (LWP 18544)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7f013d5cb6f0 (LWP 18544)]
0x00007f013bfa1dd5 in grn_tiny_array_at (a=0x68, id=1014827616) at hash.c:59
59	  GRN_TINY_ARRAY_AT(a, id, e);
(gdb) bt
#0  0x00007f013bfa1dd5 in grn_tiny_array_at (a=0x68, id=1014827616) at hash.c:59
#1  0x00007f013bfc8d0c in grn_obj_delete_by_id (ctx=0x26a0800, db=0x0,
id=1014827616, removep=0)
    at db.c:3573
#2  0x00007f013bfca3df in grn_obj_close (ctx=0x26a0800, obj=0x26a0950)
at db.c:3803
#3  0x00007f013c2588c5 in rb_grn_object_unbind (rb_grn_object=0x26e9c60)
    at /home/dara/local/src/ruby-groonga/ext/rb-grn-object.c:98
#4  0x00007f013c258157 in rb_grn_object_free (object=0x68)
    at /home/dara/local/src/ruby-groonga/ext/rb-grn-object.c:113
#5  0x00007f013d1046f6 in rb_gc_call_finalizer_at_exit () from
/usr/lib/libruby1.8.so.1.8
#6  0x00007f013d0e88f3 in ?? () from /usr/lib/libruby1.8.so.1.8
#7  0x00007f013d0f6755 in ruby_cleanup () from /usr/lib/libruby1.8.so.1.8
#8  0x00007f013d0f6849 in ruby_stop () from /usr/lib/libruby1.8.so.1.8
#9  0x00007f013d0fde33 in ruby_run () from /usr/lib/libruby1.8.so.1.8
#10 0x00000000004008e3 in main ()
(gdb)


ちなみに、前回のメールは debian lennyのほうで試したのですが、
その環境ではgdbから起動すると正常終了してしまい
バックトレースが取れませんでした。
gdbが
Starting program: /usr/bin/ruby -rgroonga -e
Groonga::Database.open\(\'testdb\'\)
としており、/usr/bin/ruby として起動すると正常終了するようでした。
こういうことがおきました:

dara @ buzztter:~/tmp$ which ruby
/usr/bin/ruby
dara @ buzztter:~/tmp$ ruby -rgroonga -e "Groonga::Database.open('testdb')"
-e:1: [BUG] Segmentation fault
ruby 1.8.7 (2008-08-11 patchlevel 72) [x86_64-linux]

アボートしました
dara @ buzztter:~/tmp$ /usr/bin/ruby -rgroonga -e
"Groonga::Database.open('testdb')"
dara @ buzztter:~/tmp$ ruby1.8 -rgroonga -e "Groonga::Database.open('testdb')"
dara @ buzztter:~/tmp$ ls -la /usr/bin/ruby
lrwxrwxrwx 1 root root 7 2008-05-11 00:05 /usr/bin/ruby -> ruby1.8


お役に立つ情報がありましたでしょうか。
他にも何か必要でしたらお知らせください。

-- 
SHIDARA Yoji




groonga-dev メーリングリストの案内
Back to archive index