Subject: | Thread race in dist/IO/IO.xs |
Date: | Mon, 3 Aug 2015 18:14:24 -0700 |
To: | bug-IO [...] rt.cpan.org |
From: | William Ahern <william [...] 25thandClement.com> |
There's a thread race in IO.xs with the manipulation of PL_check. The Perl5
ticket I submitted contains a longer description of the issue:
https://rt.perl.org/Public/Bug/Display.html?id=125685
With this bug you cannot use the IO module from multiple interpreters in
different threads. My solution was to preload IO.xs when creating each
interpreter while holding an exclusive write lock, and use reader locks when
running Perl code so IO.xs cannot be loaded in parallel with regular code.