You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Failing to create a thread shouldn't assume that this an out of memory issue #71761
Assumes that failing to create a thread means that we run out of memory.
This result in this error:
---> System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
at System.Threading.Thread.StartInternal(ThreadHandle t, Int32 stackSize, Int32 priority, Char* pThreadName)
at System.Threading.Thread.StartCore()
On Linux, there are few other options, such as the TasksMax limit (at process or user level), global number of processes limit at the kernel level.
Reproduction Steps
Set a low TasksMax limit and create more threads than allowed.
Expected behavior
Getting an error saying that the thread failed to start, and either pointing the actual reason for that or listing the various options.
Actual behavior
Getting a misleading exception pointing in the wrong direction.
Regression?
No response
Known Workarounds
No response
Configuration
Linux - systemd
In particular, running a server which spawns threads on need. You'll get OutOfMemoryException even if you have lots of room available.
Other information
No response
Reacted by D3-LucaPiombino, Steve Hansen, Alan Brault, Kurai András, Pedro Pita, Sander Saares, Xhanti, Jônatas Hudler, Piotr Lasota, Maximilien Noal and 5 more
Activity
ghost added
untriagedNew issue has not been triaged by the area owner
Activity