Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

Comment on

( #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 -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

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

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

  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?

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

    How do I use this? | Other CB clients
    Other Users?
    Others chilling in the Monastery: (4)
    As of 2018-12-10 12:01 GMT
    Find Nodes?
      Voting Booth?
      How many stories does it take before you've heard them all?

      Results (48 votes). Check out past polls.

      • (Sep 10, 2018 at 22:53 UTC) Welcome new users!