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
Failed to create CoreCLR, HRESULT: 0x8007001F on Catalina #34708
Disabling SIP (System Integrity Protection) fixed it. But is enabled by default and requires reboot to recovery mode to disable it.
Shining:coreclr furt$ csrutil status
System Integrity Protection status: unknown (Custom Configuration).
Configuration:
Apple Internal: disabled
Kext Signing: enabled
Filesystem Protections: enabled
Debugging Restrictions: enabled
DTrace Restrictions: disabled
NVRAM Protections: enabled
BaseSystem Verification: enabled
This is an unsupported configuration, likely to break in the future and leave your machine in an unknown state.
We may not see this in CI as we may have disabled SIP to get crash dumps.
The problem is that there are not enough resources for locking a memory page. There is a system wide limit on the number of pages that can be locked and once it is depleted, all mlock attempts fail until some process frees that memory. I've looked into it few weeks ago, let me add the issue number.
It does seem like dup of #34793. It happened to me again with SIP disabled and stopping few Parallels VM brought it back to life. So it is memory constrain as @janvorli suspected.
@wfurt I want to add to this:
Had the same issue on FreeBSD where ZFS was exeeding the max wired memory and thus preventing mlock from running. This is actually a bug with ZFS and FreeBSD (in contrast with this problem).
So it's not a memory contrain, it's a system config constrain, which in FreeBSD is easily fixed with some sysctl commands. There might be a similair setting that could be changed in OSX.
But I would like to ask the question: Do we really need to mlock this? If even Databases can run without mlock on multiplatform and thus don't hit these issues, why does DotNet need mlock?
@Ornias1993 the mlock is essential for correct .NET behavior. We create just a single locked page to be able to trigger flushing write buffers of all processors in the process (perform a process wide memory barrier). Without the locked page, GC and some other stuff in the runtime would not work reliably as we need to ensure that the state of all processors is synchronized.
On Linux, we use membarrier syscall with MEMBARRIER_CMD_PRIVATE_EXPEDITED option as a primary mean to achieve that goal, but that's not available on FreeBSD. If there is some other way to achieve that on FreeBSD, it would be great to add that.
@janvorli I understand.
I've thrown an email to @allanjude (he doesn't respond well to github tags, he gets too many), asking if he might know a way, as he has some experience with FreeBSD memory management afaik.
Activity
wfurt commentedon Apr 8, 2020
failing block may be clue (when running under dtruss)
35 is EAGAIN and that seems weird. attaching whole trace.
trace.txt
wfurt commentedon Apr 8, 2020
Disabling SIP (System Integrity Protection) fixed it. But is enabled by default and requires reboot to recovery mode to disable it.
We may not see this in CI as we may have disabled SIP to get crash dumps.
janvorli commentedon Apr 8, 2020
The problem is that there are not enough resources for locking a memory page. There is a system wide limit on the number of pages that can be locked and once it is depleted, all mlock attempts fail until some process frees that memory. I've looked into it few weeks ago, let me add the issue number.
wfurt commentedon Apr 8, 2020
If so, why SIP would matter? I have system with 32G of RAM.
janvorli commentedon Apr 8, 2020
I don't think it mattered, I think it was just a coincidence that some process has released its wired memory. See dotnet/sdk#10870 for details.
wfurt commentedon Apr 16, 2020
It does seem like dup of #34793. It happened to me again with SIP disabled and stopping few Parallels VM brought it back to life. So it is memory constrain as @janvorli suspected.
Crow-Control commentedon May 21, 2020
@wfurt I want to add to this:
Had the same issue on FreeBSD where ZFS was exeeding the max wired memory and thus preventing mlock from running. This is actually a bug with ZFS and FreeBSD (in contrast with this problem).
So it's not a memory contrain, it's a system config constrain, which in FreeBSD is easily fixed with some sysctl commands. There might be a similair setting that could be changed in OSX.
But I would like to ask the question: Do we really need to mlock this? If even Databases can run without mlock on multiplatform and thus don't hit these issues, why does DotNet need mlock?
janvorli commentedon May 21, 2020
@Ornias1993 the mlock is essential for correct .NET behavior. We create just a single locked page to be able to trigger flushing write buffers of all processors in the process (perform a process wide memory barrier). Without the locked page, GC and some other stuff in the runtime would not work reliably as we need to ensure that the state of all processors is synchronized.
On Linux, we use membarrier syscall with MEMBARRIER_CMD_PRIVATE_EXPEDITED option as a primary mean to achieve that goal, but that's not available on FreeBSD. If there is some other way to achieve that on FreeBSD, it would be great to add that.
Crow-Control commentedon May 21, 2020
@janvorli I understand.
I've thrown an email to @allanjude (he doesn't respond well to github tags, he gets too many), asking if he might know a way, as he has some experience with FreeBSD memory management afaik.
allanjude commentedon May 21, 2020
I am not really familiar with the DotNet stuff, but @rootwyrm helps to maintain that on FreeBSD, he might be of help here.
Crow-Control commentedon May 21, 2020
@allanjude I was more refering to general advice what options/alternatives there are to mloc on bsd ;)
Crow-Control commentedon May 21, 2020
Note:
The error I had seems specific to FreeNAS, it is actually solved in FreeBSD itself here:
https://docs.freebsd.org/cgi/getmsg.cgi?fetch=145846+0+archive/2019/svn-src-head/20190519.svn-src-head
Sorry to bother :)