isql segmentation fault - stuck

classic Classic list List threaded Threaded
15 messages Options
Reply | Threaded
Open this post in threaded view
|

isql segmentation fault - stuck

sambuca555
Hi, long story short I'm having trouble connecting to an Oracle Database using unixODBC and the Oracle ODBC driver.

I did get it working but was told by the vendor of the product that was to use the Oracle connector that it need the 32 bit driver and I had installed the 64 bit.

So what I initially did (Suse LINUX Enterprise 10):

Downloaded the unixODBC Tar
unixODBC-2.3.2

Ran
./configure
make
sudo make install

Then installed the following rpms
rpm -ivh oracle-instantclient11.2-basic-11.2.0.4.0-1.x86_64.rpm
rpm -ivh oracle-instantclient11.2-odbc-11.2.0.4.0-1.x86_64.rpm
rpm -ivh oracle-instantclient11.2-sqlplus-11.2.0.4.0-1.x86_64.rpm

odbc.ini
[SELFDEV]
Driver = Oracle 11g ODBC driver
ServerName = //192.168.23.33:1521/SELFDEV
Database = SELFDEV
DSN = SELFDEV
Port = 1521

odbcinst.ini
[Oracle 11g ODBC driver]
Description=Oracle ODBC driver for Oracle 11g
Driver=/usr/lib/oracle/11.2/client/lib/libsqora.so.11.1
Setup=
FileUsage=
CPTimeout=
CPReuse=
UsageCount=2

[ODBC]
Trace=yes
TraceFile=/tmp/duh
UsageCount=2





This was working well but then I uninstalled the 3 RPMs and installed the Oracle ODBC 32bit
sudo rpm -ivh oracle-instantclient11.2-basic-11.2.0.4.0-1.i386.rpm
sudo rpm -ivh oracle-instantclient11.2-odbc-11.2.0.4.0-1.i386.rpm
sudo rpm -ivh oracle-instantclient11.2-sqlplus-11.2.0.4.0-1.i386.rpm


I also ran the UnixODBC installer again:
sudo CFLAGS=-m32 LDFLAGS=-m32 CXXFLAGS=-m32 ./configure --enable-stats=no
make
sudo make install

I got this off a forum on how to install 32bit ona  64 bit machine.

I've checked my ORACLE_HOME, LD_LIBRARY_PATH all are pointing to the new 32 bit directories

Error I get is:

isql -v SELFDEV
Segmentation fault

How do I troubleshoot this Segmentation Fault so I can find out what is going on, I'm sure it's going to be to do with the switch to 32bit but I'm that skilled in linux so trouble figuring out where it is wrong.




Reply | Threaded
Open this post in threaded view
|

Re: isql segmentation fault - stuck

Nick Gorham-2
On 18/11/13 17:25, sambuca555 wrote:

>
> I got this off a forum on how to install 32bit ona  64 bit machine.
>
> I've checked my ORACLE_HOME, LD_LIBRARY_PATH all are pointing to the new 32
> bit directories
>
> Error I get is:
>
> isql -v SELFDEV
> Segmentation fault

Can't say for certain, does

isql -v wibble

give a corrrect error? (SN not found).

I would guess its a driver problem or a mismatch between 32 and 64 bit
parts. Try using truss to see if the driver is being loaded. and what
libs are being found.

--
Nick
_______________________________________________
unixODBC-support mailing list
[hidden email]
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-support
Reply | Threaded
Open this post in threaded view
|

Re: isql segmentation fault - stuck

sambuca555
Yes that returns an error:

isql -v wibble
[IM002][unixODBC][Driver Manager]Data source name not found, and no default driver specified
[ISQL]ERROR: Could not SQLConnect

You'll have to excuse my ignorance still a bit of a linux newbie. Is truss the a strace command in linux. I tried that and this is what I got: (this is just the end of the output)

......
open("/usr/local/etc/odbcinst.ini", O_RDONLY) = 3
fstat64(0x3, 0xffff8098)                = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0x1000) = 0xffffff                            fff7ca7000
read(3, "[Oracle 11g ODBC driver]\nDescrip"..., 4096) = 229
read(3, "", 4096)                       = 0
close(3)                                = 0
munmap(0xf7ca7000, 4096)                = 0
open("/vol1/aimia/.odbcinst.ini", O_RDONLY) = -1 ENOENT (No such file or directory)
time(NULL)                              = 1384798880
time(NULL)                              = 1384798880
open("/tmp/duh", O_WRONLY|O_APPEND|O_CREAT, 0666) = 3
fstat64(0x3, 0xffffb244)                = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0x1000) = 0xffffff                            fff7ca7000
fstat64(0x3, 0xffffb31c)                = 0
_llseek(3, 89178, [89178], SEEK_SET)    = 0
write(3, "\t\tUNICODE Using encoding ASCII \'"..., 62) = 62
close(3)                                = 0
munmap(0xf7ca7000, 4096)                = 0
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++
Reply | Threaded
Open this post in threaded view
|

Re: isql segmentation fault - stuck

Nick Gorham-2
On 18/11/13 18:26, sambuca555 wrote:

> Yes that returns an error:
>
> isql -v wibble
> [IM002][unixODBC][Driver Manager]Data source name not found, and no default
> driver specified
> [ISQL]ERROR: Could not SQLConnect
>
> You'll have to excuse my ignorance still a bit of a linux newbie. Is truss
> the a strace command in linux. I tried that and this is what I got: (this is
> just the end of the output)
>
> ......
> open("/usr/local/etc/odbcinst.ini", O_RDONLY) = 3
> fstat64(0x3, 0xffff8098)                = 0
> mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
> 0x1000) = 0xffffff                            fff7ca7000
> read(3, "[Oracle 11g ODBC driver]\nDescrip"..., 4096) = 229
> read(3, "", 4096)                       = 0
> close(3)                                = 0
> munmap(0xf7ca7000, 4096)                = 0
> open("/vol1/aimia/.odbcinst.ini", O_RDONLY) = -1 ENOENT (No such file or
> directory)
> time(NULL)                              = 1384798880
> time(NULL)                              = 1384798880
> open("/tmp/duh", O_WRONLY|O_APPEND|O_CREAT, 0666) = 3
> fstat64(0x3, 0xffffb244)                = 0
> mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
> 0x1000) = 0xffffff                            fff7ca7000
> fstat64(0x3, 0xffffb31c)                = 0
> _llseek(3, 89178, [89178], SEEK_SET)    = 0
> write(3, "\t\tUNICODE Using encoding ASCII \'"..., 62) = 62
> close(3)                                = 0
> munmap(0xf7ca7000, 4096)                = 0
> --- SIGSEGV (Segmentation fault) @ 0 (0) ---
> +++ killed by SIGSEGV +++
>
Looks to me like its trying to load what it thinks is a lib, and jumps
to location 0 and fails.

Not sure why its trying to load

/tmp/duh

But it is.

I would guess its failing in SQLConnect. I would check what driver lib
the ini files are point it to use.

--
Nick
_______________________________________________
unixODBC-support mailing list
[hidden email]
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-support
Reply | Threaded
Open this post in threaded view
|

Re: isql segmentation fault - stuck

sambuca555
This post was updated on .
The /tmp/duh was a trace I set up from someone elses suggestion
[ODBC]
Trace=yes
TraceFile=/tmp/duh
UsageCount=2
in the odbcinst.ini file. I've removed that now and it still fails.

The odbcinst.ini is as follows:

aimia@kogpoc02-n1-rack1-enc1-100:~> cat /usr/local/etc/odbcinst.ini
[Oracle 11g ODBC driver]
Description=Oracle ODBC driver for Oracle 11g
Driver=/usr/lib/oracle/11.2/client/lib/libsqora.so.11.1
Setup=
FileUsage=
CPTimeout=
CPReuse=
UsageCount=2

cat /usr/local/etc/odbc.ini:

[SELFDEV]
Driver = Oracle 11g ODBC driver
ServerName = //192.168.23.33:1521/SELFDEV
Database = SELFDEV
DSN = SELFDEV
Port = 1521


/usr/lib/oracle/11.2/client/lib/libsqora.so.11.1 should be the 32 bit oracle driver. Should I try a different one?
Reply | Threaded
Open this post in threaded view
|

Re: isql segmentation fault - stuck

Nick Gorham-2
On 18/11/13 19:17, sambuca555 wrote:

> The odbcinst.ini is as follows:
>
> aimia@kogpoc02-n1-rack1-enc1-100:~> cat /usr/local/etc/odbcinst.ini
> [Oracle 11g ODBC driver]
> Description=Oracle ODBC driver for Oracle 11g
> Driver=/usr/lib/oracle/11.2/client/lib/libsqora.so.11.1
> Setup=
> FileUsage=
> CPTimeout=
> CPReuse=
> UsageCount=2
>
> cat /usr/local/etc/odbc.ini:
>
> [SELFDEV]
> Driver = Oracle 11g ODBC driver
> ServerName = //192.168.23.33:1521/SELFDEV
> Database = SELFDEV
> DSN = SELFDEV
> Port = 1521
>
>
> /usr/lib/oracle/11.2/client/lib/libsqora.so.11.1 should be the 32 bit oracle
> driver. Should I try a different one?

Well, I can plug the Easysoft one. But that looks ok, I would just go
through the truss log and see if it does load the ini files you expect
and the driver lib your hope for.

--
Nick

>
>
>
>
> --
> View this message in context: http://unixodbc.13851.n7.nabble.com/isql-segmentation-fault-stuck-tp3937p3942.html
> Sent from the Support mailing list archive at Nabble.com.
> _______________________________________________
> unixODBC-support mailing list
> [hidden email]
> http://mailman.unixodbc.org/mailman/listinfo/unixodbc-support

_______________________________________________
unixODBC-support mailing list
[hidden email]
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-support
Reply | Threaded
Open this post in threaded view
|

Re: isql segmentation fault - stuck

sambuca555
I don't think it ever gets to loading the oracle ODBC

Do you know what is happening here:

read(3, "[OracleSQL]\nDescription=Oracle O"..., 4096) = 114
read(3, "", 4096)                       = 0
open("/vol1/aimia/.odbcinst.ini", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/etc/odbcinst.ini", O_RDONLY) = 3
read(3, "[OracleSQL]\nDescription=Oracle O"..., 4096) = 114
read(3, "", 4096)                       = 0
open("/vol1/aimia/.odbcinst.ini", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/vol1/aimia/.odbc.ini", O_WRONLY|O_APPEND|O_CREAT, 0666) = 3
open("/vol1/aimia/.odbc.ini", O_RDONLY) = 3
read(3, "", 4096)                       = 0
open("/usr/local/etc/odbc.ini", O_RDONLY) = 3
open("/usr/local/etc/odbc.ini", O_RDONLY) = 3
read(3, "\n[SELFDEV]\nDriver = OracleSQL\nSe"..., 4096) = 98


Unfortunately there just isn't enough on the Internet about connecting to Oracle this way so I'm struggling to define where it's gone wrong despite chopping and changing everything
Reply | Threaded
Open this post in threaded view
|

Re: isql segmentation fault - stuck

Nick Gorham-2
On 19/11/13 12:53, sambuca555 wrote:

> I don't think it ever gets to loading the oracle ODBC
>
> Do you know what is happening here:
>
> read(3, "[OracleSQL]\nDescription=Oracle O"..., 4096) = 114
> read(3, "", 4096)                       = 0
> open("/vol1/aimia/.odbcinst.ini", O_RDONLY) = -1 ENOENT (No such file or
> directory)
> open("/usr/local/etc/odbcinst.ini", O_RDONLY) = 3
> read(3, "[OracleSQL]\nDescription=Oracle O"..., 4096) = 114
> read(3, "", 4096)                       = 0
> open("/vol1/aimia/.odbcinst.ini", O_RDONLY) = -1 ENOENT (No such file or
> directory)
> open("/vol1/aimia/.odbc.ini", O_WRONLY|O_APPEND|O_CREAT, 0666) = 3
> open("/vol1/aimia/.odbc.ini", O_RDONLY) = 3
> read(3, "", 4096)                       = 0
> open("/usr/local/etc/odbc.ini", O_RDONLY) = 3
> open("/usr/local/etc/odbc.ini", O_RDONLY) = 3
> read(3, "\n[SELFDEV]\nDriver = OracleSQL\nSe"..., 4096) = 98
>
>
> Unfortunately there just isn't enough on the Internet about connecting to
> Oracle this way so I'm struggling to define where it's gone wrong despite
> chopping and changing everything

It (unixODBC) first tries to read the user odbcinst.ini, there isnt one,
then it goes on to read the system one in /usr/local/etc/odbcinst.ini.

Then it repears that process with odbc.ini

--
Nick
_______________________________________________
unixODBC-support mailing list
[hidden email]
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-support
Reply | Threaded
Open this post in threaded view
|

Re: isql segmentation fault - stuck

sambuca555
Oh Ok, so the strace will not actually tell you what is actually killing it?

Oh Ok, so the strace will not actually tell you what is actually killing it?

open("/usr/local/etc/odbcinst.ini", O_RDONLY) = 3
read(3, "[OracleSQL]\nDriver=/usr/lib/orac"..., 4096) = 114
read(3, "", 4096)                       = 0
open("/vol1/aimia/.odbcinst.ini", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/etc/odbcinst.ini", O_RDONLY) = 3
read(3, "[OracleSQL]\nDriver=/usr/lib/orac"..., 4096) = 114
read(3, "", 4096)                       = 0
open("/vol1/aimia/.odbcinst.ini", O_RDONLY) = -1 ENOENT (No such file or directory)
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++
[ Process PID=1297 runs in 32 bit mode. ]

That could very well mean it's finished loading in the odbcinst and odbc and attempting something else while being killed.

Not sure where to look next though, I might try the EasySoft driver but can't seem to access their ftp site today
Reply | Threaded
Open this post in threaded view
|

Re: isql segmentation fault - stuck

Daniel Vidal-3
hi

maybe a broken library?

you can use the "ldd" command over libsqora.so

Oracle 10 search for libodbcinst.so.1 but in some cases this file does
not exist and must make a link.

  sorry for my english
--------------------------------------------------------------------------------------------
 > ldd  libsqora.so
         linux-vdso.so.1 =>  (0x00007fff22798000)
         libdl.so.2 => /lib64/libdl.so.2 (0x00007f1449231000)
         libm.so.6 => /lib64/libm.so.6 (0x00007f1448fac000)
         libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f1448d8f000)
         libnsl.so.1 => /lib64/libnsl.so.1 (0x00007f1448b76000)
         libclntsh.so.10.1 =>
/usr/lib/oracle/10.2.0.4/client64/lib/libclntsh.so.10.1 (0x00007f14477ab000)
         libodbcinst.so.1 => /usr/lib64/libodbcinst.so.1
(0x00007f144759a000)
         libc.so.6 => /lib64/libc.so.6 (0x00007f1447207000)
         /lib64/ld-linux-x86-64.so.2 (0x000000368d000000)
         libnnz10.so =>
/usr/lib/oracle/10.2.0.4/client64/lib/libnnz10.so (0x00007f1446d66000)
         libltdl.so.7 => /usr/lib64/libltdl.so.7 (0x00007f1446b5d000)

----------------------------------------------------------------------



El 19/11/2013 14:30, sambuca555 escribió:

> Oh Ok, so the strace will not actually tell you what is actually killing it?
>
> Oh Ok, so the strace will not actually tell you what is actually killing it?
>
> open("/usr/local/etc/odbcinst.ini", O_RDONLY) = 3
> read(3, "[OracleSQL]\nDriver=/usr/lib/orac"..., 4096) = 114
> read(3, "", 4096)                       = 0
> open("/vol1/aimia/.odbcinst.ini", O_RDONLY) = -1 ENOENT (No such file or
> directory)
> open("/usr/local/etc/odbcinst.ini", O_RDONLY) = 3
> read(3, "[OracleSQL]\nDriver=/usr/lib/orac"..., 4096) = 114
> read(3, "", 4096)                       = 0
> open("/vol1/aimia/.odbcinst.ini", O_RDONLY) = -1 ENOENT (No such file or
> directory)
> --- SIGSEGV (Segmentation fault) @ 0 (0) ---
> +++ killed by SIGSEGV +++
> [ Process PID=1297 runs in 32 bit mode. ]
>
> That could very well mean it's finished loading in the odbcinst and odbc and
> attempting something else while being killed.
>
> Not sure where to look next though, I might try the EasySoft driver but
> can't seem to access their ftp site today
>
>
>
> --
> View this message in context: http://unixodbc.13851.n7.nabble.com/isql-segmentation-fault-stuck-tp3937p3946.html
> Sent from the Support mailing list archive at Nabble.com.
> _______________________________________________
> unixODBC-support mailing list
> [hidden email]
> http://mailman.unixodbc.org/mailman/listinfo/unixodbc-support
>
>

_______________________________________________
unixODBC-support mailing list
[hidden email]
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-support
Reply | Threaded
Open this post in threaded view
|

Re: isql segmentation fault - stuck

sambuca555
Hi Daniel,

ldd libsqora.so.11.1
   linux-gate.so.1 =>  (0xffffe000)
   libdl.so.2 => /lib/libdl.so.2 (0xf7f55000)
   libm.so.6 => /lib/libm.so.6 (0xf7f2e000)
   libpthread.so.0 => /lib/libpthread.so.0 (0xf7f16000)
   libnsl.so.1 => /lib/libnsl.so.1 (0xf7eff000)
   libclntsh.so.11.1 (0xf61f5000)
   libodbcinst.so.1 => /usr/lib/libodbcinst.so.1 (0xf61de000)
   libc.so.6 => /lib/libc.so.6 (0xf609c000)
   /lib/ld-linux.so.2 (0x56555000)
   libnnz11.so (0xf5e4f000)
   libaio.so.1 => /usr/lib/libaio.so.1 (0xf5e4d000)

Yes someone else had suggested the possible problem around libodbcinst.so.1 so I created a symlink in /usr/lib

libodbcinst.so.1 -> /usr/local/lib/libodbcinst.so.2

But still get the same error.


Reply | Threaded
Open this post in threaded view
|

Re: isql segmentation fault - stuck

sambuca555
I also got the same error when trying the Easysoft Driver.
It must be something to do with installing the 32bit version of unixODBC on Suse 10 64 bit.

I did that by export CFLAGS=-m32 then running ./configure.

Probably time to give up.
Reply | Threaded
Open this post in threaded view
|

Re: isql segmentation fault - stuck

Nick Gorham-2
On 19/11/13 21:33, sambuca555 wrote:
> I also got the same error when trying the Easysoft Driver.
> It must be something to do with installing the 32bit version of unixODBC on
> Suse 10 64 bit.
>
> I did that by export CFLAGS=-m32 then running ./configure.
>
> Probably time to give up.

Try using the version of unixODBC that comes with the Easysoft driver.

Which of our drivers did you use? The one that uses the Oracle client,
or the wire protocol (no client) version.

--
Nick
_______________________________________________
unixODBC-support mailing list
[hidden email]
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-support
Reply | Threaded
Open this post in threaded view
|

Re: isql segmentation fault - stuck

sambuca555
Hi Nick,

Yeah I tried that version as well to no avail.

What I have got working is a mysql driver, which means it must be something about Oracle

The mysql driver that works is:
mysql-connector-odbc-3.51.30-linux-glibc2.3-x86-32bit/lib/libmyodbc3.so


I tried your EasySoft Oracle WP (no client) version
odbcinst.ini
[Easysoft ODBC-Oracle WP]
Description             = Easysoft Oracle ODBC WP Driver
Driver          = /usr/local/easysoft/oraclewp/lib/libesorawp.so
Setup           = /usr/local/easysoft/oraclewp/lib/libesorawpS.so
Threading               = 0
FileUsage               = 1
DontDLClose             = 1
UsageCount              = 1

odbc.ini
[SELFDEV_SAMPLE]
driver          = Easysoft ODBC-Oracle WP
description             = Easysoft Oracle ODBC WP driver
server          = 192.168.23.33
port            = 1521
sid             = SELFDEV
user            = xxxxx
password                = xxxxx
logging         = No
logfile         =
enable_user_catalog             = yes
enable_synonyms         = yes
metadata_dont_change_case               = no
metadata_dont_do_schema         = no
metadata_id             = no
limit_long              = 0


Still no luck, I'm wondering whether I just try various oracle drivers like I did with mysql to try get it to work.


Reply | Threaded
Open this post in threaded view
|

Re: isql segmentation fault - stuck

Nick Gorham-2
On 20/11/13 09:51, sambuca555 wrote:

> Hi Nick,
>
> Yeah I tried that version as well to no avail.
>
> What I have got working is a mysql driver, which means it must be something
> about Oracle
>
> The mysql driver that works is:
> mysql-connector-odbc-3.51.30-linux-glibc2.3-x86-32bit/lib/libmyodbc3.so
>
>
> I tried your EasySoft Oracle WP (no client) version
> odbcinst.ini
> [Easysoft ODBC-Oracle WP]
> Description             = Easysoft Oracle ODBC WP Driver
> Driver          = /usr/local/easysoft/oraclewp/lib/libesorawp.so
> Setup           = /usr/local/easysoft/oraclewp/lib/libesorawpS.so
> Threading               = 0
> FileUsage               = 1
> DontDLClose             = 1
> UsageCount              = 1
>
> odbc.ini
> [SELFDEV_SAMPLE]
> driver          = Easysoft ODBC-Oracle WP
> description             = Easysoft Oracle ODBC WP driver
> server          = 192.168.23.33
> port            = 1521
> sid             = SELFDEV
> user            = xxxxx
> password                = xxxxx
> logging         = No
> logfile         =
> enable_user_catalog             = yes
> enable_synonyms         = yes
> metadata_dont_change_case               = no
> metadata_dont_do_schema         = no
> metadata_id             = no
> limit_long              = 0
>
>
> Still no luck, I'm wondering whether I just try various oracle drivers like
> I did with mysql to try get it to work.

Ok, but if you still get the seg fault with the wire protocol driver, at
least I can look at bit closer at the problem. Turn on logging in the
Easysoft driver try and connect and send me the log (or
[hidden email]) and we will see if that shows any clues.

[SELFDEV_SAMPLE]
driver          = Easysoft ODBC-Oracle WP
description     = Easysoft Oracle ODBC WP driver
server          = 192.168.23.33
port            = 1521
sid             = SELFDEV
user            = xxxxx
password                = xxxxx
logging         = Yes
logfile         = /tmp/orawp.log
enable_user_catalog             = yes
enable_synonyms         = yes
metadata_dont_change_case               = no
metadata_dont_do_schema         = no
metadata_id             = no
limit_long              = 0

--
Nick


_______________________________________________
unixODBC-support mailing list
[hidden email]
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-support