* [ruby-core:119413] [Ruby master Bug#20779] Un-rescuable thread creation limit on Mac
@ 2024-10-02 23:31 hms (Hal Spitz) via ruby-core
2024-12-23 18:46 ` [ruby-core:120381] " luke-gru (Luke Gruber) via ruby-core
0 siblings, 1 reply; 2+ messages in thread
From: hms (Hal Spitz) via ruby-core @ 2024-10-02 23:31 UTC (permalink / raw)
To: ruby-core; +Cc: hms (Hal Spitz)
Issue #20779 has been reported by hms (Hal Spitz).
----------------------------------------
Bug #20779: Un-rescuable thread creation limit on Mac
https://bugs.ruby-lang.org/issues/20779
* Author: hms (Hal Spitz)
* Status: Open
* ruby -v: 3.3.5
* Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN
----------------------------------------
Thread.new will hang the ruby process once past the OSX limit. It does not appear that's possible to trap and rescue failed thread creation.
It seems the Mac has a limit to the number of threads it supports and googling the issue suggests the limit has been known to change with hardware and OS releases. While I hit the thread creation limit due to a bug in my code and the number of threads that I was attempting to create (12,250+) is an unlikely use-case, I am hoping it would be possible to turn this into a rescuable error.
While I'm reporting this on 3.3.5, I have tested the issue and the inability to rescue back to 3.3.1.
(Thanks to @raels for being a great second set of eyes to make sure I wasn't doing anything goofy / wrong before making this report. Also, another callout and thanks to both @eregon and @bensheldon over at concurrent-ruby for the unbelievably quick and helpful response to my initial bug report over there).
---Files--------------------------------
hang.rb (713 Bytes)
--
https://bugs.ruby-lang.org/
______________________________________________
ruby-core mailing list -- ruby-core@ml.ruby-lang.org
To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/
^ permalink raw reply [flat|nested] 2+ messages in thread
* [ruby-core:120381] [Ruby master Bug#20779] Un-rescuable thread creation limit on Mac
2024-10-02 23:31 [ruby-core:119413] [Ruby master Bug#20779] Un-rescuable thread creation limit on Mac hms (Hal Spitz) via ruby-core
@ 2024-12-23 18:46 ` luke-gru (Luke Gruber) via ruby-core
0 siblings, 0 replies; 2+ messages in thread
From: luke-gru (Luke Gruber) via ruby-core @ 2024-12-23 18:46 UTC (permalink / raw)
To: ruby-core; +Cc: luke-gru (Luke Gruber)
Issue #20779 has been updated by luke-gru (Luke Gruber).
I managed to track down the issue, it's a pretty simple fix.
My PR is here: https://github.com/ruby/ruby/pull/12441
----------------------------------------
Bug #20779: Un-rescuable thread creation limit on Mac
https://bugs.ruby-lang.org/issues/20779#change-111159
* Author: hms (Hal Spitz)
* Status: Open
* ruby -v: 3.3.5
* Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN
----------------------------------------
Thread.new will hang the ruby process once past the OSX limit. It does not appear that's possible to trap and rescue failed thread creation.
It seems the Mac has a limit to the number of threads it supports and googling the issue suggests the limit has been known to change with hardware and OS releases. While I hit the thread creation limit due to a bug in my code and the number of threads that I was attempting to create (12,250+) is an unlikely use-case, I am hoping it would be possible to turn this into a rescuable error.
While I'm reporting this on 3.3.5, I have tested the issue and the inability to rescue back to 3.3.1.
(Thanks to @raels for being a great second set of eyes to make sure I wasn't doing anything goofy / wrong before making this report. Also, another callout and thanks to both @eregon and @bensheldon over at concurrent-ruby for the unbelievably quick and helpful response to my initial bug report over there).
---Files--------------------------------
hang.rb (713 Bytes)
--
https://bugs.ruby-lang.org/
______________________________________________
ruby-core mailing list -- ruby-core@ml.ruby-lang.org
To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-12-23 18:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-10-02 23:31 [ruby-core:119413] [Ruby master Bug#20779] Un-rescuable thread creation limit on Mac hms (Hal Spitz) via ruby-core
2024-12-23 18:46 ` [ruby-core:120381] " luke-gru (Luke Gruber) via ruby-core
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).