Closed ccoffey closed 11 months ago
Sequel itself contains no native code. If you are getting a segfault/crash, it is a bug in the ruby-odbc native code or the underlying ODBC driver (or Ruby itself, but that seems unlikely in this case). You'll probably need to run the code under a C debugger such as gdb to track down the issue. Based on https://github.com/vendasta/sequel-snowflake/issues/16#issuecomment-1828471244, this appears to be a recently introduced bug in unixODBC, as downgrading unixODBC to 2.3.11 fixed the issue. Closing as this does not appear to be a bug in Sequel.
@jeremyevans you are likely correct, but I did tried the following:
gem uninstall ruby-odbc
gem install ruby-odbc -- --with-odbc-dir=/opt/homebrew/Cellar/unixodbc/2.3.11
However, I am still seeing the same crash 🤔 Any suggestions?
Unfortunately, I don't have any other than my previous suggestion of running it under gdb (maybe lldb would work as well) and seeing where the crash occurs. I haven't actually tested Sequel's odbc adapter with unixodbc (I test the Sequel odbc adapter on Windows), though I have had reports that it works.
@ccoffey were you able to get around this issue?
Complete Description of Issue
I have added the following two gems (latest versions of each) to my Gemfile:
Then on a Rails console, it looks like I can connect (because it takes a second) but then it crashes when I try to query:
Seems to crash if I execute any query, for example:
How do I debug this? Are there logs I can look at? I see nothing on the console before it crashes.
I've verified that I can connect using
iodbctest
and the same config:Any help would be very much appreciated
Simplest Possible Self-Contained Example Showing the Bug
No response
Full Backtrace of Exception (if any)
No response
SQL Log (if any)
No response
Ruby Version
ruby 3.1.4p223
Sequel Version
5.76.0