Skip to content

Conversation

ancientwizard
Copy link

I've readded a patch that will allow signaling on Windows to work. This time I don't specifically test for Windows but rather use alternative signals when USR1/USR2 are not supported and Perl complains about it using a warning. I assign HUP/INT respectively. While Windows may be the only OS deficient of USR1/USR2 I can't be sure.

I suspect there are other cleanups you' all will like to implement such as skipping under certain conditions, OS's etc. I only do Linux/UNIX so I'll let someone with a Windows setup decide how to proceed, if they so choose.

Good luck my new DBD::Oracle friends. Now I need to get on the warpath of other unrelated issues so that one day I may be able to use a Perl > 5.32.1

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"
  and someting is marginal. I didn't see the warnings and unable
  to locate a test that triggerd the use of this code path.
 least one additional non-Perl thread is created. If this thread
 is tapped to handle the SIGCHLD SEGV will result.
Allow test not to fail on mistake
  USR1 & USR2; replaced with HUP and INT for OS's (Windows)

Confirmed that the Perl Interrupt patch and it's alternative work
suitably well at protecting against the SEGV caused by Oracle
instant client non-Perl worker threads.
…e GitHub test

does not have thread support built in.
@djzort
Copy link
Collaborator

djzort commented Jun 1, 2025

I have cherry picked these on to the cand v1.91 branch

@djzort
Copy link
Collaborator

djzort commented Jun 1, 2025

You might like to base your work on a fresh copy of that branch

@djzort djzort closed this Jun 1, 2025
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.

2 participants