fireworm71 / veriumMiner

veriumMiner for solomining and pools
Other
59 stars 36 forks source link

scrypt buffer allocation failed #22

Open Jany-M opened 6 years ago

Jany-M commented 6 years ago
# ./autogen.sh
aclocal: warning: couldn't open directory 'm4': No such file or directory
configure.ac:17: installing './compile'
configure.ac:4: installing './config.guess'
configure.ac:4: installing './config.sub'
configure.ac:9: installing './install-sh'
configure.ac:9: installing './missing'
Makefile.am: installing './depcomp'
# ./configure CFLAGS="-march=native" --with-crypto --with-curl
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking for gcc option to accept ISO C99... -std=gnu99
checking how to run the C preprocessor... gcc -std=gnu99 -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking whether gcc -std=gnu99 needs -traditional... no
checking whether gcc -std=gnu99 and cc understand -c and -o together... yes
checking dependency style of gcc -std=gnu99... gcc3
checking for ranlib... ranlib
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking sys/endian.h usability... no
checking sys/endian.h presence... no
checking for sys/endian.h... no
checking sys/param.h usability... yes
checking sys/param.h presence... yes
checking for sys/param.h... yes
checking syslog.h usability... yes
checking syslog.h presence... yes
checking for syslog.h... yes
checking for sys/sysctl.h... yes
checking whether be32dec is declared... no
checking whether le32dec is declared... no
checking whether be32enc is declared... no
checking whether le32enc is declared... no
checking whether le16dec is declared... no
checking whether le16enc is declared... no
checking for size_t... yes
checking for working alloca.h... yes
checking for alloca... yes
checking for getopt_long... yes
checking whether we can compile AVX code... yes
checking whether we can compile XOP code... yes
checking whether we can compile AVX2 code... yes
checking for json_loads in -ljansson... yes
checking for pthread_create in -lpthread... yes
checking whether __uint128_t is supported... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating compat/Makefile
config.status: creating compat/jansson/Makefile
config.status: creating cpuminer-config.h
config.status: executing depfiles commands
# make
make  all-recursive
make[1]: Entering directory `/root/mining/veriumMiner'
Making all in compat
make[2]: Entering directory `/root/mining/veriumMiner/compat'
make[3]: Entering directory `/root/mining/veriumMiner/compat'
make[3]: Nothing to be done for `all-am'.
make[3]: Leaving directory `/root/mining/veriumMiner/compat'
make[2]: Leaving directory `/root/mining/veriumMiner/compat'
make[2]: Entering directory `/root/mining/veriumMiner'
gcc -std=gnu99 -DHAVE_CONFIG_H -I.  -Iyes/include -Iyes/include -fno-strict-aliasing  -I. -Iyes/include -Iyes/include -Wno-pointer-sign -Wno-pointer-to-int-cast   -march=native  -Iyes/include -Iyes/include -MT cpuminer-cpu-miner.o -MD -MP -MF .deps/cpuminer-cpu-miner.Tpo -c -o cpuminer-cpu-miner.o `test -f 'cpu-miner.c' || echo './'`cpu-miner.c
mv -f .deps/cpuminer-cpu-miner.Tpo .deps/cpuminer-cpu-miner.Po
gcc -std=gnu99 -DHAVE_CONFIG_H -I.  -Iyes/include -Iyes/include -fno-strict-aliasing  -I. -Iyes/include -Iyes/include -Wno-pointer-sign -Wno-pointer-to-int-cast   -march=native  -Iyes/include -Iyes/include -MT cpuminer-util.o -MD -MP -MF .deps/cpuminer-util.Tpo -c -o cpuminer-util.o `test -f 'util.c' || echo './'`util.c
mv -f .deps/cpuminer-util.Tpo .deps/cpuminer-util.Po
gcc -std=gnu99 -DHAVE_CONFIG_H -I.  -Iyes/include -Iyes/include -fno-strict-aliasing  -I. -Iyes/include -Iyes/include -Wno-pointer-sign -Wno-pointer-to-int-cast   -march=native  -Iyes/include -Iyes/include -MT cpuminer-api.o -MD -MP -MF .deps/cpuminer-api.Tpo -c -o cpuminer-api.o `test -f 'api.c' || echo './'`api.c
mv -f .deps/cpuminer-api.Tpo .deps/cpuminer-api.Po
gcc -std=gnu99 -DHAVE_CONFIG_H -I.  -Iyes/include -Iyes/include -fno-strict-aliasing  -I. -Iyes/include -Iyes/include -Wno-pointer-sign -Wno-pointer-to-int-cast   -march=native  -Iyes/include -Iyes/include -MT cpuminer-sysinfos.o -MD -MP -MF .deps/cpuminer-sysinfos.Tpo -c -o cpuminer-sysinfos.o `test -f 'sysinfos.c' || echo './'`sysinfos.c
mv -f .deps/cpuminer-sysinfos.Tpo .deps/cpuminer-sysinfos.Po
g++ -DHAVE_CONFIG_H -I.  -Iyes/include -Iyes/include -fno-strict-aliasing  -I. -Iyes/include -Iyes/include  -g -O2 -MT cpuminer-uint256.o -MD -MP -MF .deps/cpuminer-uint256.Tpo -c -o cpuminer-uint256.o `test -f 'uint256.cpp' || echo './'`uint256.cpp
mv -f .deps/cpuminer-uint256.Tpo .deps/cpuminer-uint256.Po
gcc -std=gnu99 -DHAVE_CONFIG_H -I.  -Iyes/include -Iyes/include -fno-strict-aliasing  -I. -Iyes/include -Iyes/include -Wno-pointer-sign -Wno-pointer-to-int-cast   -march=native  -Iyes/include -Iyes/include -MT crypto/cpuminer-oaes_lib.o -MD -MP -MF crypto/.deps/cpuminer-oaes_lib.Tpo -c -o crypto/cpuminer-oaes_lib.o `test -f 'crypto/oaes_lib.c' || echo './'`crypto/oaes_lib.c
mv -f crypto/.deps/cpuminer-oaes_lib.Tpo crypto/.deps/cpuminer-oaes_lib.Po
gcc -std=gnu99 -DHAVE_CONFIG_H -I.  -Iyes/include -Iyes/include -fno-strict-aliasing  -I. -Iyes/include -Iyes/include -Wno-pointer-sign -Wno-pointer-to-int-cast   -march=native  -Iyes/include -Iyes/include -MT crypto/cpuminer-aesb.o -MD -MP -MF crypto/.deps/cpuminer-aesb.Tpo -c -o crypto/cpuminer-aesb.o `test -f 'crypto/aesb.c' || echo './'`crypto/aesb.c
mv -f crypto/.deps/cpuminer-aesb.Tpo crypto/.deps/cpuminer-aesb.Po
gcc -std=gnu99 -DHAVE_CONFIG_H -I.  -Iyes/include -Iyes/include -fno-strict-aliasing  -I. -Iyes/include -Iyes/include -Wno-pointer-sign -Wno-pointer-to-int-cast   -march=native  -Iyes/include -Iyes/include -MT algo/cpuminer-scrypt.o -MD -MP -MF algo/.deps/cpuminer-scrypt.Tpo -c -o algo/cpuminer-scrypt.o `test -f 'algo/scrypt.c' || echo './'`algo/scrypt.c
mv -f algo/.deps/cpuminer-scrypt.Tpo algo/.deps/cpuminer-scrypt.Po
gcc -std=gnu99 -DHAVE_CONFIG_H -I.  -Iyes/include -Iyes/include -fno-strict-aliasing  -I. -Iyes/include -Iyes/include -Wno-pointer-sign -Wno-pointer-to-int-cast   -march=native  -Iyes/include -Iyes/include -MT algo/cpuminer-sha2.o -MD -MP -MF algo/.deps/cpuminer-sha2.Tpo -c -o algo/cpuminer-sha2.o `test -f 'algo/sha2.c' || echo './'`algo/sha2.c
mv -f algo/.deps/cpuminer-sha2.Tpo algo/.deps/cpuminer-sha2.Po
gcc -std=gnu99 -DHAVE_CONFIG_H -I.  -Iyes/include -Iyes/include -fno-strict-aliasing  -I. -Iyes/include -Iyes/include  -march=native -MT asm/cpuminer-sha2-x64.o -MD -MP -MF asm/.deps/cpuminer-sha2-x64.Tpo -c -o asm/cpuminer-sha2-x64.o `test -f 'asm/sha2-x64.S' || echo './'`asm/sha2-x64.S
mv -f asm/.deps/cpuminer-sha2-x64.Tpo asm/.deps/cpuminer-sha2-x64.Po
gcc -std=gnu99 -DHAVE_CONFIG_H -I.  -Iyes/include -Iyes/include -fno-strict-aliasing  -I. -Iyes/include -Iyes/include  -march=native -MT asm/cpuminer-scrypt-x64.o -MD -MP -MF asm/.deps/cpuminer-scrypt-x64.Tpo -c -o asm/cpuminer-scrypt-x64.o `test -f 'asm/scrypt-x64.S' || echo './'`asm/scrypt-x64.S
mv -f asm/.deps/cpuminer-scrypt-x64.Tpo asm/.deps/cpuminer-scrypt-x64.Po
gcc -std=gnu99 -DHAVE_CONFIG_H -I.  -Iyes/include -Iyes/include -fno-strict-aliasing  -I. -Iyes/include -Iyes/include  -march=native -MT asm/cpuminer-aesb-x64.o -MD -MP -MF asm/.deps/cpuminer-aesb-x64.Tpo -c -o asm/cpuminer-aesb-x64.o `test -f 'asm/aesb-x64.S' || echo './'`asm/aesb-x64.S
mv -f asm/.deps/cpuminer-aesb-x64.Tpo asm/.deps/cpuminer-aesb-x64.Po
g++  -g -O2 -Lyes/lib -Lyes/lib  -Lyes/lib -Lyes/lib  -o cpuminer cpuminer-cpu-miner.o cpuminer-util.o cpuminer-api.o cpuminer-sysinfos.o cpuminer-uint256.o crypto/cpuminer-oaes_lib.o crypto/cpuminer-aesb.o algo/cpuminer-scrypt.o algo/cpuminer-sha2.o asm/cpuminer-sha2-x64.o asm/cpuminer-scrypt-x64.o asm/cpuminer-aesb-x64.o   -lcurl -lz -lssl -lcrypto -ljansson -lpthread
make[2]: Leaving directory `/root/mining/veriumMiner'
make[1]: Leaving directory `/root/mining/veriumMiner'

When I run the binary, I get this error:

[# ./cpuminer -o stratum+tcp://xxxx:4443 -u xxx.xxx -p xxx

 Verium Miner forked from cpuminer 1.4 {fireworm} by fireworm@github **
              credits to tpruvot et al. & effectsToCause et al. **

[2018-02-08 17:37:07] Starting Stratum on stratum+tcp://xxxxx:4443
[2018-02-08 17:37:07] HugePages unavailable (12)
[2018-02-08 17:37:07] scrypt buffer allocation failed](url)

Im running CentOS centos-release-7-4.1708.el7.centos.x86_64 here's relevant packages info:


Package automake-1.13.4-3.el7.noarch already installed and latest version
Package autoconf-2.69-11.el7.noarch already installed and latest version
Package jansson-2.10-1.el7.x86_64 already installed and latest version
Package 1:openssl-1.0.2k-8.el7.x86_64 already installed and latest version
Package 1:openssl-libs-1.0.2k-8.el7.x86_64 already installed and latest version
Package libcurl-7.29.0-42.el7_4.1.x86_64 already installed and latest version
Package libcurl-devel-7.29.0-42.el7_4.1.x86_64 already installed and latest version
Package crypto-utils-2.4.1-42.el7.x86_64 already installed and latest version
Package 1:openssl-devel-1.0.2k-8.el7.x86_64 already installed and latest version
Package apr-util-openssl-1.5.2-6.el7.x86_64 already installed and latest version
Package centos-release-scl-2-2.el7.centos.noarch already installed and latest version

Could you please help me understand why this then aclocal: warning: couldn't open directory 'm4': No such file or directory and the last errors I get? What am I missing?

Jany-M commented 6 years ago

I was able to install aclocal, even though it was pretty tricky to find, since it didn't come with the automake pkg.

However I still get the same error when I launch the binary, even after rebuilding correctly : scrypt buffer allocation failed

Any idea? @fireworm71

darkwolfultima commented 6 years ago

that means you dont have enough memory to accomodate all the running threads. increase physical memory or lower thread count using the -t flag

the aclocal error just means that the folder doesnt exist, I deleted the folder and forgot to remove it from aclocal.

Jany-M commented 6 years ago

So here's the specs and here's what I've got:


# grep -m 1 'cpu cores' /proc/cpuinfo
cpu cores       : 6

# getconf _NPROCESSORS_ONLN
24

# nproc --all
64

# cat /proc/cpuinfo

processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 62
model name      : Intel(R) Xeon(R) CPU E5-2620 v2 @ 2.10GHz
stepping        : 4
microcode       : 1064
cpu MHz         : 2094.867
cache size      : 15360 KB
physical id     : 0
siblings        : 12
core id         : 0
cpu cores       : 6
apicid          : 0
initial apicid  : 0
fpu             : yes
fpu_exception   : yes
cpuid level     : 13
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf cpuid_faulting pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm ida arat epb pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms xsaveopt
bogomips        : 4189.73
clflush size    : 64
cache_alignment : 64
address sizes   : 46 bits physical, 48 bits virtual
power management:

// processor count is the same, repeated 24 times (incl 0)

I set it to -t 12 now and it runs fine, but is it correct or am I f***g it up?

Also, what about this other notice? HugePages unavailable (12)

darkwolfultima commented 6 years ago

that means you don't have enough memory to enable hugepages on all threads

check the documentation on enabling hugepages.