Skip to content

Commit baa3008

Browse files
committed
Skip :returning_id logging spec on Oracle 23.26 (cursor_sharing=force OCI8 deadlock)
The "does not raise NoMethodError for :returning_id Symbol when logging" example reliably hangs against Oracle Database 23.26.1.0.0 + ruby-oci8 because the adapter's default `ALTER SESSION SET CURSOR_SHARING = FORCE` rewrites the IN literal to `:"SYS_B_0"` while the example issues `RETURNING "ID" INTO :returning_id`. The two-bind shape sends the OCI piecewise (DATA_AT_EXEC) protocol out of sync: the server enters `SQL*Net more data from client` while ruby-oci8 stays in `OCIStmtExecute -> nttfprd -> read()`, producing a half-duplex deadlock that wedges the rest of the suite. Diagnosis was confirmed via: - v$session: ORACLE_ENHANCED session waiting on `SQL*Net more data from client`, blocking_session NULL, no row locks held. - macOS `sample` of the rspec PID: main thread stuck in oci8_stmt_execute -> OCIStmtExecute -> kpuexec -> ... -> nttfprd -> read. - v$parameter: cursor_sharing=EXACT system-wide, but session-level FORCE applied by oracle_enhanced_adapter.rb:843. The hang is unrelated to PR #2615 (primary_key_trigger). It exposes a pre-existing OCI8 / cursor_sharing=force x RETURNING INTO issue that needs a separate fix; tracked in #2619.
1 parent d965525 commit baa3008

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

spec/active_record/connection_adapters/oracle_enhanced/primary_key_trigger_spec.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,7 @@ def trigger_exists?(name)
318318
end
319319

320320
it "does not raise NoMethodError for :returning_id Symbol when logging" do
321+
skip "see #2619: ruby-oci8 + cursor_sharing=force x RETURNING INTO :returning_id deadlocks on Oracle 23.26"
321322
set_logger
322323
@conn.reconnect! unless @conn.active?
323324
@conn.insert("INSERT INTO test_pk_triggers (name) VALUES ('alpha')", nil, "id")

0 commit comments

Comments
 (0)