Project

General

Profile

Actions

Bug #4535

closed

[PATCH] fix race in blocking send_io/recv_io

Added by normalperson (Eric Wong) almost 13 years ago. Updated almost 13 years ago.

Status:
Closed
Target version:
ruby -v:
ruby 1.9.3dev (2011-03-28 trunk 31195) [x86_64-linux]
Backport:
[ruby-core:35574]

Description

=begin
There is no need to call select() before entering a blocking I/O
region since other threads may run. select() cannot guarantee
readability if the IO is shared across different
threads/processes. Furthermore, we actually need to select() on
EAGAIN/EINTR since the functions are intended to be blocking so
we move the select() calls into the retry loop.

=end


Files

0001-ext-socket-unixsocket.c-fix-race-in-blocking-send_io.patch (1.69 KB) 0001-ext-socket-unixsocket.c-fix-race-in-blocking-send_io.patch normalperson (Eric Wong), 03/29/2011 06:23 AM
0002-test-socket-test_unix.rb-test-case-for-bug-4535.patch (1.92 KB) 0002-test-socket-test_unix.rb-test-case-for-bug-4535.patch test case which reproduces the fixed error on my machine normalperson (Eric Wong), 03/29/2011 06:37 AM

Updated by normalperson (Eric Wong) almost 13 years ago

=begin
I managed to get a reproducible test case working on a machine I have access to.
=end

Updated by normalperson (Eric Wong) almost 13 years ago

Eric Wong wrote:


Bug #4535: [PATCH] fix race in blocking send_io/recv_io
http://redmine.ruby-lang.org/issues/4535

Btw, this was pushed this out to my git repo for convenience, I've
just rebased and repushed:

git pull git://bogomips.org/ruby fix-unix-send-recv-io

I really look forward to this fix getting into trunk and backported to
1.9.2, thanks!

--
Eric Wong

Updated by normalperson (Eric Wong) almost 13 years ago

Eric Wong wrote:


Bug #4535: [PATCH] fix race in blocking send_io/recv_io
http://redmine.ruby-lang.org/issues/4535

Ping? This may become a big issue for some apps I'm working on.

--
Eric Wong

Updated by ko1 (Koichi Sasada) almost 13 years ago

  • Status changed from Open to Assigned
  • Assignee set to kosaki (Motohiro KOSAKI)

Updated by akr (Akira Tanaka) almost 13 years ago

  • Status changed from Assigned to Closed
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0