Bug#522099: panic: MUTEX_LOCK (22) [op.c:453] in Perl 5.10.0 on Debian when using perlembed
Niko Tyni
ntyni at debian.org
Tue Mar 31 20:00:28 UTC 2009
On Tue, Mar 31, 2009 at 02:46:48PM -0400, David F. Skoll wrote:
> Perl 5.10.0 seems not to be able to create, destroy, then recreate an
> embedded Perl interpreter the way Perl 5.8.8 could under etch.
>
> Please see attached test case. Untar, then:
>
> ./configure && make && ./embperl
>
> On Etch / Perl 5.8.8, it prints "I'm very happy!" twice.
>
> On Lenny / Perl 5.10.0, it prints "I'm very happy!" the first time
> and then:
>
> panic: MUTEX_LOCK (22) [op.c:453] at script.pl line 1.
> BEGIN failed--compilation aborted at script.pl line 1.
> panic: MUTEX_LOCK (22) [op.c:453] at script.pl line 1.
I think you're supposed to call PERL_SYS_INIT3 on the real
main() argv and argc, not the ones you provide perl_parse().
Quoting perlembed.pod:
The macros PERL_SYS_INIT3() and PERL_SYS_TERM() provide system-specific
tune up of the C runtime environment necessary to run Perl interpreters
Also, the example under "Maintaining multiple interpreter instances"
initializes the main() arguments and then proceeds to call perl_parse
with completely other arguments.
The attached patch to your testcase makes it work for me with 5.10.0.
--
Niko Tyni ntyni at debian.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 522099-testcase.patch
Type: text/x-diff
Size: 885 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/perl-maintainers/attachments/20090331/6bbf13b3/attachment.patch
More information about the Perl-maintainers
mailing list