Ruby 1.8.7 segmentation faults

Discussion in 'Ruby' started by Leslie Viljoen, Nov 2, 2009.

  1. Hi everyone!

    I am getting segmentation faults in several innocuous looking places
    in ruby programs since running them
    on Ubuntu 9.10 (Karmic).

    This simple program:

    require 'dbi'
    c = DBI.connect('dbi:ODBC:axon-insight', 'sa', 'fl3nd3r^')
    p c.select_all('select top 15 * from log_device_healths')

    Produces:

    /usr/lib/ruby/gems/1.8/gems/dbd-odbc-0.2.4/lib/dbd/odbc/statement.rb:41:
    [BUG] Segmentation fault
    ruby 1.8.7 (2009-06-12 patchlevel 174) [i486-linux]
    Aborted

    ..running exactly the same code, I also have also once gotten:
    /usr/lib/ruby/gems/1.8/gems/dbd-odbc-0.2.4/lib/dbd/odbc/database.rb:79:
    [BUG] Segmentation fault


    What should I do?
    Where do I report this bug?
    Is there any way I can enable a debug mode and help with a more
    detailed bug report (or fix it myself)?
    Leslie Viljoen, Nov 2, 2009
    #1
    1. Advertising

  2. Lucas Nussbaum, Nov 2, 2009
    #2
    1. Advertising

  3. On Mon, Nov 2, 2009 at 2:41 PM, Lucas Nussbaum <> wrote:
    > On 02/11/09 at 21:27 +0900, Leslie Viljoen wrote:
    >> Hi everyone!
    >>
    >> I am getting segmentation faults in several innocuous looking places
    >> in ruby programs since running them
    >> on Ubuntu 9.10 (Karmic).
    >>
    >> [...]
    >>
    >> What should I do?
    >> Where do I report this bug?

    >
    > https://bugs.launchpad.net/ubuntu/ source/ruby1.8/ filebug


    For anyone else who might run into this....

    I was running into this error when trying to use RubyODBC
    (ActiveRecord connecting to mssql server):
    DBI::DatabaseError : INTERN (0) [RubyODBC] Cannot allocate SQLHENV

    ..to fix that I followed the steps here:
    http://stackoverflow.com/questions/1419397/rubyodbc-cannot-allocate-sqlhenv

    ..which are:
    wget http://www.ch-werner.de/rubyodbc/ruby-odbc-0.9997.tar.gz
    tar xzvf ruby-odbc-0.9997.tar.gz
    cd ruby-odbc-0.9997
    ruby extconf.rb --with-dlopen
    make
    sudo make install

    ..to compile, this requires either libiodbc2-dev or unixodbc-dev, and
    I had tried libiodbc2-dev.
    I went back and removed iodbc and installed unixodbc-dev, recompiled
    rubyodbc and now it works!

    I will try and figure out the right people to report this issue to.
    Leslie Viljoen, Nov 2, 2009
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mathias

    Segmentation faults using threads

    Mathias, Feb 13, 2007, in forum: Python
    Replies:
    8
    Views:
    312
    John Nagle
    Feb 14, 2007
  2. Stanley S
    Replies:
    16
    Views:
    2,510
    Keith Thompson
    Dec 22, 2005
  3. Iain Dooley
    Replies:
    12
    Views:
    233
    Iain Dooley
    Aug 29, 2005
  4. Replies:
    0
    Views:
    97
  5. Bob Florian
    Replies:
    3
    Views:
    86
    Phillip Gawlowski
    May 21, 2008
Loading...

Share This Page