Subject: | segmentation fault with DBI->connect |
Date: | Tue, 12 Jun 2018 14:10:59 +0000 |
To: | "bug-DBI [...] rt.cpan.org" <bug-DBI [...] rt.cpan.org> |
From: | Richard Tomasso <richard.tomasso [...] exfo.com> |
So I've got a weird problem that may be in the DBI library. Two servers, one can connect to Oracle database and one cannot. The Oracle client setup and our code are identical on both machines. This is using Perl 5.20 connecting to Oracle 12.1 running on RHEL 7.3. I can connect to Oracle via SQLPlus on this machine. The strangest part is DBI->connect() is resulting in a segfault, I would have expected an error/exception to be raised but nothing, even setting that Attribute. No external connection is made.
Here is the trace. The GetDBHandle module just validates the arguments and makes the call to connect to return the dbh. I used all formats for the dsn and always get the same thing. I removed the attributes from the connect() call and it looks the same.
Any ideas?
bash-4.2$ export DBI_TRACE=9
bash-4.2$ perl the-script.pl -db db1 -user dbuser -pass ***
DBI 1.636-ithread default trace level set to 0x0/9 (pid 22036 pi 92a7008) at DBI.pm line 296 via GetDBHandle.pm line 48
Show quoted text
> DBI>connect(dbi:Oracle:db1, dbuser, ****, HASH(0x92aa668))
Show quoted text > DBI>install_driver(Oracle) for linux perl=5.020003 pid=22036 ruid=1009 euid=1009
install_driver: DBD::Oracle version 1.74 loaded from /prod/perl/lib/site_perl/5.20.3/i686-linux-thread-multi/DBD/Oracle.pm
New 'DBI::dr' (for DBD::Oracle::dr, parent='', id=undef)
dbih_setup_handle(DBI::dr=HASH(0xe8d8ec8)=>DBI::dr=HASH(0xe8d8f28), DBD::Oracle::dr, 0, Null!)
dbih_make_com(Null!, 0, DBD::Oracle::dr, 104, 0) thr#92a7008
dbih_setup_attrib(DBI::dr=HASH(0xe8d8f28), Err, Null!) SCALAR(0x9ffae30) (already defined)
dbih_setup_attrib(DBI::dr=HASH(0xe8d8f28), State, Null!) SCALAR(0x9d2e410) (already defined)
dbih_setup_attrib(DBI::dr=HASH(0xe8d8f28), Errstr, Null!) SCALAR(0x9ffae60) (already defined)
dbih_setup_attrib(DBI::dr=HASH(0xe8d8f28), TraceLevel, Null!) 0 (already defined)
dbih_setup_attrib(DBI::dr=HASH(0xe8d8f28), FetchHashKeyName, Null!) 'NAME' (already defined)
Show quoted text >> STORE DISPATCH (DBI::dr=HASH(0xe8d8ec8) rc1/1 @3 g2 ima41c pid#22036) at /prod/perl/lib/site_perl/5.20.3/i686-linux-thread-multi/DBD/Oracle.pm line 81 via at /prod/Modules/GetDBHandle.pm line 129
-> STORE in DBD::_::common for DBD::Oracle::dr (DBI::dr=HASH(0xe8d8ec8)~0xe8d8f28 'ShowErrorStatement' 1) thr#92a7008
STORE DBI::dr=HASH(0xe8d8f28) 'ShowErrorStatement' => 1
<- STORE= ( 1 ) [1 items] at /prod/perl/lib/site_perl/5.20.3/i686-linux-thread-multi/DBD/Oracle.pm line 81 via at /prod/Modules/GetDBHandle.pm line 129
<- install_driver= DBI::dr=HASH(0xe8d8ec8)
Show quoted text >> connect DISPATCH (DBI::dr=HASH(0xe8d8ec8) rc2/3 @5 g2 ima8001 pid#22036) at /prod/perl/lib/site_perl/5.20.3/i686-linux-thread-multi/DBI.pm line 684 via at /prod/Modules/GetDBHandle.pm line 129
-> connect for DBD::Oracle::dr (DBI::dr=HASH(0xe8d8ec8)~0xe8d8f28 'db1' 'dbuser' **** HASH(0x9cf5588)) thr#92a7008
New 'DBI::db' (for DBD::Oracle::db, parent=DBI::dr=HASH(0xe8d8f28), id=undef)
dbih_setup_handle(DBI::db=HASH(0xe8df1e8)=>DBI::db=HASH(0xe8df138), DBD::Oracle::db, 9d39c48, Null!)
dbih_make_com(DBI::dr=HASH(0xe8d8f28), 92c9918, DBD::Oracle::db, 240, e8df168) thr#92a7008
dbih_setup_attrib(DBI::db=HASH(0xe8df138), Err, DBI::dr=HASH(0xe8d8f28)) SCALAR(0x9d39e18) (already defined)
dbih_setup_attrib(DBI::db=HASH(0xe8df138), State, DBI::dr=HASH(0xe8d8f28)) SCALAR(0x9d39e78) (already defined)
dbih_setup_attrib(DBI::db=HASH(0xe8df138), Errstr, DBI::dr=HASH(0xe8d8f28)) SCALAR(0x9d39e48) (already defined)
dbih_setup_attrib(DBI::db=HASH(0xe8df138), TraceLevel, DBI::dr=HASH(0xe8d8f28)) 0 (already defined)
dbih_setup_attrib(DBI::db=HASH(0xe8df138), FetchHashKeyName, DBI::dr=HASH(0xe8d8f28)) 'NAME' (already defined)
dbih_setup_attrib(DBI::db=HASH(0xe8df138), HandleSetErr, DBI::dr=HASH(0xe8d8f28)) undef (not defined)
dbih_setup_attrib(DBI::db=HASH(0xe8df138), HandleError, DBI::dr=HASH(0xe8d8f28)) undef (not defined)
dbih_setup_attrib(DBI::db=HASH(0xe8df138), Profile, DBI::dr=HASH(0xe8d8f28)) undef (not defined)
OCIAttrSet(0,OCI_HTYPE_SESSION, f6d8bcd2,11,Attr=OCI_ATTR_DRIVER_NAME,0)=INVALID_HANDLE