-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OCI8 hangs when switching to LDAP #32
Comments
Could you run the following one liner? ruby -roci8 -e "OCI8.new('username/[email protected]').exec('select * from dual') do |row| puts row[0]; end" What platform do you use? $ cat /proc/<PID>/maps
$ gdb `which ruby` <PID>
(gdb) info threads # get thread id list
(gdb) thread 1 # change the context to thread 1
(gdb) bt # get the backtrace of thread 1
(gdb) thread 2 # change the context to thread 2
(gdb) bt # get the backtrace of thread 2
... |
No response. Can I close this issue? |
I am sorry, work had ben very busy. I will try to get you what you need on
|
See http://stackoverflow.com/questions/15205743/link-to-specific-oracle-instant-client-dynamic-library-on-os-x/15322554#15322554 |
kubo, I'm so sorry that this took so long. Work.... :( Anyway your one liner did connect, so it must be a issue with the order of inclusion. I'm using bundler so I will fool around with the define order. Thank you so much for keeping this issue open. |
In the interest of closure, the issue was the mysql2 gem |
Does anyone understand what is causing this issue exactly? I have an application that needs to connect to both an Oracle database and a PostGres database, and I keep running into this problem. It happens before the application even tries to open a PostGres connection. It seems like just having "require 'pg'" anywhere in my code can trigger it. Once in a while I happen to stumble on a configuration that seems to avoid the problem, but then I adjust something else and it breaks again, and I can't figure out what distinguishes a working setup from a non-working one. I have an uneasy feeling that it's based on some non-deterministic factor. |
@EvanGranthamBrown If it is Linux, could you post the output of the following command or send it to [email protected]?
If it is OS X, use the following command.
|
E-mailing it, since the output was about 4K lines. My system is a Vagrant VM running CentOS (on a Windows host, if it matters). Thanks! |
It is indeed function interposition.
ldap_open is in both libclntsh.so.11.1 and libldap_r-2.4.so.2.
The issue doesn't depend on the order of function calls. It depends on the order of library loading, which is triggered by
Does it happens even though
Could you run your scripts with |
Accoding to http://pgxn.org/dist/oracle_fdw/ the Oracle client shared library comes with its own LDAP client implementation conforming to RFC 1823, so these functions have the same names as OpenLDAP's. This will lead to a name collision. This also could be issue with the postgres client, which uses libldap. I would try to compile libpg without ldap. |
I'm also encountering this issue, I'm using both oci8 and activeldap, using an ActiveLdap gives a "NoMemoryError: failed to allocate memory" |
compiling ruby-oci8 with #define DLOPEN_FLAG (RTLD_NOW|RTLD_LOCAL) and requiring "oci8" first does the trick. Thanks kubo, would it be possible to have a fix in the next release ? |
I made a document about LDAP auth. |
Hello,
I have previously been connecting fine with EZCONNECT through Ruby-OCI8. Unfortunately my enterprise is switching to LDAP auth only and I need to get my application working in this manner.
I can connect via sqlplus fine. "sqlplus username/[email protected]"
but when I try this via ruby:
OCI8.new 'username','password', 'DBNAME.DB.CORP.com'
or
OCI8.new 'username/[email protected]'
the process hangs.
I have left it running for hours and have not gotten an error.
Additionally if I remove the LDAP config file, I get an error immediately.
I am not sure how to debug this, is there a verbose mode for OCI8?
The text was updated successfully, but these errors were encountered: