-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Couldn't allocate RandomX cache #8504
Comments
./monerod |
How much RAM does your system have and how much free RAM did you have during sync? |
20GB of which no more than 3.9GB is used according to activity monitor |
Do you know how to compile monero manually from source? |
i've never tried that before but with instruction probably could do it |
Do you have homebrew installed? |
Same issue occurs on macOS 10.12.6, with both the official binary as well as one compiled from source on the target system. |
So you built the binary on 10.12? And this did not happen before v0.18? Can you run randomx tests?
|
|
And this did not happen before v0.18? And what's the output of |
That's correct, v0.17 and earlier all seemed to work fine.
|
Does this show the same output? |
It looks to fail at the same test yes |
We use a newer SDK to build v0.18 binaries so that we are compatible with Apple Silicon. What does not make sense currently is that you get the same monerod issue with the self compiled binary as with the release binary. |
@bf215181b5140522 Can you download and unpack https://bitcoincore.org/depends-sources/sdks/MacOSX10.11.sdk.tar.gz And then add It should look like this
Just make sure to change the path to where the SDK is. Then try to do a clean build on see if you continue to have the same issues. Build monero like this:
without adding release or anything. |
I think the homebrew question is irrelevant now but yes I do have it not very familiar with using it. |
@selsta So I had to reinstall my system for an unrelated reason between the time when I compiled v0.18 on 10.12.6, which was 3 or 4 days ago, and now, and now I'm having trouble setting up a working build environment on 10.12 again. There seem to be issues with the current versions of some of the dependencies on that old of a macOS version, and I'm not sure which old versions I was using previously when everything worked. In the meantime I'm installing 10.13.6 to test there, but I'm not currently able to test building with the 10.11 SDK. |
RAM is not an issue here. The mmap call to allocate an executable memory buffer fails on this line. As a temporary workaround, you can start monerod with the environment variable |
Then I guess it's objecting to both PROT_WRITE and PROT_EXEC being requested. Seems that MAP_JIT isn't doing anything useful for us. The v0.17 release had the same mmap flags, so this must be solely due to the SDK version. |
This works for a period of time (approx syncing for 4000 blocks), until sync process exits with the following error:
|
That looks like a different error unrelated to RandomX. You might want to open a separate issue. |
How do I change the environment variable? |
Start monerod like this from the command line: |
I was able to set up a working build environment on 10.12.6 again, so I tried this. Using the 10.11 SDK, the resulting monerod v0.18.1.1 binary seems to be stable. I also compiled again with the default system SDK that comes with 10.12, and that indeed causes a crash with the original error from this issue some time into syncing. I guess it is a macOS bug? |
Subject: Couldn't initialize RandomX cache... This may be the wrong place to comment. Please redirect me if appropriate. I downloaded monero-i686-w64-mingw32-v0.18.1.2 this week. I'm running monerod.exe in a DOS command window. Host operating system is Windows 10. Processor is Xeon x5675. Installed memory is 32 GBytes. The daemon appears to start-up sync correctly, and then crashes. Throws a 'RandomX cache' error message. Therefore, I believe that the bug is not specific to the Apple/macOS operating system. Is there a Windows command line switch to disable MAP_JIT? Command window trace follows... E:>.\monero-i686-w64-mingw32-v0.18.1.2\monerod.exe --data-dir .\files_blockchain --block-sync-size 20 E:>pause |
If you'r using a Xeon with 32GB of RAM you should be using the x86-64 binaries, not the i686 binaries. |
OK. I'll try it. Thanks. |
Update: I've been running the daemon for well over six hours without a crash. It would seem that running the x86-64 binary version(s) either fixes the bug or else renders it very infrequent. So, my thanks to hyc for the suggestion. |
macOS High Sierra v 10.13.6
Monero 'Fluorine Fermi' (v0.18.1.0-release)
started to sync but after 5 minutes
Couldn't allocate RandomX cache
error then crashes
The text was updated successfully, but these errors were encountered: