
Issue #19527 has been updated by alanwu (Alan Wu). Status changed from Open to Third Party's Issue Unfortunately, the traces are not very helpful. But I agree, it's likely an issue with the [IBM gem](https://github.com/ibmdb/ruby-ibmdb) and not a Ruby issue. Here is a guess as to what's happening: the traces indicate that it's crashing soon after a new Ruby thread starts up, and for "Object allocation during garbage collection phase" to happen at that timing, maybe someone is running Ruby code without holding the global VM lock. Any code paths in the gem that terminates in `rb_thread_call_without_gvl()`, such as ones involving `_ruby_ibm_db_check_sql_errors()`, can have this class of bugs. You can try asking IBM to check this. ---------------------------------------- Bug #19527: Object allocation during garbage collection phase https://bugs.ruby-lang.org/issues/19527#change-102383 * Author: hjimenez89rb (Hugo Alberto Jiménez Santos) * Status: Third Party's Issue * Priority: Normal * ruby -v: 3.2.1 * Backport: 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN ---------------------------------------- We are currently developing a Ruby based web application which connects to a DB2 Database and we have been using ibm_db-5.4.0 to establish a connection, suddenly we got a error related to RUBY garbage collector PHASE. We have checked the issue with IBM_team to make sure that It was not a IBM_GEM problem but as a result of their tests, IBM_GEM is working in different cases but for us we face up with those errors even with those versions (2.7.6, 3.1.2, 3.2.1): *0x0/usr/local/rvm/gems/ruby-3.1.2/gems/ibm_db-5.4.0/lib/active_record/connection_adapters/ibm_db_adapter.rb:760: [BUG] object allocation during garbage collection phase ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [x86_64-linux] *Exception occurred on Step thread ID #SID:34117;RSEQ:911723; wrong instance allocation; backtrace: /usr/local/rvm/gems/ruby-3.1.2/gems/ibm_db-5.4.0/lib/active_record/connection_adapters/ibm_db_adapter.rb:760:in server_info' (RuntimeError) /usr/local/rvm/gems/ruby-3.1.2/gems/ibm_db-5.4.0/lib/active_record/connection_adapters/ibm_db_adapter.rb:760:in initialize'. (all trace is attached in this ticket) OS name: "CentOS" version: "8" architecture: "x86_64" rvm: version: "1.29.12 (latest)" ---Files-------------------------------- LOGS3.txt (12.5 KB) LOGS4.txt (127 KB) LOGS2.txt (9.62 KB) LOGS1.txt (123 KB) -- https://bugs.ruby-lang.org/