Skip to content

Add In HA Event Callback #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 797 commits into
base: master
Choose a base branch
from
Open

Conversation

byterock
Copy link

Had this patch lying about on an old box.

here is a link on the ORacel site

https://docs.oracle.com/database/121/ADFNS/adfns_avail.htm#ADFNS920

and the OCI docs

https://docs.oracle.com/cd/E11882_01/appdev.112/e10646/oci09adv.htm#LNOCI16691

Will add it in later this wee

yanick and others added 30 commits January 19, 2014 18:33
…tions

This is a rather hairy change as charsetid and ncharsetid were global
and used all over the place.
NOTE, you cannot actually build this because there is no VERSION in
Oracle.pm because the repo is missing dist.ini and is probably
using distzilla. To make it build I had to add
$DBD::Oracle::VERSION = '1.63_00';
after require 5.006 in Oracle.pm
It is also missing ABSTRACT
github-flavored markdown

fine-tune CONTRIBUTING.mkd
lzsiga and others added 27 commits July 15, 2024 21:01
On Gentoo, for better or worse, we install oracle-instantclient on 64-bit
systems to /usr/lib64/oracle/client/ with:
* /usr/lib64/oracle/client/lib for 32-bit libraries (multilib)
* /usr/lib64/oracle/client/lib64 for native 64-bit libraries

Adapt the logic to handle lib64 if it exists and we're using a 64-bit Perl.

(And fix some whitespace while at it.)
On Gentoo we install oracle-instantclient libraries in
/usr/lib64/oracle/client/lib64 on 64-bit systems and in
/usr/lib/oracle/client/lib on 32-bit systems.

This was done because in a 64-bit system with multilib,
both 32-bit libraries (/usr/lib64/oracle/client/lib) and
64-bit libraries (/usr/lib64/oracle/client/lib64) were
installed. For now, this specification is disabled because
it is rare to have the same version of oracle instantclient
for both 32-bit and 64-bit.
Along with appropriate update to Github Action.

Also we don't care about ExtUtils::MakeMaker version number anymore.

This fixes GH#175.
- SEGV's happen during the call to OCISessionEnd()
  (based on my usecase)
   o WHEN there are three or more threads
   o Connected to the same DB user at the same time
   o When the last thread makes the call to OCISessionEnd() the SEGV
     is created.
- I have discovered 05/05(today) that the SEGV can be iliminated (avoided)
   o WHEN the last thread to connect is the first to OCISessionEnd()
   o I'm going to write another smaller Perl script to reproduce
     the SEV and its avoidance.
- messages have been released to seek a new life by going into the "LIGHT"
Noted that t/15threads.t randomly SEGV's

This happens a lot.
t/16cached.t .............. Can't call method "prepare" on an undefined value at .../t/cache2.pl line 21.

I figure others are seeing these same issues as I am.

t/rt74753-utf8-encoded.t .. 1/3 Issuing rollback() due to DESTROY without explicit disconnect() of DBD::Oracle::db handle ORA19C at t/rt74753-utf8-encoded.t line 86.
t/rt74753-utf8-encoded.t .. ok
t/rt85886.t ............... 1/2
SV = PV(0x5aa9e32f1c60) at 0x5aa9e349c358
  REFCNT = 1
  FLAGS = (POK,pPOK)
  PV = 0x5aa9e34b4590 "1"\0
  CUR = 1
  LEN = 16
t/rt85886.t ............... Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/2 subtests

Test Summary Report
-------------------
t/16cached.t            (Wstat: 256 (exited 1) Tests: 1 Failed: 1)
  Failed test:  1
  Non-zero exit status: 1
t/90-segv.t             (Wstat: 139 (Signal: SEGV, dumped core) Tests: 37 Failed: 0)
  Non-zero wait status: 139
  Parse errors: No plan found in TAP output
t/rt85886.t             (Wstat: 256 (exited 1) Tests: 2 Failed: 1)
  Failed test:  2
  Non-zero exit status: 1
Files=44, Tests=1492, 237 wallclock secs ( 0.22 usr  0.19 sys +  3.70 cusr  2.10 csys =  6.21 CPU)
Result: FAIL
Failed 3/44 test programs. 2/1492 subtests failed.
make: *** [Makefile:1114: test_dynamic] Error 1
…mory leak.

I've left this better than I found it. But not as clean as I would like.
This isn't mine to own or make such decisions. But ...
 Parhaps it's time to abandon all that old Oracle Support.
(Some how I doubt it's been tested in a long time!)
Require perl-5.30.3+ & Oracle 17+. Clean up and simplify. Call it 2.0!
The existing threads test no longer SEGV's and the test I added also passes.

There are a couple of preexisting test fails I'll leave to the maintainers.

- God Speed!

t/rt85886.t ............... 1/2
SV = PV(0x6479e78dba50) at 0x6479e797ea60
  REFCNT = 1
  FLAGS = (POK,pPOK)
  PV = 0x6479e7a88350 "1"\0
  CUR = 1
  LEN = 16
t/rt85886.t ............... Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/2 subtests

Test Summary Report
-------------------
t/16cached.t            (Wstat: 256 (exited 1) Tests: 1 Failed: 1)
  Failed test:  1
  Non-zero exit status: 1
t/rt85886.t             (Wstat: 256 (exited 1) Tests: 2 Failed: 1)
  Failed test:  2
  Non-zero exit status: 1
Files=44, Tests=1488, 19 wallclock secs ( 0.25 usr  0.10 sys +  4.15 cusr  1.68 csys =  6.18 CPU)
Result: FAIL
Failed 2/44 test programs. 2/1488 subtests failed.
make: *** [Makefile:1114: test_dynamic] Error 1
  to make tests consistent in the opertion.
Spruced up tests to eliminate noise from the "ok's"
   OCISessionEnd_log_stat()
   OCIServerDetach_log_stat()
  a balance between detecton, reporting and making the issue worse.
As the minimum required version of DBI is 1.623, these

when the versions stored in these variables change in DBI
I have fixed all DBD::Oracle bugs (I could detect). I have this remaining
  SEGV fault within Perl itself.

ADDED: Additional forking test that reproduces SEGV
  within Perl 5.30.3+ using Oracle 19, 21 & 23. I've only tested
  with these combinations.

$ gdb $(which perl)
 -- snip --
(gdb) run t/92-segv-fork.t
 -- snip --

Thread 2 "perl" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff1cc4680 (LWP 9807)]
0x000055555562e610 in Perl_csighandler3 (sig=17, sip=0x0, uap=0x0) at mg.c:1601
1601	           (PL_signals & PERL_SIGNALS_UNSAFE_FLAG))
(gdb) list
1596	           sig == SIGSEGV ||
1597	#endif
1598	#ifdef SIGFPE
1599	           sig == SIGFPE ||
1600	#endif
1601	           (PL_signals & PERL_SIGNALS_UNSAFE_FLAG))
1602	        /* Call the perl level handler now--
1603	         * with risk we may be in malloc() or being destructed etc. */
1604	    {
1605	        if (PL_sighandlerp == Perl_sighandler)
(gdb) bt
    futex_word=0x5555563af118) at ./nptl/futex-internal.c:57
    at ./nptl/futex-internal.c:87
    abstime=abstime@entry=0x7ffff1cc3e00, private=private@entry=0) at ./nptl/futex-internal.c:139
    at ./nptl/pthread_cond_wait.c:503
(gdb)
The comments were typo "CITY"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.