Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: rollback to ruby 19???

  1. #1

    Default rollback to ruby 19???

    Hello,

    I have some lengthy scripts that I am running on opensuse 13.2. I am getting occasional segfault errors from ruby. There is a ruby script that is called many times and most times it completes successfully. Every once and a while, the script quits and doesn't produce output. I have run this many times on an opensuse 12.3 install that is running ruby 1.9.3p392 and I don't get any errors at all. The errors I am getting are from ruby 2.1.3p242.

    I looked in yast, but I don't see any older versions of ruby available. Is there a reasonable way I can roll back to ruby 1.9 so I can test if that is the issue or not?

    I have posted the ruby error output at the bottom of the message in case anyone would find that helpful. I get that this is not a ruby forum but I thought there would be no harm in including it. I can also post the script if that would help. Some of the error output refers to line 130 which is,

    Code:
    prefixes.all? { |x| x==prefixes[0] }||raise
    LMHmedchem



    Code:
    ./get_cols_and_sort.ruby:130: [BUG] Segmentation fault at 0x00000000000000
    ruby 2.1.3p242 (2014-09-19 revision 47630) [x86_64-linux-gnu]
    
    -- Control frame information -----------------------------------------------
    c:0008 p:---- s:0026 e:000025 CFUNC  :==
    c:0007 p:---- s:0024 e:000023 CFUNC  :==
    c:0006 p:0013 s:0020 e:000019 BLOCK  ./get_cols_and_sort.ruby:130 [FINISH]
    c:0005 p:---- s:0017 e:000016 IFUNC 
    c:0004 p:---- s:0015 e:000014 CFUNC  :each
    c:0003 p:---- s:0013 e:000012 CFUNC  :all?
    c:0002 p:0074 s:0010 E:001c88 EVAL   ./get_cols_and_sort.ruby:130 [FINISH]
    c:0001 p:0000 s:0002 E:001ff8 TOP    [FINISH]
    
    -- Ruby level backtrace information ----------------------------------------
    ./get_cols_and_sort.ruby:130:in `<main>'
    ./get_cols_and_sort.ruby:130:in `all?'
    ./get_cols_and_sort.ruby:130:in `each'
    ./get_cols_and_sort.ruby:130:in `block in <main>'
    ./get_cols_and_sort.ruby:130:in `=='
    ./get_cols_and_sort.ruby:130:in `=='
    
    -- C level backtrace information -------------------------------------------
    /usr/lib64/libruby2.1.so.2.1(+0x18b827) [0x7f683ae86827]
    /usr/lib64/libruby2.1.so.2.1(+0x18b8f3) [0x7f683ae868f3]
    /usr/lib64/libruby2.1.so.2.1(+0x6e623) [0x7f683ad69623]
    /usr/lib64/libruby2.1.so.2.1(rb_bug+0xb3) [0x7f683ad69c93]
    /usr/lib64/libruby2.1.so.2.1(+0x122a0f) [0x7f683ae1da0f]
    /lib64/libc.so.6(+0x35200) [0x7f683a988200]
    
    -- Other runtime information -----------------------------------------------
    
    * Loaded script: ./get_cols_and_sort.ruby
    
    * Loaded features:
    
        0 enumerator.so
        1 /usr/lib64/ruby/2.1.0/x86_64-linux-gnu/enc/encdb.so
        2 /usr/lib64/ruby/2.1.0/x86_64-linux-gnu/enc/trans/transdb.so
        3 /usr/lib64/ruby/2.1.0/x86_64-linux-gnu/rbconfig.rb
        4 /usr/lib64/ruby/2.1.0/rubygems/compatibility.rb
        5 /usr/lib64/ruby/2.1.0/rubygems/defaults.rb
        6 /usr/lib64/ruby/2.1.0/rubygems/deprecate.rb
        7 /usr/lib64/ruby/2.1.0/rubygems/errors.rb
        8 /usr/lib64/ruby/2.1.0/rubygems/version.rb
        9 /usr/lib64/ruby/2.1.0/rubygems/requirement.rb
       10 /usr/lib64/ruby/2.1.0/rubygems/platform.rb
       11 /usr/lib64/ruby/2.1.0/rubygems/basic_specification.rb
       12 /usr/lib64/ruby/2.1.0/rubygems/stub_specification.rb
       13 /usr/lib64/ruby/2.1.0/rubygems/util/stringio.rb
       14 /usr/lib64/ruby/2.1.0/rubygems/specification.rb
       15 /usr/lib64/ruby/2.1.0/rubygems/exceptions.rb
       16 /usr/lib64/ruby/2.1.0/rubygems/core_ext/kernel_gem.rb
       17 thread.rb
       18 /usr/lib64/ruby/2.1.0/x86_64-linux-gnu/thread.so
       19 /usr/lib64/ruby/2.1.0/monitor.rb
       20 /usr/lib64/ruby/2.1.0/rubygems/core_ext/kernel_require.rb
       21 /usr/lib64/ruby/2.1.0/rubygems.rb
    
    * Process memory map:
    
    00400000-00401000 r-xp 00000000 08:12 532347                             /usr/bin/ruby
    00600000-00601000 r--p 00000000 08:12 532347                             /usr/bin/ruby
    00601000-00602000 rw-p 00001000 08:12 532347                             /usr/bin/ruby
    01550000-08ac7000 rw-p 00000000 00:00 0                                  [heap]
    7f68397d4000-7f68397ea000 r-xp 00000000 08:12 1835120                    /lib64/libgcc_s.so.1
    7f68397ea000-7f68399e9000 ---p 00016000 08:12 1835120                    /lib64/libgcc_s.so.1
    7f68399e9000-7f68399ea000 r--p 00015000 08:12 1835120                    /lib64/libgcc_s.so.1
    7f68399ea000-7f68399eb000 rw-p 00016000 08:12 1835120                    /lib64/libgcc_s.so.1
    7f68399eb000-7f68399ee000 r-xp 00000000 08:12 527717                     /usr/lib64/ruby/2.1.0/x86_64-linux-gnu/thread.so
    7f68399ee000-7f6839bed000 ---p 00003000 08:12 527717                     /usr/lib64/ruby/2.1.0/x86_64-linux-gnu/thread.so
    7f6839bed000-7f6839bee000 r--p 00002000 08:12 527717                     /usr/lib64/ruby/2.1.0/x86_64-linux-gnu/thread.so
    7f6839bee000-7f6839bef000 rw-p 00003000 08:12 527717                     /usr/lib64/ruby/2.1.0/x86_64-linux-gnu/thread.so
    7f6839bef000-7f6839bf2000 r-xp 00000000 08:12 527661                     /usr/lib64/ruby/2.1.0/x86_64-linux-gnu/enc/trans/transdb.so
    7f6839bf2000-7f6839df1000 ---p 00003000 08:12 527661                     /usr/lib64/ruby/2.1.0/x86_64-linux-gnu/enc/trans/transdb.so
    7f6839df1000-7f6839df2000 r--p 00002000 08:12 527661                     /usr/lib64/ruby/2.1.0/x86_64-linux-gnu/enc/trans/transdb.so
    7f6839df2000-7f6839df3000 rw-p 00003000 08:12 527661                     /usr/lib64/ruby/2.1.0/x86_64-linux-gnu/enc/trans/transdb.so
    7f6839df3000-7f6839df5000 r-xp 00000000 08:12 527672                     /usr/lib64/ruby/2.1.0/x86_64-linux-gnu/enc/encdb.so
    7f6839df5000-7f6839ff4000 ---p 00002000 08:12 527672                     /usr/lib64/ruby/2.1.0/x86_64-linux-gnu/enc/encdb.so
    7f6839ff4000-7f6839ff5000 r--p 00001000 08:12 527672                     /usr/lib64/ruby/2.1.0/x86_64-linux-gnu/enc/encdb.so
    7f6839ff5000-7f6839ff6000 rw-p 00002000 08:12 527672                     /usr/lib64/ruby/2.1.0/x86_64-linux-gnu/enc/encdb.so
    7f6839ff6000-7f683a0f6000 r-xp 00000000 08:12 1835195                    /lib64/libm-2.19.so
    7f683a0f6000-7f683a2f5000 ---p 00100000 08:12 1835195                    /lib64/libm-2.19.so
    7f683a2f5000-7f683a2f6000 r--p 000ff000 08:12 1835195                    /lib64/libm-2.19.so
    7f683a2f6000-7f683a2f7000 rw-p 00100000 08:12 1835195                    /lib64/libm-2.19.so
    7f683a2f7000-7f683a303000 r-xp 00000000 08:12 1835105                    /lib64/libcrypt-2.19.so
    7f683a303000-7f683a502000 ---p 0000c000 08:12 1835105                    /lib64/libcrypt-2.19.so
    7f683a502000-7f683a503000 r--p 0000b000 08:12 1835105                    /lib64/libcrypt-2.19.so
    7f683a503000-7f683a504000 rw-p 0000c000 08:12 1835105                    /lib64/libcrypt-2.19.so
    7f683a504000-7f683a532000 rw-p 00000000 00:00 0 
    7f683a532000-7f683a535000 r-xp 00000000 08:12 1835171                    /lib64/libdl-2.19.so
    7f683a535000-7f683a734000 ---p 00003000 08:12 1835171                    /lib64/libdl-2.19.so
    7f683a734000-7f683a735000 r--p 00002000 08:12 1835171                    /lib64/libdl-2.19.so
    7f683a735000-7f683a736000 rw-p 00003000 08:12 1835171                    /lib64/libdl-2.19.so
    7f683a736000-7f683a74e000 r-xp 00000000 08:12 1835180                    /lib64/libpthread-2.19.so
    7f683a74e000-7f683a94d000 ---p 00018000 08:12 1835180                    /lib64/libpthread-2.19.so
    7f683a94d000-7f683a94e000 r--p 00017000 08:12 1835180                    /lib64/libpthread-2.19.so
    7f683a94e000-7f683a94f000 rw-p 00018000 08:12 1835180                    /lib64/libpthread-2.19.so
    7f683a94f000-7f683a953000 rw-p 00000000 00:00 0 
    7f683a953000-7f683aaf1000 r-xp 00000000 08:12 1835183                    /lib64/libc-2.19.so
    7f683aaf1000-7f683acf1000 ---p 0019e000 08:12 1835183                    /lib64/libc-2.19.so
    7f683acf1000-7f683acf5000 r--p 0019e000 08:12 1835183                    /lib64/libc-2.19.so
    7f683acf5000-7f683acf7000 rw-p 001a2000 08:12 1835183                    /lib64/libc-2.19.so
    7f683acf7000-7f683acfb000 rw-p 00000000 00:00 0 
    7f683acfb000-7f683af4a000 r-xp 00000000 08:12 527206                     /usr/lib64/libruby2.1.so.2.1.0
    7f683af4a000-7f683b14a000 ---p 0024f000 08:12 527206                     /usr/lib64/libruby2.1.so.2.1.0
    7f683b14a000-7f683b14f000 r--p 0024f000 08:12 527206                     /usr/lib64/libruby2.1.so.2.1.0
    7f683b14f000-7f683b152000 rw-p 00254000 08:12 527206                     /usr/lib64/libruby2.1.so.2.1.0
    7f683b152000-7f683b177000 rw-p 00000000 00:00 0 
    7f683b177000-7f683b197000 r-xp 00000000 08:12 1835122                    /lib64/ld-2.19.so
    7f683b230000-7f683b331000 rw-p 00000000 00:00 0 
    7f683b331000-7f683b370000 r--p 00000000 08:12 1311625                    /usr/lib/locale/en_US.utf8/LC_CTYPE
    7f683b370000-7f683b375000 rw-p 00000000 00:00 0 
    7f683b38a000-7f683b38b000 rw-p 00000000 00:00 0 
    7f683b38b000-7f683b38c000 ---p 00000000 00:00 0 
    7f683b38c000-7f683b38f000 rw-p 00000000 00:00 0                          [stack:6054]
    7f683b38f000-7f683b396000 r--s 00000000 08:12 534452                     /usr/lib64/gconv/gconv-modules.cache
    7f683b396000-7f683b397000 rw-p 00000000 00:00 0 
    7f683b397000-7f683b398000 r--p 00020000 08:12 1835122                    /lib64/ld-2.19.so
    7f683b398000-7f683b399000 rw-p 00021000 08:12 1835122                    /lib64/ld-2.19.so
    7f683b399000-7f683b39a000 rw-p 00000000 00:00 0 
    7fff6700e000-7fff6702f000 rw-p 00000000 00:00 0 
    7fff671a9000-7fff671ab000 r-xp 00000000 00:00 0                          [vdso]
    7fff671ab000-7fff671ad000 r--p 00000000 00:00 0                          [vvar]
    ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]
    
    
    [NOTE]
    You may have encountered a bug in the Ruby interpreter or extension libraries.
    Bug reports are welcome.
    For details: http://www.ruby-lang.org/bugreport.html
    
    ./07_final_results.sh: line 82:  6053 Aborted                 ./get_cols_and_sort.ruby $TARGET_NAME $ANNEALING_SET_COUNT > $OUTPUT_FILE_NAME

  2. #2
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    24,854

    Default Re: rollback to ruby 19???

    Quote Originally Posted by LMHmedchem View Post
    I looked in yast, but I don't see any older versions of ruby available. Is there a reasonable way I can roll back to ruby 1.9 so I can test if that is the issue or not?
    Sorry, I can not comment on your real problem (no ruby experience), but of course there is a reason why you see no older versions of a product in YaST. That is because it is in none of the repositories you use. And that again is rather logical to me. In the OSS repo of openSUSE 13.2 are the versions of the packagess that together are openSUSE 13.2 And not any older versions that are not tested in the Beta phase of openSUSSE 13.2

    As you know it is avalable in the 12.3 repo, but I would be very carefull in using it on an openSUSE 13.2.
    Henk van Velden

  3. #3

    Default Re: rollback to ruby 19???

    Quote Originally Posted by hcvv View Post
    Sorry, I can not comment on your real problem (no ruby experience), but of course there is a reason why you see no older versions of a product in YaST. That is because it is in none of the repositories you use. And that again is rather logical to me. In the OSS repo of openSUSE 13.2 are the versions of the packagess that together are openSUSE 13.2 And not any older versions that are not tested in the Beta phase of openSUSSE 13.2

    As you know it is avalable in the 12.3 repo, but I would be very carefull in using it on an openSUSE 13.2.
    I was not surprised to see that there were no older ruby versions in the package manager, especially since both opensuse and ruby have moved on to new major versions. I was just wondering if my best bet would be to try to find a repository with ruby 1.9, or go some other method such as yum, an installer file, or build from src. Ruby has a tool called RVM (ruby version manager) that is supposed to allow you to manage multiple versions of ruby on the same OS. I have never used it and don't really know anything about it.

    I think the safest thing to do would be to uninstall ruby 2.1 and then install 1.9 from a repository that still has it.
    openSUSE-12.3-Oss
    http://download.opensuse.org/distrib...12.3/repo/oss/

    Do you see any potential land mines with this approach? I can't think of anything that opensuse 13.2 would need ruby 2.1 for and I don't need 2.1 for anything in particular.

    Thanks,

    LMHmedchem

  4. #4
    Join Date
    May 2012
    Location
    Finland
    Posts
    2,004

    Default Re: rollback to ruby 19???

    It will fail hard-core due to library dependencies. A better idea would be to recompile the source rpm against 13.2 if possible.
    .: miuku #suse @ irc.freenode.net
    :: miuku@opensuse.org

    .: h​ttps://download.opensuse.org/repositories/home:/Miuku/

  5. #5

    Default Re: rollback to ruby 19???

    Quote Originally Posted by Miuku View Post
    It will fail hard-core due to library dependencies. A better idea would be to recompile the source rpm against 13.2 if possible.
    Thanks for the heads up. What would be the advantage/difference in rebuilding the rpm as opposed to downloading and compiling the src as in,

    Code:
    cd /root/
    wget http://cache.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p392.tar.gz
    
    tar ruby-1.9.3-p392.tar.gz
    cd ruby-1.9.3-p392
    ./configure
    make
    make install
    The hope is that configure will resolve the dependencies, or at least let you know if they cannot be resolved.

    LMHmedchem

  6. #6
    Join Date
    May 2012
    Location
    Finland
    Posts
    2,004

    Default Re: rollback to ruby 19???

    The great thing about the srpm would be the ability to see the deps instantly and being able to uninstall and install a new version easily should you need to.
    .: miuku #suse @ irc.freenode.net
    :: miuku@opensuse.org

    .: h​ttps://download.opensuse.org/repositories/home:/Miuku/

  7. #7

    Default Re: rollback to ruby 19???

    Quote Originally Posted by Miuku View Post
    The great thing about the srpm would be the ability to see the deps instantly and being able to uninstall and install a new version easily should you need to.
    Alright, I will give that a try. This looks like the rpm that I need to recompile,
    http://rpm.pbone.net/index.php3/stat...86_64.rpm.html
    http://rpm.pbone.net/index.php3/stat...3.34.1.src.rpm

    This is the opensuse 12.x x86_64 rpm for the version of ruby I have on the install that isn't giving me the errors. I have a few write-ups for recompiling src.rmps and I will read up a bit. Do you have a particular tutorial on the subject that you like? I've done more of this kind of thing on fedora, CentOS, etc.

    I was planning on completely removing my current ruby installation first.

    LMHmedchem

  8. #8
    Join Date
    May 2012
    Location
    Finland
    Posts
    2,004

    Default Re: rollback to ruby 19???

    rpmbuild --rebuild SPECS/rubysomething.spec

    In your /usr/src/packages

    Should do it. Install the source rpm as root.

    Writing this on my cell so I might have made a typo somewhere
    .: miuku #suse @ irc.freenode.net
    :: miuku@opensuse.org

    .: h​ttps://download.opensuse.org/repositories/home:/Miuku/

  9. #9

    Default Re: rollback to ruby 19???

    Quote Originally Posted by Miuku View Post
    rpmbuild --rebuild SPECS/rubysomething.spec

    In your /usr/src/packages

    Should do it. Install the source rpm as root.

    Writing this on my cell so I might have made a typo somewhere
    I appreciate you keeping up with this from your phone. It is still unclear to me if I need to uninstall ruby 2.1 before proceeding.

    In Yast, when I select ruby 2.1 for removal, it appears as if there are some other things in there that require ruby, particularly yast2-services-manager. Some of the other items are ruby bindings and lib and such that I would expect to require ruby to be around.

    If there are important components of opensuse 13.2 that require ruby 2.1, I could be in Barney as the saying goes.

    LMHmedchem

  10. #10
    Join Date
    Nov 2009
    Location
    West Virginia Sector 13
    Posts
    15,649

    Default Re: rollback to ruby 19???

    Warning...Warning...Will Robertson

    Yast is now written in Ruby if you remove the current Ruby packages you will kill Yast. Possible other stuff.

    Got no clue in running two different Ruby versions

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •