On Wed, Apr 09, 2003 at 04:42:21AM +0900, Daniel Berger wrote:
> /usr/local/lib/ruby/site_ruby/1.6/oci8.rb:91:    do_ocicall(@ctx) {
> @srv.attach(conn) }
> (rdb:1) @srv
> #<OCIServer:0x3ce788>
> (rdb:1) s
> /usr/local/lib/ruby/site_ruby/1.6/oci8.rb:40:      sleep_time = 0.01
> (rdb:1) n
> /usr/local/lib/ruby/site_ruby/1.6/oci8.rb:41:      ctx[CTX_MUTEX].lock
> (rdb:1) 
> n
> /usr/local/lib/ruby/site_ruby/1.6/oci8.rb:42:      ctx[CTX_THREAD] =
> Thread.current
> (rdb:1) 
> n
> /usr/local/lib/ruby/site_ruby/1.6/oci8.rb:58:      end
> (rdb:1) 
> n
> /usr/local/lib/ruby/site_ruby/1.6/oci8.rb:44:   yield
> (rdb:1) 
> n
> /usr/local/lib/ruby/site_ruby/1.6/oci8.rb:91:    do_ocicall(@ctx) {
> @srv.attach(conn) }
> (rdb:1) s
> 
> That's where it hangs - trying to step into the do_ocicall() the second
> time.
> 
> Any ideas?  Some sort of Mutex issue perhaps?

No I don't know, but it works for me for non-blocking queries rather than
opens. You can see from the above how it's intended to work: it issues a
call, waits 10ms, polls for an answer, waits 20ms, polls again, and so on.

Have you tried it with a database which is 'up' rather than one which is
unreachable? If the rest of the functionality is OK on your system, then
maybe it's just non-blocking connects which have a problem.

The author of ruby-oci8 was extremely helpful when I found a bug, although
says that he doesn't actually use it himself any more and therefore doesn't
have much time to work on it.

Regards,

Brian.