Skip to content
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

MEMORY ALLOC FAILED: VirtualAlloc failed #2582

Closed
entak opened this issue Nov 30, 2019 · 15 comments
Closed

MEMORY ALLOC FAILED: VirtualAlloc failed #2582

entak opened this issue Nov 30, 2019 · 15 comments
Labels
backend cpu bug randomX issue with xmr-stak-rx

Comments

@entak
Copy link

entak commented Nov 30, 2019

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
Copy link

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

@entak
Copy link
Author

entak commented Dec 1, 2019

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
Copy link

pershoot commented Dec 1, 2019

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

@psychocrypt
Copy link
Collaborator

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
Copy link
Author

entak commented Dec 1, 2019

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

@diacomi
Copy link

diacomi commented Dec 1, 2019

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

@psychocrypt
Copy link
Collaborator

psychocrypt commented Dec 1, 2019 via email

@diacomi
Copy link

diacomi commented Dec 1, 2019

Sure...

WITH --noTest

xmr-stak-rx.exe --noTest

xmr-stak-rx 1.0.1-rx 7a9361b

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 7a9361b

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
Copy link
Author

entak commented Dec 1, 2019

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
Copy link

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

@psychocrypt
Copy link
Collaborator

psychocrypt commented Dec 3, 2019 via email

@diacomi
Copy link

diacomi commented Dec 3, 2019

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

@psychocrypt
Copy link
Collaborator

thanks for the report, fixed by #2624

@psychocrypt psychocrypt added backend cpu bug randomX issue with xmr-stak-rx labels Dec 9, 2019
@Phoenix-Starlight
Copy link

Phoenix-Starlight commented May 25, 2020

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

@NaikDK
Copy link

NaikDK commented Apr 14, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend cpu bug randomX issue with xmr-stak-rx
Projects
None yet
Development

No branches or pull requests

8 participants