[#43186] [Ruby 1.9-Bug#4388][Open] open-uriで環境変数http_proxyを使うときに認証付きのProxyが使えません — あつし よしだ <redmine@...>

Bug #4388: open-uri=E3=81=A7=E7=92=B0=E5=A2=83=E5=A4=89=E6=95=B0http_prox=

11 messages 2011/02/10
[#43192] [Ruby 1.9-Bug#4388] open-uriで環境変数http_proxyを使うときに認証付きのProxyが使えません — あつし よしだ <redmine@...> 2011/02/11

チケット #4388 が更新されました。 (by あつし よしだ)

[#43193] Re: [Ruby 1.9-Bug#4388] open-uriで環境変数http_proxyを使うときに認証付きのProxyが使えません — Tanaka Akira <akr@...> 2011/02/11

2011年2月11日12:59 あつし よしだ <redmine@ruby-lang.org>:

[#43203] [Ruby 1.9-Bug#4397][Open] test-mkmf fails due to compilation errors — Shyouhei Urabe <redmine@...>

Bug #4397: test-mkmf fails due to compilation errors

10 messages 2011/02/14

[#43272] [Ruby 1.9 - Bug #4443] [Open] odd evaluation order in a multiple assignment — Yusuke Endoh <mame@...>

13 messages 2011/02/24

[#43274] [Ruby 1.9 - Bug #4445] [Open] ext/openssl の verify_callback が rb_protect で保護されていない — Ippei Obayashi <ohai@...>

13 messages 2011/02/24

[#43276] iseq_compile_each()でのマジックナンバ — きたざわけんいち <peisunstar@...>

きたざわです。

15 messages 2011/02/27
[#43303] Re: iseq_compile_each()でのマジックナンバ — nagachika <nagachika00@...> 2011/03/04

近永と申します。

[#43304] Re: iseq_compile_each()でのマジックナンバ — Yusuke ENDOH <mame@...> 2011/03/04

遠藤です。

[ruby-dev:43181] [Ruby 1.9-Bug#4387][Open] test_socket_connect_nonblock(TestSocketAddrinfo) がまれに失敗する

From: Motohiro KOSAKI <redmine@...>
Date: 2011-02-09 19:53:43 UTC
List: ruby-dev #43181
Bug #4387: test_socket_connect_nonblock(TestSocketAddrinfo) がまれに失敗する
http://redmine.ruby-lang.org/issues/show/4387

起票者: Motohiro KOSAKI
ステータス: Open, 優先度: Normal
カテゴリ: core, Target version: 1.9.x
ruby -v: ruby 1.9.3dev (2011-02-09 trunk 30831) [i386-mswin32_100]

1割ぐらいの確率でtest-allが以下のエラーを吐きます

 57) Error:
test_socket_connect_nonblock(TestSocketAddrinfo):
Errno::EINVAL: Invalid argument - connect(2)
    C:/ruby/trunk/test/socket/test_addrinfo.rb:163:in `connect_nonblock'
    C:/ruby/trunk/test/socket/test_addrinfo.rb:163:in `rescue in test_socket_con
nect_nonblock'
    C:/ruby/trunk/test/socket/test_addrinfo.rb:158:in `test_socket_connect_nonbl
ock'


なお、OSレベルでは WSAGetLastError() が WSAEINVALを返しています。

MSDNからそれっぽい部分をいくつかピックアップすると
http://msdn.microsoft.com/en-us/library/ms737625(v=vs.85).aspx

WSAEALREADY: A nonblocking connect call is in progress on the specified socket.
             Note  In order to preserve backward compatibility, this error is reported as
             WSAEINVAL to Windows Sockets 1.1 applications that link to either Winsock.dll or
             Wsock32.dll.
WSAEINVAL: The parameter s is a listening socket.

とあるので、
 o selectが正しく動いておらず、connect完了する前に処理がもどってしまうので、connectがEINVALを返している
 o selectはちゃんと動いているけど、connectがトチ狂ってEISCONNを返さずにEINVALを返している

の2択なんですが、どちらなのかは切り分けできませんでした。誰か良い案があれば教えてください。


これだけではアレなので、いくつか調査報告など

w3cのhttpのサンプルコードだと、EINVALはEISCONNと同等の処理をするようになっています。
http://www.w3.org/Library/src/HTTCP.c

NetBSDのconnectにも昔EINVALを返す問題があったそうですが、どう対処したのかはよく分かりませんでした
http://mail-index.netbsd.org/netbsd-bugs/2003/08/18/0002.html
↑ なんと報告者は Kambeさん

ruby-talkでそれっぽい話をしているログをみつけたのですが、こちらも結論分からず。
http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/16632


----------------------------------------
http://redmine.ruby-lang.org

In This Thread

Prev Next