Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

segmentation fault with DBI->connect

by Anonymous Monk
on Jun 11, 2018 at 19:36 UTC ( #1216431=perlquestion: print w/replies, xml ) Need Help??
Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

So I've got a weird problem. It may be a Perl problem in the DBI library. Two servers, one which the code can connect to Oracle database and one which cannot. The Oracle client setup and our code is 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. 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 -db db1 -user dbuser -pass *** DBI 1.636-ithread default trace level set to 0x0/9 (pid 22036 pi 9 +2a7008) at line 296 via line 48 > DBI>connect(dbi:Oracle:db1, dbuser, ****, HASH(0x92aa668)) > DBI>install_driver(Oracle) for linux perl=5.020003 pid=22036 rui +d=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/ 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(0x9f +fae30) (already defined) dbih_setup_attrib(DBI::dr=HASH(0xe8d8f28), State, Null!) SCALAR(0x +9d2e410) (already defined) dbih_setup_attrib(DBI::dr=HASH(0xe8d8f28), Errstr, Null!) SCALAR(0 +x9ffae60) (already defined) dbih_setup_attrib(DBI::dr=HASH(0xe8d8f28), TraceLevel, Null!) 0 (a +lready defined) dbih_setup_attrib(DBI::dr=HASH(0xe8d8f28), FetchHashKeyName, Null! +) 'NAME' (already defined) >> STORE DISPATCH (DBI::dr=HASH(0xe8d8ec8) rc1/1 @3 g2 ima41 +c pid#22036) at /prod/perl/lib/site_perl/5.20.3/i686-linux-thread-mul +ti/DBD/ line 81 via at /prod/Modules/ line 12 +9 -> STORE in DBD::_::common for DBD::Oracle::dr (DBI::dr=HASH(0xe8d +8ec8)~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/ line 81 via at /prod/Modules/GetDBH line 129 <- install_driver= DBI::dr=HASH(0xe8d8ec8) >> connect DISPATCH (DBI::dr=HASH(0xe8d8ec8) rc2/3 @5 g2 ima80 +01 pid#22036) at /prod/perl/lib/site_perl/5.20.3/i686-linux-thread-mu +lti/ line 684 via at /prod/Modules/ 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, 2 +40, e8df168) thr#92a7008 dbih_setup_attrib(DBI::db=HASH(0xe8df138), Err, DBI::dr=HASH(0xe8d +8f28)) SCALAR(0x9d39e18) (already defined) dbih_setup_attrib(DBI::db=HASH(0xe8df138), State, DBI::dr=HASH(0xe +8d8f28)) SCALAR(0x9d39e78) (already defined) dbih_setup_attrib(DBI::db=HASH(0xe8df138), Errstr, DBI::dr=HASH(0x +e8d8f28)) SCALAR(0x9d39e48) (already defined) dbih_setup_attrib(DBI::db=HASH(0xe8df138), TraceLevel, DBI::dr=HAS +H(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=H +ASH(0xe8d8f28)) undef (not defined) dbih_setup_attrib(DBI::db=HASH(0xe8df138), HandleError, DBI::dr=HA +SH(0xe8d8f28)) undef (not defined) dbih_setup_attrib(DBI::db=HASH(0xe8df138), Profile, DBI::dr=HASH(0 +xe8d8f28)) undef (not defined) OCIAttrSet(0,OCI_HTYPE_SESSION, f6d8bcd2,11,Attr=OCI_ATTR_DRIV +ER_NAME,0)=INVALID_HANDLE

2018-06-12 Athanasius changed <pre> to <code> tags

Replies are listed 'Best First'.
Re: segmentation fault with DBI->connect
by Anonymous Monk on Jun 14, 2018 at 01:52 UTC

    segmentation ..Oracle client setup identical on both machines


    Your DBI version is old curent is DBI-1.641

    The setup isn't totally identical, you didn't look deep enough... probably a mismatch of libc versions

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1216431]
Approved by Discipulus
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (5)
As of 2018-08-14 21:03 GMT
Find Nodes?
    Voting Booth?
    Asked to put a square peg in a round hole, I would:

    Results (155 votes). Check out past polls.