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
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
The text was updated successfully, but these errors were encountered:
ghost
added
the
untriaged
New issue has not been triaged by the area owner
label
Jul 7, 2022
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.
Description
The code here:
https://github.com/dotnet/runtime/blob/main/src/coreclr/vm/threads.cpp#L812
Assumes that failing to create a thread means that we run out of memory.
This result in this error:
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
The text was updated successfully, but these errors were encountered: