Skip Menu |
Report information
Id: 127865
Status: open
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: rob [at]
Cc: hanenkamp <sterling [at]>

Severity: (no value)
Tag: (no value)
Platform: (no value)
Patch Status: (no value)
VM: (no value)

Subject: Throwing a control exception within Lock.protect causes LTA locking behavior
Download (untitled) / with headers
text/plain 511b
If I have a control exception within a Lock.protect, the lock in question is still in a locked state after the call to protect returns. On MoarVM, this has the side effect when a ReentrantMutex object gets collected, the underlying pthread_mutex is still locked. pthread_mutex_destroy thus fails, and libuv calls abort(). To reproduce this, run the attached script, or follow these instructions: $ git clone $ git checkout ad7da71 $ perl6 -Ilib t/http-1.0.t
text/x-perl 134b
use v6; for ^1_000_000 { .say if $_ %% 1_000; my $lock =; $lock.protect({ next; }); } say 'end';
Download (untitled) / with headers
text/plain 138b
Seems to work fine, on my 32 bit VM, with 'This is Rakudo version 2017.09-348-g830084430 built on MoarVM version 2017.09.1-575-gd4e230a69'

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at