Skip to content

Instantly share code, notes, and snippets.

@ribasushi
Created April 30, 2016 09:15
Show Gist options
  • Save ribasushi/3a4994b4a9e7cbd7e34cc442bffa63d3 to your computer and use it in GitHub Desktop.
Save ribasushi/3a4994b4a9e7cbd7e34cc442bffa63d3 to your computer and use it in GitHub Desktop.
Note for the observers: "Coro's author refuses" is factually incorrect, here is the actual sequence of events:
  • A while ago Coro gets a bugreport about XS-level signal handlers and Perl-level signal handlers going out of sync
  • Coro's author reaches deep into perl internals to patch this up for the runtime, writes extensive tests for it, fixes the Coro-level manifestation
  • in 5.21.8 the hook interface is removed in order to (sic) save 4k of memory PER PROCESS: https://github.com/Perl/perl5/commit/c910fead7893
  • A ticket is raised against 5.22.0-to-be, and dies after some discussion: http://www.nntp.perl.org/group/perl.perl5.porters/2015/05/msg228257.html
  • The issue is however acknowledged but not much is done to fixing it https://rt.perl.org/Public/Bug/Display.html?id=125439
  • As a result Coro as a toolkit can either
    • remove a part of its tests and continue being buggy under a known use scenario
    • refuse to build on 5.21.8+ until either P5#125439 is resolved or c910fead7893 is rolled back
  • The author chose the second option (which is exactly what I would do myself in his situation)
  • The "stableperl fork" is a courtesy tarball prepared for users who have no way out, and are not sufficiently competent to apply the single line patch necessary: https://twitter.com/ribasushi/status/720899317641388034
  • As of 5.24.0_rc3 the interpreter is still having the necessary hook point const-ed "for cause", and thus the "stalemate" remains unbroken
  • As far as I can see (with albeit limited knowledge of internals), there is no other way of fixing this other than having the single-point within the interpreter doing the right thing (also acknowledged indirectly by Corion in https://rt.perl.org/Public/Bug/Display.html?id=125439#txn-1354081: I think Perl should take the code from Coro to make $SIG{__WARN__} always write+read PL_warnhook
@cpansprout
Copy link

cpansprout commented May 6, 2016

To put things in perspective:

Explanation of what Coro is really doing: http://www.nntp.perl.org/group/perl.perl5.porters/2016/05/msg236187.html
A Coro patch: http://www.nntp.perl.org/group/perl.perl5.porters/2016/05/msg236199.html

(Unfortunately, www.nntp.perl.org does not make the patch in the second message available. I use NNTP to download patches.)

The patch is so trivial that someone with enough knowledge of perl internals to write something like Coro would be able to write it easily.

In short, “Coro’s author refuses” is factually correct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment