Skip Menu |
Report information
Id: 123461
Status: new
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: moritz <moritz.lenz+perl [at] gmail.com>
Cc:
AdminCc:

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



Date: Fri, 19 Dec 2014 20:10:07 +0100
From: Moritz Lenz <moritz [...] faui2k3.org>
To: rakudobug [...] perl.org
Subject: Channel.send prone to race conditions
Download (untitled) / with headers
text/plain 478b
This code in src/core/Channel.pm: method send(Channel:D: \item) { X::Channel::SendOnClosed.new.throw if $!closed; nqp::push($!queue, nqp::decont(item)); } Is prone to a race condition; after the 'if $!closed' check, another thread could close the channel, and either the item being pushed is silently lost, or things get added to the queue after it was closed. See also http://irclog.perlgeek.de/perl6/2014-12-19#i_9831072 for some discussion.


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

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