Branch: refs/heads/smoke-me/tonyc/23226-atfork
  Home:   https://github.com/Perl/perl5
  Commit: b7929ab640fb12ed3a34f2fea180d19b341ac197
      
https://github.com/Perl/perl5/commit/b7929ab640fb12ed3a34f2fea180d19b341ac197
  Author: Tony Cook <t...@develop-help.com>
  Date:   2025-07-16 (Wed, 16 Jul 2025)

  Changed paths:
    M embed.fnc
    M embed.h
    M ext/ExtUtils-Miniperl/lib/ExtUtils/Miniperl.pm
    M ext/XS-APItest/t/thread.t
    M miniperlmain.c
    M proto.h
    M util.c

  Log Message:
  -----------
  update PL_main_thread on fork()

85e97066 modified the perl signal handler to forward signals to the
main thread if it received a signal in a non-perl thread, which
required saving the id of the main perl thread.

Unfortunately I forgot to handle a possible change in the main thread
id on a fork, this fixes that by re-saving the new main thread id
immediately after a fork (via pthread_atfork())

On Linux it appears that the main thread id returned by pthread_seld()
is constant between processes, but this may not be true on other
platforms.

Discussed at:

https://github.com/Perl/perl5/issues/23326#issuecomment-3050481975


  Commit: bd91c49228b5abc719bf1a362c88521050c4baaf
      
https://github.com/Perl/perl5/commit/bd91c49228b5abc719bf1a362c88521050c4baaf
  Author: Tony Cook <t...@develop-help.com>
  Date:   2025-07-16 (Wed, 16 Jul 2025)

  Changed paths:
    M ext/XS-APItest/APItest.pm
    M ext/XS-APItest/APItest.xs
    M ext/XS-APItest/t/thread.t
    M ext/XS-APItest/typemap

  Log Message:
  -----------
  add direct tests for the bug reported in #22487

This was fixed by 85e97066 but the test only checked the sanity of the
saved main thread thread id.

Tested locally for failure by disarming the change in
Perl_csighandler3.


  Commit: bcb1bff6f2f7b1dc3be268f9ae9ae6505eb2fadd
      
https://github.com/Perl/perl5/commit/bcb1bff6f2f7b1dc3be268f9ae9ae6505eb2fadd
  Author: Tony Cook <t...@develop-help.com>
  Date:   2025-07-16 (Wed, 16 Jul 2025)

  Changed paths:
    M ext/XS-APItest/t/thread.t

  Log Message:
  -----------
  foreign thread signal forwarding: swap tests to support OpenBSD

On OpenBSD, With the tests in the original order, with the parent
process setting a signal handler and accepting a foreign signal, the
child process test would block busy waiting when the child process
called exit.

>From looking at kdump the child process is busy waiting on sched_yield
outside the perl process.

Since this appears to be OpenBSD specific (other BSD, linux, MacOS
work fine), and the sequence causing the problem seems unlikely
outside a test scenario I'm not going to investigate further.


Compare: https://github.com/Perl/perl5/compare/a2c167ba4993...bcb1bff6f2f7

To unsubscribe from these emails, change your notification settings at 
https://github.com/Perl/perl5/settings/notifications

Reply via email to