fireice-uk / xmr-stak

Free Monero RandomX Miner and unified CryptoNight miner
GNU General Public License v3.0
4.05k stars 1.79k forks source link

MEMORY ALLOC FAILED: VirtualAlloc failed #2582

Closed entak closed 4 years ago

entak commented 4 years ago

Since switch to randomx, I see the MEMORY ALLOC FAILED: VirtualAlloc failed for each working cpu thread. HW is the same (was working fine - without the error - before the switch), cpu config auto-generated. I googled a bit and done following: -run miner as admin -checked that locking pages in Local Security Policy is allowed for the account -restarted the system, run the mining as a very first thing -increased Virtual RAM Size (I did not find any tips how much to increase it, so tried to set it to 40GB virtual RAM on machine with 8GB physical RAM, 5 mining threads)

None of the above helped. Any tips? Or logs where can I find closer info about the issue? Thx in advance.

breadsax commented 4 years ago

I have the same error, but only on machine with AMD CPU. Intel CPU does not have this error.

entak commented 4 years ago

Few more observations: -I do have it on Intel CPU as well - i5 8500, AMD is Ryzen 3900X -lowering number of mining threads has no effect - tried with single thread -running miner under Win10

pershoot commented 4 years ago

I am getting this (MEMORY ALLOC FAILED: VirtualAlloc failed) on GPU (RX560) on an AMD CPU host (FX-8350).

psychocrypt commented 4 years ago

how do you enabled large page support. Try to run sudo sysctl -w vm.nr_hugepages=1280 maybe your number of large pages is to low!

entak commented 4 years ago

I am using Win OS, so through the Local Security Policy. I didn't find any option to set large pages count there ...

diacomi commented 4 years ago

Same problem here, but I noticed that occurs only if I use --noTest parameter.

psychocrypt commented 4 years ago

can you please post the output with and without --noTest

diacomi commented 4 years ago

Sure...

WITH --noTest

xmr-stak-rx.exe --noTest

xmr-stak-rx 1.0.1-rx 7a9361b22

Brought to you by fireice_uk and psychocrypt under GPLv3. Based on CPU mining code by tevador and SChernykh.

You can use following keys to display reports: 'h' - hashrate 'r' - results 'c' - connection

__ ____

| __ \ / \

#| |/ / | / \/

|| #| /| | | | / \ | | | | | || '|| '|/ | ' \ / __|| | | |

| |\ | || || () || _/| || || | | | | /| | | || ( | || |

_| _|_, | _/ __/ __,||| || _||| || _| __, |

/ | / |
              |___/   https://ryo-currency.com                       |___/

This currency is a way for us to implement the ideas that we were unable to in Monero. See https://github.com/fireice-uk/cryptonote-speedup-demo for details.

[2019-12-01 19:53:03] : Mining coin: randomx [2019-12-01 19:53:03] : Starting 1x thread, affinity: 2. [2019-12-01 19:53:03] : hwloc: memory pinned [2019-12-01 19:53:03] : Starting 1x thread, affinity: 4. [2019-12-01 19:53:03] : MEMORY ALLOC FAILED: VirtualAlloc failed. [2019-12-01 19:53:03] : Starting 1x thread, affinity: 6. [2019-12-01 19:53:03] : MEMORY ALLOC FAILED: VirtualAlloc failed. [2019-12-01 19:53:03] : Starting 1x thread, affinity: 1. [2019-12-01 19:53:03] : MEMORY ALLOC FAILED: VirtualAlloc failed. [2019-12-01 19:53:03] : Starting 1x thread, affinity: 3. [2019-12-01 19:53:03] : MEMORY ALLOC FAILED: VirtualAlloc failed. [2019-12-01 19:53:03] : hwloc: memory pinned [2019-12-01 19:53:03] : Starting 1x thread, affinity: 5. [2019-12-01 19:53:03] : MEMORY ALLOC FAILED: VirtualAlloc failed. [2019-12-01 19:53:03] : hwloc: memory pinned [2019-12-01 19:53:03] : Starting 1x thread, affinity: 7. [2019-12-01 19:53:03] : MEMORY ALLOC FAILED: VirtualAlloc failed. [2019-12-01 19:53:03] : hwloc: memory pinned [2019-12-01 19:53:03] : Starting 1x thread, affinity: 8. [2019-12-01 19:53:03] : MEMORY ALLOC FAILED: VirtualAlloc failed. [2019-12-01 19:53:03] : Starting 1x thread, affinity: 10. [2019-12-01 19:53:03] : MEMORY ALLOC FAILED: VirtualAlloc failed. [2019-12-01 19:53:03] : hwloc: memory pinned [2019-12-01 19:53:03] : Starting 1x thread, affinity: 12. [2019-12-01 19:53:03] : MEMORY ALLOC FAILED: VirtualAlloc failed. [2019-12-01 19:53:03] : hwloc: memory pinned [2019-12-01 19:53:03] : Starting 1x thread, affinity: 14. [2019-12-01 19:53:03] : MEMORY ALLOC FAILED: VirtualAlloc failed. [2019-12-01 19:53:03] : hwloc: memory pinned [2019-12-01 19:53:03] : Starting 1x thread, affinity: 9. [2019-12-01 19:53:03] : MEMORY ALLOC FAILED: VirtualAlloc failed. [2019-12-01 19:53:03] : Starting 1x thread, affinity: 11. [2019-12-01 19:53:03] : MEMORY ALLOC FAILED: VirtualAlloc failed. [2019-12-01 19:53:03] : Starting 1x thread, affinity: 13. [2019-12-01 19:53:03] : MEMORY ALLOC FAILED: VirtualAlloc failed. [2019-12-01 19:53:03] : hwloc: memory pinned [2019-12-01 19:53:03] : MEMORY ALLOC FAILED: VirtualAlloc failed. [2019-12-01 19:53:03] : Fast-connecting to pool.supportxmr.com:5555 pool ... [2019-12-01 19:53:03] : Pool pool.supportxmr.com:5555 connected. Logging in...

WITHOUT --noTest

xmr-stak-rx.exe [2019-12-01 19:55:54] : start self test for 'randomx' (can be disabled with the command line option '--noTest')

xmr-stak-rx 1.0.1-rx 7a9361b22

Brought to you by fireice_uk and psychocrypt under GPLv3. Based on CPU mining code by tevador and SChernykh.

You can use following keys to display reports: 'h' - hashrate 'r' - results 'c' - connection

__ ____

| __ \ / \

#| |/ / | / \/

|| #| /| | | | / \ | | | | | || '|| '|/ | ' \ / __|| | | |

| |\ | || || () || _/| || || | | | | /| | | || ( | || |

_| _|_, | _/ __/ __,||| || _||| || _| __, |

/ | / |
              |___/   https://ryo-currency.com                       |___/

This currency is a way for us to implement the ideas that we were unable to in Monero. See https://github.com/fireice-uk/cryptonote-speedup-demo for details.

[2019-12-01 19:56:16] : Mining coin: randomx [2019-12-01 19:56:16] : Starting 1x thread, affinity: 2. [2019-12-01 19:56:16] : hwloc: memory pinned [2019-12-01 19:56:16] : Starting 1x thread, affinity: 4. [2019-12-01 19:56:16] : Starting 1x thread, affinity: 6. [2019-12-01 19:56:16] : Starting 1x thread, affinity: 1. [2019-12-01 19:56:16] : Starting 1x thread, affinity: 3. [2019-12-01 19:56:16] : Starting 1x thread, affinity: 5. [2019-12-01 19:56:16] : hwloc: memory pinned [2019-12-01 19:56:16] : Starting 1x thread, affinity: 7. [2019-12-01 19:56:16] : Starting 1x thread, affinity: 8. [2019-12-01 19:56:16] : Starting 1x thread, affinity: 10. [2019-12-01 19:56:16] : Starting 1x thread, affinity: 12. [2019-12-01 19:56:16] : Starting 1x thread, affinity: 14. [2019-12-01 19:56:16] : Starting 1x thread, affinity: 9. [2019-12-01 19:56:16] : hwloc: memory pinned [2019-12-01 19:56:16] : Starting 1x thread, affinity: 11. [2019-12-01 19:56:16] : Starting 1x thread, affinity: 13. [2019-12-01 19:56:16] : hwloc: memory pinned [2019-12-01 19:56:16] : Fast-connecting to pool.supportxmr.com:5555 pool ... [2019-12-01 19:56:16] : Pool pool.supportxmr.com:5555 connected. Logging in...

Miner is compiled by myself with Visual Studio 2017.

entak commented 4 years ago

I can confirm that --noTest causes the issue, without this option, memory is allocated fine and hashrate jumps to almost double. --noTest/test outputs attached, but only extra information there is the MEMORY ALLOC error line. I am running pre-compiled binaries.

test.txt no_test.txt

christgelinas commented 4 years ago

same issue on windows 10 , i do not use noTest switch.

psychocrypt commented 4 years ago

btw there is a new version 1.0.2 available. I think your issue is not fixed but an issue with memory pinning is fixed.

diacomi commented 4 years ago

@psychocrypt I can confirm that even in 1.0.2 issue is not fixed.

psychocrypt commented 4 years ago

thanks for the report, fixed by #2624

Phoenix-Starlight commented 4 years ago

It still fails for me on Windows 8.1. (Even without the flag). And that with the latest version.

NaikDK commented 3 years ago

Why is it mining based on CPU only? It should mine with GPU also. Any help is appreciated.