[ruby-dev:39579] [Bug #2310] should ensure GVL_UNLOCK_END in rb_thread_blocking_region

View: New views
4 Messages — Rating Filter:   Alert me  

[ruby-dev:39579] [Bug #2310] should ensure GVL_UNLOCK_END in rb_thread_blocking_region

by Tim Pease-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Bug #2310: should ensure GVL_UNLOCK_END in rb_thread_blocking_region
http://redmine.ruby-lang.org/issues/show/2310

起票者: _ wanabe
ステータス: Open, 優先度: Normal
カテゴリ: core, Target version: 1.9.x
ruby -v: ruby 1.9.2dev (2009-10-29 trunk 25559) [i386-mingw32]

rb_thread_blocking_region から呼び出された関数中で例外等の大域脱出が起きると
GVL_UNLOCK_END 等の後処理が呼ばれません。
例えば、WindowsXP のような WSASendMsg がない環境では以下のようにすると固まります。

$ ruby -rsocket -ve 'begin UDPSocket.new.sendmsg "hoge";rescue Exception;p $!;end';echo $?
ruby 1.9.2dev (2009-10-29 trunk 25559) [i386-mingw32]
#<NotImplementedError: sendmsg() function is unimplemented on this machine>
5  # <== CTRL+c を入力するまで表示されない


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


[ruby-dev:39580] [Bug #2310](Closed) should ensure GVL_UNLOCK_END in rb_thread_blocking_region

by Tim Pease-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

チケット #2310 が更新されました。 (by Nobuyoshi Nakada)

ステータス OpenからClosedに変更
進捗 % 0から100に変更

This issue was solved with changeset r25566.
_, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.

----------------------------------------
http://redmine.ruby-lang.org/issues/show/2310

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


[ruby-dev:39582] Re: [Bug #2310](Closed) should ensure GVL_UNLOCK_END in rb_thread_blocking_region

by SASADA Koichi :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Nobuyoshi Nakada wrote::
> This issue was solved with changeset r25566.

 この変更は受け入れられません.そもそも,GVL を持っていない状態で例外を
発生させてはいけません.

 というか,この辺は結構大きな変更なので,一言相談して下さい.

--
// SASADA Koichi at atdot dot net


[ruby-dev:39583] Re: [Bug #2310](Closed) should ensure GVL_UNLOCK_END in rb_thread_blocking_region

by Nobuyoshi Nakada-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

なかだです。

At Fri, 30 Oct 2009 12:54:03 +0900,
SASADA Koichi wrote in [ruby-dev:39582]:
>  この変更は受け入れられません.そもそも,GVL を持っていない状態で例外を
> 発生させてはいけません.

いわれてみれば確かに。コメントに追加しておきました。

--
--- 僕の前にBugはない。
--- 僕の後ろにBugはできる。
    中田 伸悦