* [ruby-dev:50967] [Ruby master Bug#13768] SIGCHLD and Thread dead-lock problem
[not found] <redmine.issue-13768.20170726034758.76@ruby-lang.org>
@ 2020-10-26 4:34 ` matz
2020-11-07 8:03 ` [ruby-dev:50970] " samuel
1 sibling, 0 replies; 2+ messages in thread
From: matz @ 2020-10-26 4:34 UTC (permalink / raw)
To: ruby-dev
Issue #13768 has been updated by matz (Yukihiro Matsumoto).
This issue told us there's false positive in our deadlock detector. So I accept adding `Thread.ignore_deadlock = true`.
Matz,
----------------------------------------
Bug #13768: SIGCHLD and Thread dead-lock problem
https://bugs.ruby-lang.org/issues/13768#change-88175
* Author: keiju (Keiju Ishitsuka)
* Status: Open
* Priority: Normal
* Backport: 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: UNKNOWN
----------------------------------------
けいじゅ@いしつかです.
下記のプログラムを実行するとThreadがデッドロックしたと例外が発生します.
# コメント部分をはずせば, デッドロックはしません
シグナルのtrapが絡むときのデッドロックの検知に問題があるのではないかと
思いますがいかがでしょう?
```
% ruby -v
ruby 2.5.0dev (2017-07-25 trunk 59417) [i686-linux]
```
```ruby
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 <<---
--
https://bugs.ruby-lang.org/
^ permalink raw reply [flat|nested] 2+ messages in thread
* [ruby-dev:50970] [Ruby master Bug#13768] SIGCHLD and Thread dead-lock problem
[not found] <redmine.issue-13768.20170726034758.76@ruby-lang.org>
2020-10-26 4:34 ` [ruby-dev:50967] [Ruby master Bug#13768] SIGCHLD and Thread dead-lock problem matz
@ 2020-11-07 8:03 ` samuel
1 sibling, 0 replies; 2+ messages in thread
From: samuel @ 2020-11-07 8:03 UTC (permalink / raw)
To: ruby-dev
Issue #13768 has been updated by ioquatix (Samuel Williams).
@ko1 we discussed this briefly. I disagree with introducing `Thread.ignore_deadlock`.
It should be responsibility of signal handler.
----------------------------------------
Bug #13768: SIGCHLD and Thread dead-lock problem
https://bugs.ruby-lang.org/issues/13768#change-88378
* Author: keiju (Keiju Ishitsuka)
* Status: Closed
* Priority: Normal
* Backport: 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: UNKNOWN
----------------------------------------
けいじゅ@いしつかです.
下記のプログラムを実行するとThreadがデッドロックしたと例外が発生します.
# コメント部分をはずせば, デッドロックはしません
シグナルのtrapが絡むときのデッドロックの検知に問題があるのではないかと
思いますがいかがでしょう?
```
% ruby -v
ruby 2.5.0dev (2017-07-25 trunk 59417) [i686-linux]
```
```ruby
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 <<---
--
https://bugs.ruby-lang.org/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-11-07 8:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <redmine.issue-13768.20170726034758.76@ruby-lang.org>
2020-10-26 4:34 ` [ruby-dev:50967] [Ruby master Bug#13768] SIGCHLD and Thread dead-lock problem matz
2020-11-07 8:03 ` [ruby-dev:50970] " samuel
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 NNTP newsgroup(s).