Getting bad_alloc errors from erlexec


#1

When checking log/epoch_pow_cuckoo.log I see a lot of aec_pow_cuckoo:wait_for_result:375 ERROR: terminate called after throwing an instance of 'std::bad_alloc' what(): std::bad_alloc errors from erlexec.

What could be the reason?

2018-12-01 16:28:18.335 [error] <0.14016.0>@aec_pow_cuckoo:wait_for_result:390 OS process died: {status,134}
2018-12-01 16:28:18.345 [debug] <0.14018.0>@aec_pow_cuckoo:generate:78 Generating solution for data hash <<241,47,147,159,241,182,27,98,61,243,26,53,0,2,237,3,155,180,151,76,97,216,151,84,55,17,41,97,186,33,103,57>> and nonce 10784863759043545660 with target 520669531.
2018-12-01 16:28:18.345 [info] <0.14018.0>@aec_pow_cuckoo:generate_int:183 Executing cmd: "./mean29-generic -h 8S+Tn/G2G2I98xo1AALtA5u0l0xh2JdUNxEpYbohZzk=PErGvHKIq5U= -t 1"
2018-12-01 16:28:18.351 [error] <0.14018.0>@aec_pow_cuckoo:wait_for_result:375 ERROR: terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc

2018-12-01 16:28:18.611 [error] <0.14018.0>@aec_pow_cuckoo:wait_for_result:375 ERROR: Aborted (core dumped)

2018-12-01 16:28:18.615 [error] <0.14018.0>@aec_pow_cuckoo:wait_for_result:390 OS process died: {status,134}
2018-12-01 16:28:18.626 [debug] <0.14020.0>@aec_pow_cuckoo:generate:78 Generating solution for data hash <<241,47,147,159,241,182,27,98,61,243,26,53,0,2,237,3,155,180,151,76,97,216,151,84,55,17,41,97,186,33,103,57>> and nonce 10784863759043545661 with target 520669531.
2018-12-01 16:28:18.626 [info] <0.14020.0>@aec_pow_cuckoo:generate_int:183 Executing cmd: "./mean29-generic -h 8S+Tn/G2G2I98xo1AALtA5u0l0xh2JdUNxEpYbohZzk=PUrGvHKIq5U= -t 1"
2018-12-01 16:28:18.632 [error] <0.14020.0>@aec_pow_cuckoo:wait_for_result:375 ERROR: terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc

#2

Just for note, I’ve downloaded the release from github and running it on ubuntu 18.04.


#3

Am I running out of memory? htop shows that I’m not using even half of the available memory.


#4

Are you using mean? and what miner executable are you using?


#5

Hi @Kryztoval

Yes, I was using the default (mean29-generic). I’ve tried using a bigger server, and it seems to be working fine now …


#6

there are two miner modes, lean and mean, mean requires 4gb
lean one uses about 200mb. if you have cosntrained memory you should use lean.


#7

I had 4GB RAM on the previous server. On the new one I have 32GB RAM, and only 3.45GB is being used …


#8

it peaks, because the start time it creates a full cuckoo three that requires 4gb then it gets trimmed. but if it fills then it wont run.


#9

So 32GB of RAM is too unnecessary?


#10

yeah, 5gb should be fine for 1 cpu mean miner instance.


#11

So each CPU needs ~5GB? I’m using -t 7 option right now for the mean29-generic, so I guess I’m using 7 CPUs, does that mean that my memory consumption should be 35GB?


#12

No, each miner instance needs about 4.2Gb, and you can tell a miner to use several threads. I think each thread adds a bit of memory but not too much.

If your cpu supports avx2 use it, it is faster. :slight_smile:


#13

If your cpu supports avx2 use it, it is faster. :slight_smile:

Tried it, didn’t work :frowning:


#14

Normally Avx2 is not virtualizable, if you are running inside a vm it won’t work.


#15

I’m just trying out scaleway, they claim to be running on baremetal. But that’s probably not relevant.

Anyway, thank you for the help!


#16

It shiould be enabled if it is available to the kernel.