Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

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 the-script.pl -db db1 -user dbuser -pass *** DBI 1.636-ithread default trace level set to 0x0/9 (pid 22036 pi 9 +2a7008) at DBI.pm line 296 via GetDBHandle.pm 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/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(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/Oracle.pm line 81 via at /prod/Modules/GetDBHandle.pm 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/Oracle.pm line 81 via at /prod/Modules/GetDBH +andle.pm 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/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, 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


In reply to segmentation fault with DBI->connect by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (7)
As of 2024-04-16 18:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found