2014-01-31 65 views
0

我在執行無限循環中的功能的debian linux上執行控制器。除此之外,我正在使用Rufus Scheduler來安排一個在特定時間段後運行的功能,比如說1分鐘。一旦功能執行魯弗斯正確,我得到以下錯誤Rufus調度程序中拋出Ruby代碼異常

/usr/local/rvm/gems/ruby-2.1.0/gems/rufus-scheduler-3.0.4/lib/rufus/scheduler.rb:505: [BUG] Segmentation fault at 0x00000000000000 
    ruby 2.1.0p0 (2013-12-25 revision 44422) [x86_64-linux] 

    -- Control frame information ----------------------------------------------- 
    c:0003 p:---- s:0008 e:000007 CFUNC :sleep 
    c:0002 p:0041 s:0004 e:000003 BLOCK /usr/local/rvm/gems/ruby-2.1.0/gems/rufus-scheduler-3.0.4/lib/rufus/scheduler.rb:505 [FINISH] 
    c:0001 p:---- s:0002 e:000001 TOP [FINISH] 

    /usr/local/rvm/gems/ruby-2.1.0/gems/rufus-scheduler-3.0.4/lib/rufus/scheduler.rb:505:in `block in start' 
    /usr/local/rvm/gems/ruby-2.1.0/gems/rufus-scheduler-3.0.4/lib/rufus/scheduler.rb:505:in `sleep' 

    -- C level backtrace information ------------------------------------------- 
    /usr/local/rvm/rubies/ruby-2.1.0/lib/libruby.so.2.1(+0x1b8bba) [0x2b1903679bba] vm_dump.c:685 
    /usr/local/rvm/rubies/ruby-2.1.0/lib/libruby.so.2.1(+0x7414c) [0x2b190353514c] error.c:307 
    /usr/local/rvm/rubies/ruby-2.1.0/lib/libruby.so.2.1(rb_bug+0xb8) [0x2b1903535458] error.c:334 
    /usr/local/rvm/rubies/ruby-2.1.0/lib/libruby.so.2.1(+0x13be39) [0x2b19035fce39] signal.c:704 
    /lib/libpthread.so.0(+0xeff0) [0x2b190396cff0] 
    /usr/lib/libsybdb.so.5(+0x16a05) [0x2b1908457a05] 
    /usr/lib/libsybdb.so.5(+0x3cdcb) [0x2b190847ddcb] 
    /usr/lib/libsybdb.so.5(+0x3d5f1) [0x2b190847e5f1] 
    /usr/lib/libsybdb.so.5(+0x3d70b) [0x2b190847e70b] 
    /usr/lib/libsybdb.so.5(+0x2909e) [0x2b190846a09e] 
    /usr/lib/libsybdb.so.5(+0x290c9) [0x2b190846a0c9] 
    /usr/lib/libsybdb.so.5(dbsqlok+0x85) [0x2b1908451a15] 
    /usr/local/rvm/gems/ruby-2.1.0/extensions/x86_64-linux/2.1.0/tiny_tds-0.6.1/tiny_tds/tiny_tds.so(+0x44f1) [0x2b1907ff24f1] result.c:89 
    /usr/local/rvm/rubies/ruby-2.1.0/lib/libruby.so.2.1(+0x1c73c2) [0x2b19036883c2] thread.c:1263 
    /usr/local/rvm/gems/ruby-2.1.0/extensions/x86_64-linux/2.1.0/tiny_tds-0.6.1/tiny_tds /tiny_tds.so(+0x5966) [0x2b1907ff3966] result.c:133 
    /usr/local/rvm/rubies/ruby-2.1.0/lib/libruby.so.2.1(+0x1a1c9a) [0x2b1903662c9a] vm_insnhelper.c:1468 
/usr/local/rvm/rubies/ruby-2.1.0/lib/libruby.so.2.1(+0x1a5a01) [0x2b1903666a01] insns.def:1028 
    /usr/local/rvm/rubies/ruby-2.1.0/lib/libruby.so.2.1(+0x1ab38c) [0x2b190366c38c] vm.c:1304 
    /usr/local/rvm/rubies/ruby-2.1.0/lib/libruby.so.2.1(+0x1b01bb) [0x2b19036711bb] vm.c:732 
    /usr/local/rvm/rubies/ruby-2.1.0/lib/libruby.so.2.1(rb_rescue2+0x113) [0x2b1903539443] eval.c:751 
    /usr/local/rvm/rubies/ruby-2.1.0/lib/libruby.so.2.1(+0x19e49e) [0x2b190365f49e] vm_eval.c:1042 
/usr/local/rvm/rubies/ruby-2.1.0/lib/libruby.so.2.1(+0x1a1c9a) [0x2b1903662c9a] vm_insnhelper.c:1468 
/usr/local/rvm/rubies/ruby-2.1.0/lib/libruby.so.2.1(+0x1b6a20) [0x2b1903677a20] vm_insnhelper.c:1558 
/usr/local/rvm/rubies/ruby-2.1.0/lib/libruby.so.2.1(+0x1a61a7) [0x2b19036671a7] insns.def:999 
/usr/local/rvm/rubies/ruby-2.1.0/lib/libruby.so.2.1(+0x1ab38c) [0x2b190366c38c] vm.c:1304 
/usr/local/rvm/rubies/ruby-2.1.0/lib/libruby.so.2.1(rb_iseq_eval_main+0x300) [0x2b190366c9b0] vm.c:1562 
/usr/local/rvm/rubies/ruby-2.1.0/lib/libruby.so.2.1(+0x78a4a) [0x2b1903539a4a] eval.c:253 
/usr/local/rvm/rubies/ruby-2.1.0/lib/libruby.so.2.1(ruby_exec_node+0x1d) [0x2b1903539a7d] eval.c:318 
/usr/local/rvm/rubies/ruby-2.1.0/lib/libruby.so.2.1(ruby_run_node+0x1e) [0x2b190353b2fe] eval.c:310 
ruby() [0x40098b] 
/lib/libc.so.6(__libc_start_main+0xfd) [0x2b190445fc8d] 
ruby() [0x400879] 

回答

1

這是一個的被從機庫引發的異常,不紅寶石本身。它看起來像的根本原因可能是在tiny_tds寶石你使用:

/usr/local/rvm/gems/ruby-2.1.0/extensions/x86_64-linux/2.1.0/tiny_tds-0.6.1/tiny_tds/tiny_tds.so(+0x44f1) [0x2b1907ff24f1] result.c:89 

你試過升級到tiny_tds更高版本,看看問題是否仍然存在?

編輯:我看到它是最新版本;也許用tiny_tds維護者提出這個問題 - 請參閱https://github.com/rails-sqlserver/tiny_tds

+0

我檢查了文檔並嘗試使用--with開關安裝免費的tds,但錯誤仍然存​​在。這是寶石或寶石的不兼容性,還是可能導致代碼錯誤,導致發生這種異常。 –

+1

看起來這是一個本地代碼中的錯誤,而不是gem本身,這就是爲什麼我建議把它與維護者聯繫起來。 https://github.com/rails-sqlserver/tiny_tds/blob/master/ext/tiny_tds/result.c#L89是引發錯誤的行,它看起來像上面的GET_CLIENT_USERDATA返回空引用 - 當這是取消引用段錯誤被提出。 – mcfinnigan

+0

然後我應該糾正這個問題。 –