From: akr@... Date: 2014-01-29T22:29:51+00:00 Subject: [ruby-core:60229] [ruby-trunk - Feature #9427] [Feedback] [PATCH] io.c: remove socket check for sendfile Issue #9427 has been updated by Akira Tanaka. Status changed from Closed to Feedback It seems the patch causes problems on CentOS 5.9 (i686) http://c5632.rubyci.org/~chkbuild/ruby-trunk/log/20140129T110302Z.diff.html.gz + ) +An exception occurred during: before :each +Net::FTP#putbinaryfile when resuming an existing file and the APPE command fails raises a Net::FTPTempError when the response code is 421 ERROR +Errno::EADDRINUSE: Address already in use - bind(2) for "localhost" port 9921 +/home/chkbuild/build//rubyspec/library/net/ftp/fixtures/server.rb::in `initialize' +/home/chkbuild/build//rubyspec/library/net/ftp/fixtures/server.rb::in `new' +/home/chkbuild/build//rubyspec/library/net/ftp/fixtures/server.rb::in `initialize' +/home/chkbuild/build//rubyspec/library/net/ftp/shared/putbinaryfile.rb::in `new' +/home/chkbuild/build//rubyspec/library/net/ftp/shared/putbinaryfile.rb::in `block (2 levels) in ' +/home/chkbuild/build//rubyspec/library/net/ftp/putbinaryfile_spec.rb::in `' + ) +An exception occurred during: after :each +Net::FTP#putbinaryfile when resuming an existing file and the APPE command fails raises a Net::FTPTempError when the response code is 421 ERROR +IOError: closed stream +/home/chkbuild/build//rubyspec/library/net/ftp/fixtures/server.rb::in `close' +/home/chkbuild/build//rubyspec/library/net/ftp/fixtures/server.rb::in `stop' +/home/chkbuild/build//rubyspec/library/net/ftp/shared/putbinaryfile.rb::in `block (2 levels) in ' +/home/chkbuild/build//rubyspec/library/net/ftp/putbinaryfile_spec.rb::in `' ... Any idea? ---------------------------------------- Feature #9427: [PATCH] io.c: remove socket check for sendfile https://bugs.ruby-lang.org/issues/9427#change-44708 * Author: Eric Wong * Status: Feedback * Priority: Normal * Assignee: Akira Tanaka * Category: core * Target version: current: 2.2.0 ---------------------------------------- Linux uses splice internally for sendfile since 2.6.23, allowing sendfile to work for arbitrary destinations. We gracefully handle EINVAL/ENOSYS from sendfile anyways, so we will hit the old fallback to read/write if the system cannot perform sendfile to non-sockets. Verified using strace on the following one line script: IO.copy_stream(__FILE__, "/dev/null") ---------------------------------------------------------------- The following changes since commit 971ef822679dfa6ee63ff83a47b4e4d1aa60d146: * ext/socket: Avoid unnecessary ppoll/select on Linux. Patch by Eric Wong. [ruby-core:57950] [Bug #9039] (2014-01-18 14:13:22 +0000) are available in the git repository at: git://80x24.org/ruby.git sendfile-anydest for you to fetch changes up to 01fdf26d720a21820f4f51fade5f8b156948403b: io.c: remove socket check for sendfile (2014-01-18 22:27:17 +0000) ---------------------------------------------------------------- Eric Wong (1): io.c: remove socket check for sendfile io.c | 2 -- 1 file changed, 2 deletions(-) ---Files-------------------------------- 0001-io.c-remove-socket-check-for-sendfile.patch (908 Bytes) -- http://bugs.ruby-lang.org/