From: Kazunori NISHI Date: 1998-11-10T13:28:03+09:00 Subject: [ruby-list:10758] Re: ruby 1.1c7 released 西@九大です。 From: matz@netlab.co.jp (Yukihiro Matsumoto) > サブジェクトの通りです.1ヵ月ぶりですね. [BUG] Segmentation fault になってしまいました。 File#read の所で落ちているようです。 ---------------------------------------------------------------------- (crest)<~/.html/news>% ./DiaryThread8.rb ./DiaryThread8.rb:124: [BUG] Segmentation fault zsh: IOT instruction (core dumped) ./DiaryThread8.rb (crest)<~/.html/news>% cat -n DiaryThread8.rb | grep -B1 124 123 data_file = File .open(DATA_FILE, "r") 124 buffer = data_file .read ---------------------------------------------------------------------- この部分は単にファイルを読み込んでいるだけですので、ここの前の部分 (thread を作って socket 通信している)との絡みで生じている気がします。 1.1c6 までは動作していました。OS は Solaris2.6 です。 とりあえず、デバッガによるバックトレースを添付します。 必要であれば、同スクリプトをメールで送ります。 よろしくお願いします。 ------------------------------------------------------------------ 九州大学大学院システム情報科学研究科 情報工学専攻 博士後期課程二年 西 和則 ( e-mail: kazunori@swlab.csce.kyushu-u.ac.jp ) ------------------------------------------------------------------ (crest)<~/.html/news>% gdb /usr/local/bin/ruby-1.1c7 core GNU gdb 4.17 Copyright 1998 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "sparc-sun-solaris2.6"... warning: core file may not match specified executable file. Core was generated by `/usr/local/bin/ruby-1.1c7 ./DiaryThread8.rb'. Program terminated with signal 6, Abort. Reading symbols from /usr/lib/libdl.so.1...done. Reading symbols from /usr/lib/libm.so.1...done. Reading symbols from /usr/lib/libc.so.1...done. Reading symbols from /usr/platform/SUNW,Ultra-1/lib/libc_psr.so.1...done. Reading symbols from /usr/local/lib/ruby/sparc-solaris2.6/socket.so...done. Reading symbols from /usr/lib/libsocket.so.1...done. Reading symbols from /usr/lib/libnsl.so.1...done. Reading symbols from /usr/lib/libmp.so.2...done. Reading symbols from /usr/local/lib/ruby/sparc-solaris2.6/kconv.so...done. #0 0xef707fe4 in _kill () (gdb) bt #0 0xef707fe4 in _kill () #1 0xef6ba508 in abort () #2 0x64da8 in Bug (fmt=0x754c0 "Segmentation fault") at error.c:157 #3 0x501a8 in sigsegv (sig=11) at signal.c:332 #4 #5 0xef6c5b60 in _malloc_unlocked () #6 0xef6c5e60 in realloc () #7 0x29784 in xrealloc (ptr=0xfced8, size=6401) at gc.c:100 #8 0x53744 in str_resize (str=689784, len=6400) at string.c:423 #9 0x2d730 in read_all (port=1041912) at io.c:403 #10 0x2d77c in io_read (argc=0, argv=0x0, io=689808) at io.c:418 #11 0x20798 in rb_call0 (klass=777624, recv=689808, id=6449, argc=0, argv=0x0, body=0xbd8a0, nosuper=0) at eval.c:3386 #12 0x212bc in rb_call (klass=777624, recv=689808, mid=6449, argc=0, argv=0x0, scope=0) at eval.c:3653 #13 0x1d04c in rb_eval (self=815208, node=0xb55f0) at eval.c:2001 #14 0x1cccc in rb_eval (self=815208, node=0xb5590) at eval.c:1979 #15 0x1cccc in rb_eval (self=815208, node=0xb5530) at eval.c:1979 #16 0x1cccc in rb_eval (self=815208, node=0xb54d0) at eval.c:1979 #17 0x1d93c in rb_eval (self=815208, node=0xb5620) at eval.c:2134 #18 0x1be48 in rb_eval (self=815208, node=0xb54a0) at eval.c:1610 #19 0x1a734 in eval_node (self=815208) at eval.c:919 #20 0x1a7ec in ruby_run () at eval.c:949 #21 0x195f8 in main (argc=2, argv=0xeffff7d4, envp=0xeffff7e0) at main.c:32 (gdb)