[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[dennou-ruby:003954] rb-grib での Segmentation fault



rb-grib 開発者さま: 京大気象学研究室 M2 の松葉です.

パッケージでインストールしたのですが,不具合に遭遇しましたのでご報告いたします.
rb-grib のバージョンは 0.3.0 で gem install rb-grib で取得したものです.
以下のようなスクリプトを実行すると,大量のエラーを吐かれてしまいます.

---------- ここからスクリプト ----------
require "rubygems"
require "numru/gphys"
include NumRu
GPhys::IO.use_rb_grib

#file = "2002/fnl_20021201_00_00.grib1"
#file = "2009/fnl_20091201_00_00.grib2"
file = 'fnl_20001201_00_00.grib1'
p varnames = GPhys::IO.var_names(file)
tmp = GPhys::IO.open(file, 'gh')
---------- ここまでスクリプト ----------

---------- ここからログ ----------
matsuba@studia05:~/error_script$ ruby test_varnames.rb 
["gh", "t", "w", "r", "absv", "id154", "id222", "u", "v", "t_pfgl", "r_pfgl", "q_pfgl", "u_pfgl", "v_pfgl", "t_has", "u_has", "v_has", "sp", "pwat", "r_ea", "gh_tropopause", "t_tropopause", "pres_tropopause", "id136", "id131", "id157_surface", "id156_surface", "id132", "id157_pfgl", "id156_pfgl", "gh_mw", "t_mw", "pres_mw", "orog", "msl", "r_sl", "pt", "t_sigma", "w_sigma", "r_sigma", "tco3", "u_tropopause", "u_mw", "u_sigma", "v_tropopause", "v_mw", "v_sigma", "t_surface", "id144", "t_dbll", "sf", "lsm", "icec", "2t", "q_hag", "id221", "tcc", "pres_level243", "pres_level242", "r_hag", "10u", "10v", "gpa", "id230"]
/var/lib/gems/2.1.0/gems/rb-grib-0.3.0/lib/numru/grib/grib.rb:110: [BUG] Segmentation fault at 0x00000000000008
ruby 2.1.5p273 (2014-11-13) [x86_64-linux-gnu]

-- Control frame information -----------------------------------------------
c:0008 p:---- s:0062 e:000061 CFUNC  :get_data
c:0007 p:0007 s:0059 e:000058 METHOD /var/lib/gems/2.1.0/gems/rb-grib-0.3.0/lib/numru/grib/grib.rb:110
c:0006 p:0132 s:0050 e:000049 METHOD /var/lib/gems/2.1.0/gems/rb-grib-0.3.0/lib/numru/grib/grib.rb:297 [FINISH]
c:0005 p:---- s:0035 e:000034 CFUNC  :var
c:0004 p:0076 s:0031 e:000030 METHOD /usr/lib/ruby/vendor_ruby/numru/gphys/gphys_grib_io.rb:85
c:0003 p:0056 s:0012 e:000011 METHOD /usr/lib/ruby/vendor_ruby/numru/gphys/gphys_io.rb:191
c:0002 p:0088 s:0007 E:001fa0 EVAL   test_varnames.rb:10 [FINISH]
c:0001 p:0000 s:0002 E:001de8 TOP    [FINISH]

-- Ruby level backtrace information ----------------------------------------
test_varnames.rb:10:in `<main>'
/usr/lib/ruby/vendor_ruby/numru/gphys/gphys_io.rb:191:in `open'
/usr/lib/ruby/vendor_ruby/numru/gphys/gphys_grib_io.rb:85:in `open'
/usr/lib/ruby/vendor_ruby/numru/gphys/gphys_grib_io.rb:85:in `var'
/var/lib/gems/2.1.0/gems/rb-grib-0.3.0/lib/numru/grib/grib.rb:297:in `init'
/var/lib/gems/2.1.0/gems/rb-grib-0.3.0/lib/numru/grib/grib.rb:110:in `get_xy'
/var/lib/gems/2.1.0/gems/rb-grib-0.3.0/lib/numru/grib/grib.rb:110:in `get_data'

-- C level backtrace information -------------------------------------------
/usr/lib/x86_64-linux-gnu/libruby-2.1.so.2.1(+0x18a837) [0x7f15dd23e837]
/usr/lib/x86_64-linux-gnu/libruby-2.1.so.2.1(+0x18a903) [0x7f15dd23e903]
/usr/lib/x86_64-linux-gnu/libruby-2.1.so.2.1(+0x6d563) [0x7f15dd121563] libioP.h:889
/usr/lib/x86_64-linux-gnu/libruby-2.1.so.2.1(rb_bug+0xb3) [0x7f15dd121bd3] swscanf.c:31
/usr/lib/x86_64-linux-gnu/libruby-2.1.so.2.1(+0x12144f) [0x7f15dd1d544f] ../sysdeps/x86_64/multiarch/strcmp-sse42.S:761
/lib/x86_64-linux-gnu/libpthread.so.0(+0xf8d0) [0x7f15dcea68d0] ../nptl/sysdeps/pthread/funlockfile.c:29
/var/lib/gems/2.1.0/extensions/x86_64-linux/2.1.0/rb-grib-0.3.0/numru/grib.so(+0x2356) [0x7f15d6e9a356] grib.c:750
/usr/lib/x86_64-linux-gnu/libruby-2.1.so.2.1(+0x174ee6) [0x7f15dd228ee6]
/usr/lib/x86_64-linux-gnu/libruby-2.1.so.2.1(+0x1856ad) [0x7f15dd2396ad]
/usr/lib/x86_64-linux-gnu/libruby-2.1.so.2.1(+0x17dd23) [0x7f15dd231d23]
/usr/lib/x86_64-linux-gnu/libruby-2.1.so.2.1(+0x1835ed) [0x7f15dd2375ed]
/usr/lib/x86_64-linux-gnu/libruby-2.1.so.2.1(+0x176fc3) [0x7f15dd22afc3]
/usr/lib/x86_64-linux-gnu/libruby-2.1.so.2.1(rb_funcall+0x22b) [0x7f15dd22c6ab]
/var/lib/gems/2.1.0/extensions/x86_64-linux/2.1.0/rb-grib-0.3.0/numru/grib.so(+0x1f75) [0x7f15d6e99f75] grib.c:529
/usr/lib/x86_64-linux-gnu/libruby-2.1.so.2.1(+0x174ee6) [0x7f15dd228ee6]
/usr/lib/x86_64-linux-gnu/libruby-2.1.so.2.1(+0x1856ad) [0x7f15dd2396ad]
/usr/lib/x86_64-linux-gnu/libruby-2.1.so.2.1(+0x17dd23) [0x7f15dd231d23]
/usr/lib/x86_64-linux-gnu/libruby-2.1.so.2.1(+0x1835ed) [0x7f15dd2375ed]
/usr/lib/x86_64-linux-gnu/libruby-2.1.so.2.1(rb_iseq_eval_main+0x7f) [0x7f15dd2393cf]
/usr/lib/x86_64-linux-gnu/libruby-2.1.so.2.1(+0x70c3f) [0x7f15dd124c3f] iofwide.c:135
/usr/lib/x86_64-linux-gnu/libruby-2.1.so.2.1(ruby_exec_node+0x1d) [0x7f15dd12660d] obprintf.c:151
/usr/lib/x86_64-linux-gnu/libruby-2.1.so.2.1(ruby_run_node+0x1e) [0x7f15dd12832e] fileops.c:774
ruby() [0x4008ab]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5) [0x7f15dc14eb45] libc-start.c:287
ruby() [0x4008d9]

-- Other runtime information -----------------------------------------------
---------- ここまでログ (以下,省略) ------------

​get_data で SEGV になっているのは分かるのですが,そこから先はちょっと分からないので,
お手数ですが,すこし調査してみていただけないでしょうか.​


--
松葉 史剛 (Fumitaka MATSUBA)
京都大学大学院 理学研究科 地球惑星科学専攻
地球物理学教室 気象学研究室 M2