Project

General

Profile

Actions

Bug #4535

closed

[PATCH] fix race in blocking send_io/recv_io

Added by normalperson (Eric Wong) over 13 years ago. Updated over 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
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0