ruby-dev (Japanese) list archive (unofficial mirror)
 help / color / mirror / Atom feed
From: Tomoyuki Chikanaga <nagachika00@gmail•com>
To: "Ruby developers (Japanese)" <ruby-dev@ruby-lang.org>
Subject: [ruby-dev:50359] Re: SIGCHLD and Thread dead-lock problem
Date: Mon, 18 Dec 2017 10:56:23 +0900	[thread overview]
Message-ID: <CAJRFe6uSyr+TZc9oLYdwaaBH4HSVMj8Q2bf9-xZ+3q_CnNRQKg@mail.gmail.com> (raw)
In-Reply-To: <E1da26z-00069c-QB@keiju.ishitsuka.com>

[-- Attachment #1: Type: text/plain, Size: 1195 bytes --]

nagachika です。

再現コードはやや異なりますが、 [Bug #14181] と類似のようですので、
r61274, r61302 で修正されている可能性があるのではないかと思います。



2017年7月26日 0:51 Keiju ISHITSUKA <keiju@ishitsuka•com>:

> けいじゅ@いしつかです.
>
> 下記のプログラムを実行するとThreadがデッドロックしたと例外が発生します.
> # コメント部分をはずせば, デッドロックはしません
>
> シグナルのtrapが絡むときのデッドロックの検知に問題があるのではないかと
> 思いますがいかがでしょう?
>
> % ruby -v
> ruby 2.5.0dev (2017-07-25 trunk 59417) [i686-linux]
>
> --
> q = Queue.new
> p = Queue.new
>
> trap(:SIGCHLD) do
>   puts "SIGCHLD"
>   q.push 1
> end
>
> Thread.start do
>   Process.spawn("/bin/sleep 1")
> end
>
> #Thread.start do
> #  loop do
> #    sleep 100
> #  end
> #end
>
> th = Thread.start{
>   p.push q.pop
> }
>
> p.pop
>
> __
> ---------------------------------------------------->> 石塚 圭樹 <<---
> ---------------------------------->> e-mail: keiju@ishitsuka•com <<---
>

[-- Attachment #2: Type: text/html, Size: 1740 bytes --]

  reply	other threads:[~2017-12-18  1:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-25 15:51 [ruby-dev:50186] SIGCHLD and Thread dead-lock problem Keiju ISHITSUKA
2017-12-18  1:56 ` Tomoyuki Chikanaga [this message]
2017-12-18 13:09   ` [ruby-dev:50364] " keiju ISHITSUKA

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.ruby-lang.org/en/community/mailing-lists/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAJRFe6uSyr+TZc9oLYdwaaBH4HSVMj8Q2bf9-xZ+3q_CnNRQKg@mail.gmail.com \
    --to=ruby-dev@ruby-lang.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).