ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-core:90170] [Ruby trunk Bug#15360] "ThreadError: deadlock; recursive locking" error when recursive lock shouldn't be possible
       [not found] <redmine.issue-15360.20181129181303@ruby-lang.org>
@ 2018-11-29 18:13 ` mail
  2019-04-10 18:17 ` [ruby-core:92237] " julie.silvestri
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 7+ messages in thread
From: mail @ 2018-11-29 18:13 UTC (permalink / raw
  To: ruby-core

Issue #15360 has been reported by brockspratlen (Brock Spratlen).

----------------------------------------
Bug #15360: "ThreadError: deadlock; recursive locking" error when recursive lock shouldn't be possible
https://bugs.ruby-lang.org/issues/15360

* Author: brockspratlen (Brock Spratlen)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: 2.5.3
* Backport: 2.4: UNKNOWN, 2.5: UNKNOWN
----------------------------------------
I think I've discovered a Ruby bug, possibly introduced in 2.5.

I've attached a reproduction script; running it on Ruby 2.5.0+ (including previews of 2.6.0) seems to always produce a flood of printed `ThreadError: deadlock; recursive locking` exceptions, even though the reproduction code doesn't appear to do any recursive locking. 

Running the same script on Ruby 2.4.5 doesn't produce any `ThreadError: deadlock; recursive locking` exceptions. I've run the script several times on Ruby 2.4.5, I simply can't reproduce the raising of `ThreadError: deadlock; recursive locking` with this script on 2.4.5.

Curiously, removing the `puts e.class` on line 25 causes the bug to go away: `ThreadError: deadlock; recursive locking` never gets raised regardless of which Ruby version I'm running. Given this oddity, I can't help but think the issue is something around writing to stdout. This change in particular looks suspect: https://bugs.ruby-lang.org/issues/9323

Thank you!
Brock

---Files--------------------------------
deadlock_test.rb (556 Bytes)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [ruby-core:92237] [Ruby trunk Bug#15360] "ThreadError: deadlock; recursive locking" error when recursive lock shouldn't be possible
       [not found] <redmine.issue-15360.20181129181303@ruby-lang.org>
  2018-11-29 18:13 ` [ruby-core:90170] [Ruby trunk Bug#15360] "ThreadError: deadlock; recursive locking" error when recursive lock shouldn't be possible mail
@ 2019-04-10 18:17 ` julie.silvestri
  2019-04-11 15:17 ` [ruby-core:92248] " s.wanabe
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 7+ messages in thread
From: julie.silvestri @ 2019-04-10 18:17 UTC (permalink / raw
  To: ruby-core

Issue #15360 has been updated by insideoutbox (InsideOut Box).


Is there a plan to fix this?  We have been noticing this bug occasionally in production.

----------------------------------------
Bug #15360: "ThreadError: deadlock; recursive locking" error when recursive lock shouldn't be possible
https://bugs.ruby-lang.org/issues/15360#change-77573

* Author: brockspratlen (Brock Spratlen)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.5.3p105 (2018-10-18 revision 65156) [x86_64-darwin17]
* Backport: 2.4: UNKNOWN, 2.5: UNKNOWN
----------------------------------------
I think I've discovered a Ruby bug, possibly introduced in 2.5.

I've attached a reproduction script; running it on Ruby 2.5.0+ (including previews of 2.6.0) seems to always produce a flood of printed `ThreadError: deadlock; recursive locking` exceptions, even though the reproduction code doesn't appear to do any recursive locking. 

Running the same script on Ruby 2.4.5 doesn't produce any `ThreadError: deadlock; recursive locking` exceptions. I've run the script several times on Ruby 2.4.5, I simply can't reproduce the raising of `ThreadError: deadlock; recursive locking` with this script on 2.4.5.

Curiously, removing the `puts e.class` on line 24 causes the bug to go away: `ThreadError: deadlock; recursive locking` never gets raised regardless of which Ruby version I'm running. Given this oddity, I can't help but think the issue is something around writing to stdout. This change in particular looks suspect: https://bugs.ruby-lang.org/issues/9323

Thank you!
Brock

---Files--------------------------------
deadlock_test.rb (556 Bytes)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [ruby-core:92248] [Ruby trunk Bug#15360] "ThreadError: deadlock; recursive locking" error when recursive lock shouldn't be possible
       [not found] <redmine.issue-15360.20181129181303@ruby-lang.org>
  2018-11-29 18:13 ` [ruby-core:90170] [Ruby trunk Bug#15360] "ThreadError: deadlock; recursive locking" error when recursive lock shouldn't be possible mail
  2019-04-10 18:17 ` [ruby-core:92237] " julie.silvestri
@ 2019-04-11 15:17 ` s.wanabe
  2019-04-16  4:33 ` [ruby-core:92300] " neeraj.bhunwal
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 7+ messages in thread
From: s.wanabe @ 2019-04-11 15:17 UTC (permalink / raw
  To: ruby-core

Issue #15360 has been updated by wanabe (_ wanabe).


`git bisect` shows the problem occurs frequently since r58604.
But I don't know it can occur before the commit.

https://bugs.ruby-lang.org/projects/ruby-trunk/repository/trunk/revisions/66489/entry/thread_sync.c#L267
`do_mutex_lock()` releases GVL with `native_sleep(th, timeout)`.
The mutex may be released and the thread may be interrupted around the same time.
If so, `RUBY_VM_CHECK_INTS_BLOCKING(th->ec)` will raise an exception, after locking mutex.

----------------------------------------
Bug #15360: "ThreadError: deadlock; recursive locking" error when recursive lock shouldn't be possible
https://bugs.ruby-lang.org/issues/15360#change-77583

* Author: brockspratlen (Brock Spratlen)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.5.3p105 (2018-10-18 revision 65156) [x86_64-darwin17]
* Backport: 2.4: UNKNOWN, 2.5: UNKNOWN
----------------------------------------
I think I've discovered a Ruby bug, possibly introduced in 2.5.

I've attached a reproduction script; running it on Ruby 2.5.0+ (including previews of 2.6.0) seems to always produce a flood of printed `ThreadError: deadlock; recursive locking` exceptions, even though the reproduction code doesn't appear to do any recursive locking. 

Running the same script on Ruby 2.4.5 doesn't produce any `ThreadError: deadlock; recursive locking` exceptions. I've run the script several times on Ruby 2.4.5, I simply can't reproduce the raising of `ThreadError: deadlock; recursive locking` with this script on 2.4.5.

Curiously, removing the `puts e.class` on line 24 causes the bug to go away: `ThreadError: deadlock; recursive locking` never gets raised regardless of which Ruby version I'm running. Given this oddity, I can't help but think the issue is something around writing to stdout. This change in particular looks suspect: https://bugs.ruby-lang.org/issues/9323

Thank you!
Brock

---Files--------------------------------
deadlock_test.rb (556 Bytes)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [ruby-core:92300] [Ruby trunk Bug#15360] "ThreadError: deadlock; recursive locking" error when recursive lock shouldn't be possible
       [not found] <redmine.issue-15360.20181129181303@ruby-lang.org>
                   ` (2 preceding siblings ...)
  2019-04-11 15:17 ` [ruby-core:92248] " s.wanabe
@ 2019-04-16  4:33 ` neeraj.bhunwal
  2019-06-11 22:54 ` [ruby-core:93057] " merch-redmine
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 7+ messages in thread
From: neeraj.bhunwal @ 2019-04-16  4:33 UTC (permalink / raw
  To: ruby-core

Issue #15360 has been updated by nbh (nbh _).


https://github.com/ruby/ruby/pull/2131

----------------------------------------
Bug #15360: "ThreadError: deadlock; recursive locking" error when recursive lock shouldn't be possible
https://bugs.ruby-lang.org/issues/15360#change-77644

* Author: brockspratlen (Brock Spratlen)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.5.3p105 (2018-10-18 revision 65156) [x86_64-darwin17]
* Backport: 2.4: UNKNOWN, 2.5: UNKNOWN
----------------------------------------
I think I've discovered a Ruby bug, possibly introduced in 2.5.

I've attached a reproduction script; running it on Ruby 2.5.0+ (including previews of 2.6.0) seems to always produce a flood of printed `ThreadError: deadlock; recursive locking` exceptions, even though the reproduction code doesn't appear to do any recursive locking. 

Running the same script on Ruby 2.4.5 doesn't produce any `ThreadError: deadlock; recursive locking` exceptions. I've run the script several times on Ruby 2.4.5, I simply can't reproduce the raising of `ThreadError: deadlock; recursive locking` with this script on 2.4.5.

Curiously, removing the `puts e.class` on line 24 causes the bug to go away: `ThreadError: deadlock; recursive locking` never gets raised regardless of which Ruby version I'm running. Given this oddity, I can't help but think the issue is something around writing to stdout. This change in particular looks suspect: https://bugs.ruby-lang.org/issues/9323

Thank you!
Brock

---Files--------------------------------
deadlock_test.rb (556 Bytes)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [ruby-core:93057] [Ruby trunk Bug#15360] "ThreadError: deadlock; recursive locking" error when recursive lock shouldn't be possible
       [not found] <redmine.issue-15360.20181129181303@ruby-lang.org>
                   ` (3 preceding siblings ...)
  2019-04-16  4:33 ` [ruby-core:92300] " neeraj.bhunwal
@ 2019-06-11 22:54 ` merch-redmine
  2019-08-05 13:53 ` [ruby-core:94147] [Ruby master " nagachika00
  2019-08-26 15:39 ` [ruby-core:94573] " usa
  6 siblings, 0 replies; 7+ messages in thread
From: merch-redmine @ 2019-06-11 22:54 UTC (permalink / raw
  To: ruby-core

Issue #15360 has been updated by jeremyevans0 (Jeremy Evans).

Backport changed from 2.4: UNKNOWN, 2.5: UNKNOWN to 2.4: DONTNEED, 2.5: REQUIRED, 2.6: REQUIRED
Status changed from Open to Closed

Fix committed at commit:c1d78a7f0ece2004822193a0c1f1fd3dc38c2fdf

----------------------------------------
Bug #15360: "ThreadError: deadlock; recursive locking" error when recursive lock shouldn't be possible
https://bugs.ruby-lang.org/issues/15360#change-78461

* Author: brockspratlen (Brock Spratlen)
* Status: Closed
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.5.3p105 (2018-10-18 revision 65156) [x86_64-darwin17]
* Backport: 2.4: DONTNEED, 2.5: REQUIRED, 2.6: REQUIRED
----------------------------------------
I think I've discovered a Ruby bug, possibly introduced in 2.5.

I've attached a reproduction script; running it on Ruby 2.5.0+ (including previews of 2.6.0) seems to always produce a flood of printed `ThreadError: deadlock; recursive locking` exceptions, even though the reproduction code doesn't appear to do any recursive locking. 

Running the same script on Ruby 2.4.5 doesn't produce any `ThreadError: deadlock; recursive locking` exceptions. I've run the script several times on Ruby 2.4.5, I simply can't reproduce the raising of `ThreadError: deadlock; recursive locking` with this script on 2.4.5.

Curiously, removing the `puts e.class` on line 24 causes the bug to go away: `ThreadError: deadlock; recursive locking` never gets raised regardless of which Ruby version I'm running. Given this oddity, I can't help but think the issue is something around writing to stdout. This change in particular looks suspect: https://bugs.ruby-lang.org/issues/9323

Thank you!
Brock

---Files--------------------------------
deadlock_test.rb (556 Bytes)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [ruby-core:94147] [Ruby master Bug#15360] "ThreadError: deadlock; recursive locking" error when recursive lock shouldn't be possible
       [not found] <redmine.issue-15360.20181129181303@ruby-lang.org>
                   ` (4 preceding siblings ...)
  2019-06-11 22:54 ` [ruby-core:93057] " merch-redmine
@ 2019-08-05 13:53 ` nagachika00
  2019-08-26 15:39 ` [ruby-core:94573] " usa
  6 siblings, 0 replies; 7+ messages in thread
From: nagachika00 @ 2019-08-05 13:53 UTC (permalink / raw
  To: ruby-core

Issue #15360 has been updated by nagachika (Tomoyuki Chikanaga).

Backport changed from 2.4: DONTNEED, 2.5: REQUIRED, 2.6: REQUIRED to 2.4: DONTNEED, 2.5: REQUIRED, 2.6: DONE

ruby_2_6 r67728 merged revision(s) c1d78a7f0ece2004822193a0c1f1fd3dc38c2fdf.

----------------------------------------
Bug #15360: "ThreadError: deadlock; recursive locking" error when recursive lock shouldn't be possible
https://bugs.ruby-lang.org/issues/15360#change-80393

* Author: brockspratlen (Brock Spratlen)
* Status: Closed
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.5.3p105 (2018-10-18 revision 65156) [x86_64-darwin17]
* Backport: 2.4: DONTNEED, 2.5: REQUIRED, 2.6: DONE
----------------------------------------
I think I've discovered a Ruby bug, possibly introduced in 2.5.

I've attached a reproduction script; running it on Ruby 2.5.0+ (including previews of 2.6.0) seems to always produce a flood of printed `ThreadError: deadlock; recursive locking` exceptions, even though the reproduction code doesn't appear to do any recursive locking. 

Running the same script on Ruby 2.4.5 doesn't produce any `ThreadError: deadlock; recursive locking` exceptions. I've run the script several times on Ruby 2.4.5, I simply can't reproduce the raising of `ThreadError: deadlock; recursive locking` with this script on 2.4.5.

Curiously, removing the `puts e.class` on line 24 causes the bug to go away: `ThreadError: deadlock; recursive locking` never gets raised regardless of which Ruby version I'm running. Given this oddity, I can't help but think the issue is something around writing to stdout. This change in particular looks suspect: https://bugs.ruby-lang.org/issues/9323

Thank you!
Brock

---Files--------------------------------
deadlock_test.rb (556 Bytes)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [ruby-core:94573] [Ruby master Bug#15360] "ThreadError: deadlock; recursive locking" error when recursive lock shouldn't be possible
       [not found] <redmine.issue-15360.20181129181303@ruby-lang.org>
                   ` (5 preceding siblings ...)
  2019-08-05 13:53 ` [ruby-core:94147] [Ruby master " nagachika00
@ 2019-08-26 15:39 ` usa
  6 siblings, 0 replies; 7+ messages in thread
From: usa @ 2019-08-26 15:39 UTC (permalink / raw
  To: ruby-core

Issue #15360 has been updated by usa (Usaku NAKAMURA).

Backport changed from 2.4: DONTNEED, 2.5: REQUIRED, 2.6: DONE to 2.4: DONTNEED, 2.5: DONE, 2.6: DONE

ruby_2_5 r67764 merged revision(s) c1d78a7f0ece2004822193a0c1f1fd3dc38c2fdf.

----------------------------------------
Bug #15360: "ThreadError: deadlock; recursive locking" error when recursive lock shouldn't be possible
https://bugs.ruby-lang.org/issues/15360#change-81031

* Author: brockspratlen (Brock Spratlen)
* Status: Closed
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.5.3p105 (2018-10-18 revision 65156) [x86_64-darwin17]
* Backport: 2.4: DONTNEED, 2.5: DONE, 2.6: DONE
----------------------------------------
I think I've discovered a Ruby bug, possibly introduced in 2.5.

I've attached a reproduction script; running it on Ruby 2.5.0+ (including previews of 2.6.0) seems to always produce a flood of printed `ThreadError: deadlock; recursive locking` exceptions, even though the reproduction code doesn't appear to do any recursive locking. 

Running the same script on Ruby 2.4.5 doesn't produce any `ThreadError: deadlock; recursive locking` exceptions. I've run the script several times on Ruby 2.4.5, I simply can't reproduce the raising of `ThreadError: deadlock; recursive locking` with this script on 2.4.5.

Curiously, removing the `puts e.class` on line 24 causes the bug to go away: `ThreadError: deadlock; recursive locking` never gets raised regardless of which Ruby version I'm running. Given this oddity, I can't help but think the issue is something around writing to stdout. This change in particular looks suspect: https://bugs.ruby-lang.org/issues/9323

Thank you!
Brock

---Files--------------------------------
deadlock_test.rb (556 Bytes)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-08-26 15:39 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <redmine.issue-15360.20181129181303@ruby-lang.org>
2018-11-29 18:13 ` [ruby-core:90170] [Ruby trunk Bug#15360] "ThreadError: deadlock; recursive locking" error when recursive lock shouldn't be possible mail
2019-04-10 18:17 ` [ruby-core:92237] " julie.silvestri
2019-04-11 15:17 ` [ruby-core:92248] " s.wanabe
2019-04-16  4:33 ` [ruby-core:92300] " neeraj.bhunwal
2019-06-11 22:54 ` [ruby-core:93057] " merch-redmine
2019-08-05 13:53 ` [ruby-core:94147] [Ruby master " nagachika00
2019-08-26 15:39 ` [ruby-core:94573] " usa

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).