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

Segmentation fault #2552

Closed minzak closed 4 years ago

minzak commented 4 years ago

Very strange, i'm trying build xmr-stak-rx branch with same build optin with master branch. And i got Segmentation fault in final.

What is wrong?

root@ferma:/usr/src/rx/build# ./do.sh
-- The C compiler identification is GNU 6.3.0
-- The CXX compiler identification is GNU 6.3.0
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for CL_VERSION_2_2
-- Looking for CL_VERSION_2_2 - not found
-- Looking for CL_VERSION_2_1
-- Looking for CL_VERSION_2_1 - not found
-- Looking for CL_VERSION_2_0
-- Looking for CL_VERSION_2_0 - not found
-- Looking for CL_VERSION_1_2
-- Looking for CL_VERSION_1_2 - not found
-- Looking for CL_VERSION_1_1
-- Looking for CL_VERSION_1_1 - not found
-- Looking for CL_VERSION_1_0
-- Looking for CL_VERSION_1_0 - not found
-- Found OpenCL: /usr/lib/x86_64-linux-gnu/libOpenCL.so  
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- Found OpenSSL: /usr/lib/x86_64-linux-gnu/libcrypto.so (found version "1.1.0l")  
-- Configuring done
-- Generating done
-- Build files have been written to: /usr/src/rx/build
Scanning dependencies of target xmr-stak-randomx
[  6%] Building C object CMakeFiles/xmr-stak-randomx.dir/xmrstak/backend/cpu/crypto/randomx/argon2_core.c.o
[  6%] Building CXX object CMakeFiles/xmr-stak-randomx.dir/xmrstak/backend/cpu/crypto/randomx/aes_hash.cpp.o
[  8%] Building CXX object CMakeFiles/xmr-stak-randomx.dir/xmrstak/backend/cpu/crypto/randomx/allocator.cpp.o
[  8%] Building C object CMakeFiles/xmr-stak-randomx.dir/xmrstak/backend/cpu/crypto/randomx/argon2_ref.c.o
[ 10%] Building CXX object CMakeFiles/xmr-stak-randomx.dir/xmrstak/backend/cpu/crypto/randomx/blake2_generator.cpp.o
[ 12%] Building C object CMakeFiles/xmr-stak-randomx.dir/xmrstak/backend/cpu/crypto/randomx/blake2/blake2b.c.o
[ 14%] Building CXX object CMakeFiles/xmr-stak-randomx.dir/xmrstak/backend/cpu/crypto/randomx/bytecode_machine.cpp.o
[ 16%] Building CXX object CMakeFiles/xmr-stak-randomx.dir/xmrstak/backend/cpu/crypto/randomx/dataset.cpp.o
[ 18%] Building CXX object CMakeFiles/xmr-stak-randomx.dir/xmrstak/backend/cpu/crypto/randomx/instructions_portable.cpp.o
[ 20%] Building CXX object CMakeFiles/xmr-stak-randomx.dir/xmrstak/backend/cpu/crypto/randomx/randomx.cpp.o
[ 22%] Building C object CMakeFiles/xmr-stak-randomx.dir/xmrstak/backend/cpu/crypto/randomx/reciprocal.c.o
[ 24%] Building CXX object CMakeFiles/xmr-stak-randomx.dir/xmrstak/backend/cpu/crypto/randomx/soft_aes.cpp.o
[ 26%] Building CXX object CMakeFiles/xmr-stak-randomx.dir/xmrstak/backend/cpu/crypto/randomx/superscalar.cpp.o
[ 28%] Building CXX object CMakeFiles/xmr-stak-randomx.dir/xmrstak/backend/cpu/crypto/randomx/virtual_machine.cpp.o
[ 30%] Building CXX object CMakeFiles/xmr-stak-randomx.dir/xmrstak/backend/cpu/crypto/randomx/virtual_memory.cpp.o
[ 32%] Building CXX object CMakeFiles/xmr-stak-randomx.dir/xmrstak/backend/cpu/crypto/randomx/vm_compiled_light.cpp.o
[ 34%] Building CXX object CMakeFiles/xmr-stak-randomx.dir/xmrstak/backend/cpu/crypto/randomx/vm_compiled.cpp.o
[ 36%] Building CXX object CMakeFiles/xmr-stak-randomx.dir/xmrstak/backend/cpu/crypto/randomx/vm_interpreted_light.cpp.o
[ 38%] Building CXX object CMakeFiles/xmr-stak-randomx.dir/xmrstak/backend/cpu/crypto/randomx/vm_interpreted.cpp.o
[ 40%] Building C object CMakeFiles/xmr-stak-randomx.dir/xmrstak/backend/cpu/crypto/randomx/jit_compiler_x86_static.S.o
[ 42%] Building CXX object CMakeFiles/xmr-stak-randomx.dir/xmrstak/backend/cpu/crypto/randomx/jit_compiler_x86.cpp.o
[ 44%] Building CXX object CMakeFiles/xmr-stak-randomx.dir/xmrstak/backend/cpu/crypto/common/VirtualMemory_unix.cpp.o
[ 46%] Linking CXX static library bin/libxmr-stak-randomx.a
[ 46%] Built target xmr-stak-randomx
Scanning dependencies of target xmr-stak-backend
[ 54%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/backend/cpu/cpuType.cpp.o
[ 54%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/backend/cpu/crypto/cryptonight_1.cpp.o
[ 54%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/backend/cpu/crypto/cryptonight_common.cpp.o
[ 54%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/backend/backendConnector.cpp.o
[ 56%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/backend/cpu/hwlocMemory.cpp.o
[ 58%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/backend/cpu/jconf.cpp.o
[ 60%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/backend/cpu/minethd.cpp.o
[ 62%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/backend/globalStates.cpp.o
[ 64%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/http/httpd.cpp.o
[ 66%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/http/webdesign.cpp.o
[ 68%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/jconf.cpp.o
[ 70%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/misc/console.cpp.o
[ 72%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/misc/environment.cpp.o
[ 74%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/misc/executor.cpp.o
[ 76%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/misc/telemetry.cpp.o
[ 78%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/misc/uac.cpp.o
[ 80%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/misc/utility.cpp.o
[ 82%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/net/jpsock.cpp.o
[ 84%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/net/socket.cpp.o
[ 86%] Building CXX object CMakeFiles/xmr-stak-backend.dir/xmrstak/version.cpp.o
[ 88%] Linking CXX static library bin/libxmr-stak-backend.a
[ 88%] Built target xmr-stak-backend
Scanning dependencies of target xmr-stak-rx
Scanning dependencies of target xmrstak_opencl_backend
[ 90%] Building CXX object CMakeFiles/xmr-stak-rx.dir/xmrstak/cli/cli-miner.cpp.o
[ 92%] Building CXX object CMakeFiles/xmrstak_opencl_backend.dir/xmrstak/backend/amd/amd_gpu/gpu.cpp.o
[ 94%] Building CXX object CMakeFiles/xmrstak_opencl_backend.dir/xmrstak/backend/amd/jconf.cpp.o
[ 96%] Building CXX object CMakeFiles/xmrstak_opencl_backend.dir/xmrstak/backend/amd/minethd.cpp.o
[ 98%] Linking CXX executable bin/xmr-stak-rx
[ 98%] Built target xmr-stak-rx
[100%] Linking CXX shared library bin/libxmrstak_opencl_backend.so
[100%] Built target xmrstak_opencl_backend
root@ferma:/opt/xmr-stak-rx# ./xmr-stak-rx
[2019-11-17 01:40:32] : start self test for 'randomx'
-------------------------------------------------------------------
xmr-stak-rx 1.0.0-rx 90c8ebd

Brought to you by fireice_uk and psychocrypt under GPLv3.
Based on CPU mining code by tevador and SChernykh.
Based on OpenCL mining code by 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-11-17 01:40:55] : Mining coin: randomx
[2019-11-17 01:40:55] : Compiling code and initializing GPUs. This will take a while...
[2019-11-17 01:40:55] : Device 0 work size 16 / 32.
[2019-11-17 01:40:55] : OpenCL device 0 - Precompiled code /root/.openclcache/bf0a8b5774d3bbe45251adf219e3b31aa06397b8b6494959812b83c1b8113576.openclbin not found. Compiling ...
[2019-11-17 01:41:08] : OpenCL device 0 - Precompiled code stored in file /root/.openclcache/bf0a8b5774d3bbe45251adf219e3b31aa06397b8b6494959812b83c1b8113576.openclbin
[2019-11-17 01:41:08] : Device 0 work size 16 / 32.
[2019-11-17 01:41:08] : OpenCL device 0 - Load precompiled code from file /root/.openclcache/bf0a8b5774d3bbe45251adf219e3b31aa06397b8b6494959812b83c1b8113576.openclbin
[2019-11-17 01:41:08] : Device 1 work size 16 / 32.
[2019-11-17 01:41:08] : OpenCL device 1 - Load precompiled code from file /root/.openclcache/bf0a8b5774d3bbe45251adf219e3b31aa06397b8b6494959812b83c1b8113576.openclbin
[2019-11-17 01:41:08] : Device 1 work size 16 / 32.
[2019-11-17 01:41:08] : OpenCL device 1 - Load precompiled code from file /root/.openclcache/bf0a8b5774d3bbe45251adf219e3b31aa06397b8b6494959812b83c1b8113576.openclbin
[2019-11-17 01:41:08] : Device 2 work size 16 / 32.
[2019-11-17 01:41:09] : OpenCL device 2 - Load precompiled code from file /root/.openclcache/bf0a8b5774d3bbe45251adf219e3b31aa06397b8b6494959812b83c1b8113576.openclbin
[2019-11-17 01:41:09] : Device 2 work size 16 / 32.
[2019-11-17 01:41:09] : OpenCL device 2 - Load precompiled code from file /root/.openclcache/bf0a8b5774d3bbe45251adf219e3b31aa06397b8b6494959812b83c1b8113576.openclbin
[2019-11-17 01:41:09] : Device 3 work size 16 / 32.
[2019-11-17 01:41:09] : OpenCL device 3 - Load precompiled code from file /root/.openclcache/bf0a8b5774d3bbe45251adf219e3b31aa06397b8b6494959812b83c1b8113576.openclbin
[2019-11-17 01:41:09] : Device 3 work size 16 / 32.
[2019-11-17 01:41:09] : OpenCL device 3 - Load precompiled code from file /root/.openclcache/bf0a8b5774d3bbe45251adf219e3b31aa06397b8b6494959812b83c1b8113576.openclbin
[2019-11-17 01:41:09] : Device 4 work size 16 / 32.
[2019-11-17 01:41:09] : OpenCL device 4 - Load precompiled code from file /root/.openclcache/bf0a8b5774d3bbe45251adf219e3b31aa06397b8b6494959812b83c1b8113576.openclbin
[2019-11-17 01:41:09] : Device 4 work size 16 / 32.
[2019-11-17 01:41:09] : OpenCL device 4 - Load precompiled code from file /root/.openclcache/bf0a8b5774d3bbe45251adf219e3b31aa06397b8b6494959812b83c1b8113576.openclbin
[2019-11-17 01:41:09] : Device 5 work size 16 / 32.
[2019-11-17 01:41:09] : OpenCL device 5 - Load precompiled code from file /root/.openclcache/bf0a8b5774d3bbe45251adf219e3b31aa06397b8b6494959812b83c1b8113576.openclbin
[2019-11-17 01:41:09] : Device 5 work size 16 / 32.
[2019-11-17 01:41:09] : OpenCL device 5 - Load precompiled code from file /root/.openclcache/bf0a8b5774d3bbe45251adf219e3b31aa06397b8b6494959812b83c1b8113576.openclbin
[2019-11-17 01:41:09] : Device 6 work size 16 / 32.
[2019-11-17 01:41:09] : OpenCL device 6 - Load precompiled code from file /root/.openclcache/bf0a8b5774d3bbe45251adf219e3b31aa06397b8b6494959812b83c1b8113576.openclbin
[2019-11-17 01:41:09] : Device 6 work size 16 / 32.
[2019-11-17 01:41:09] : OpenCL device 6 - Load precompiled code from file /root/.openclcache/bf0a8b5774d3bbe45251adf219e3b31aa06397b8b6494959812b83c1b8113576.openclbin
[2019-11-17 01:41:09] : Device 7 work size 16 / 32.
[2019-11-17 01:41:09] : OpenCL device 7 - Load precompiled code from file /root/.openclcache/bf0a8b5774d3bbe45251adf219e3b31aa06397b8b6494959812b83c1b8113576.openclbin
[2019-11-17 01:41:09] : Device 7 work size 16 / 32.
[2019-11-17 01:41:09] : OpenCL device 7 - Load precompiled code from file /root/.openclcache/bf0a8b5774d3bbe45251adf219e3b31aa06397b8b6494959812b83c1b8113576.openclbin
[2019-11-17 01:41:09] : Device 8 work size 16 / 32.
[2019-11-17 01:41:09] : OpenCL device 8 - Load precompiled code from file /root/.openclcache/bf0a8b5774d3bbe45251adf219e3b31aa06397b8b6494959812b83c1b8113576.openclbin
[2019-11-17 01:41:09] : Device 8 work size 16 / 32.
[2019-11-17 01:41:09] : OpenCL device 8 - Load precompiled code from file /root/.openclcache/bf0a8b5774d3bbe45251adf219e3b31aa06397b8b6494959812b83c1b8113576.openclbin
[2019-11-17 01:41:09] : Device 9 work size 16 / 32.
[2019-11-17 01:41:09] : OpenCL device 9 - Load precompiled code from file /root/.openclcache/bf0a8b5774d3bbe45251adf219e3b31aa06397b8b6494959812b83c1b8113576.openclbin
[2019-11-17 01:41:09] : Device 9 work size 16 / 32.
[2019-11-17 01:41:09] : OpenCL device 9 - Load precompiled code from file /root/.openclcache/bf0a8b5774d3bbe45251adf219e3b31aa06397b8b6494959812b83c1b8113576.openclbin
[2019-11-17 01:41:09] : Starting AMD GPU (OpenCL) thread 0, no affinity.
[2019-11-17 01:41:09] : Starting AMD GPU (OpenCL) thread 1, no affinity.
[2019-11-17 01:41:09] : Starting AMD GPU (OpenCL) thread 2, no affinity.
[2019-11-17 01:41:09] : Starting AMD GPU (OpenCL) thread 3, no affinity.
[2019-11-17 01:41:09] : Starting AMD GPU (OpenCL) thread 4, no affinity.
[2019-11-17 01:41:09] : Starting AMD GPU (OpenCL) thread 5, no affinity.
[2019-11-17 01:41:09] : Starting AMD GPU (OpenCL) thread 6, no affinity.
[2019-11-17 01:41:09] : Starting AMD GPU (OpenCL) thread 7, no affinity.
[2019-11-17 01:41:09] : Starting AMD GPU (OpenCL) thread 8, no affinity.
[2019-11-17 01:41:09] : Starting AMD GPU (OpenCL) thread 9, no affinity.
[2019-11-17 01:41:09] : Starting AMD GPU (OpenCL) thread 10, no affinity.
[2019-11-17 01:41:09] : Starting AMD GPU (OpenCL) thread 11, no affinity.
[2019-11-17 01:41:09] : Starting AMD GPU (OpenCL) thread 12, no affinity.
[2019-11-17 01:41:09] : Starting AMD GPU (OpenCL) thread 13, no affinity.
[2019-11-17 01:41:09] : Starting AMD GPU (OpenCL) thread 14, no affinity.
[2019-11-17 01:41:09] : Starting AMD GPU (OpenCL) thread 15, no affinity.
[2019-11-17 01:41:09] : Starting AMD GPU (OpenCL) thread 16, no affinity.
[2019-11-17 01:41:09] : Starting AMD GPU (OpenCL) thread 17, no affinity.
[2019-11-17 01:41:09] : Starting AMD GPU (OpenCL) thread 18, no affinity.
[2019-11-17 01:41:09] : Starting AMD GPU (OpenCL) thread 19, no affinity.
[2019-11-17 01:41:09] : Starting 1x thread, affinity: 0.
[2019-11-17 01:41:09] : Starting 1x thread, affinity: 1.
[2019-11-17 01:41:09] : Starting 1x thread, affinity: 2.
[2019-11-17 01:41:09] : Fast-connecting to rx.minexmr.com:4444 pool ...
[2019-11-17 01:41:09] : Pool rx.minexmr.com:4444 connected. Logging in...
[2019-11-17 01:41:10] : Difficulty changed. Now: 75000.
[2019-11-17 01:41:10] : Pool logged in.
Segmentation fault
psychocrypt commented 4 years ago

do you get the same error with the precompiled binaries? Could you please also try to reduce the number of used gpus in your amd.txt file.

IMO: you should not mine randomx with gpus, the hash rate for gpus is very bad :-(

sneaker8650 commented 4 years ago

Got a Segmentation fault Error too. I´m not using any GPUs, just downloaded the precompiled files, copied the configs/pool files. My old xmr-stak build 2.10.1 is running just fine on debian 9.


[2019-11-19 15:46:55] : Mining coin: randomx [2019-11-19 15:46:55] : Starting 1x thread, affinity: 0. [2019-11-19 15:46:55] : Starting 1x thread, affinity: 1. [2019-11-19 15:46:55] : Starting 1x thread, affinity: 2. [2019-11-19 15:46:55] : hwloc: memory pinned [2019-11-19 15:46:55] : Starting 1x thread, affinity: 3. [2019-11-19 15:46:55] : hwloc: memory pinned [2019-11-19 15:46:55] : Starting 1x thread, affinity: 4. [2019-11-19 15:46:55] : hwloc: memory pinned [2019-11-19 15:46:55] : Fast-connecting to pool.supportxmr.com:5555 pool ... [2019-11-19 15:46:55] : Pool pool.supportxmr.com:5555 connected. Logging in... [2019-11-19 15:46:55] : Difficulty changed. Now: 20000. [2019-11-19 15:46:55] : Pool logged in. Segmentation fault

psychocrypt commented 4 years ago

please do not reuse the cpu.txt, nvidia.txt and/or amd.txt.

The origin author of this issue: please post your amd.txt i need to know which gpus you use.

tantalus-ak commented 4 years ago

Having the same segfault problem using the precompiled Windows binary or compiling my own on Debian stable. Here's the compilation information and backtrace using gdb:

/etc/sysctl.conf: vm.nr_hugepages = 1250 -- The C compiler identification is GNU 8.3.0 -- The CXX compiler identification is GNU 8.3.0 export CFLAGS="-g3 -mtune=native -m64 -O0" export CXXFLAGS="$CFLAGS" cmake . -DOpenCL_ENABLE=OFF -DCUDA_ENABLE=OFF

No configuration files were reused. Verbose level in `config.txt' set to "10".

gdb ./xmr-stak-rx GNU gdb (Debian 8.2.1-2+b3) 8.2.1 ... (gdb) run --benchmark randomx Starting program: /usr/local/src/xmr-stak-rx/xmr-stak-1.0.0-rx/bin/xmr-stak-rx --benchmark randomx [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". [2019-11-20 16:57:11] : start self test for 'randomx' [2019-11-20 16:57:11] : randomx create vm [2019-11-20 16:57:12] : randomx check for update dataset with 1 threads [2019-11-20 16:57:12] : Thread 0 started updating RandomX dataset 5562dfc8 [2019-11-20 16:57:12] : Thread 0 start updating RandomX dataset 0 34078719 [2019-11-20 16:57:32] : Thread 0 finished updating RandomX dataset

xmr-stak-rx 1.0.0-rx f8d367e95 ... [2019-11-20 16:57:32] : Mining coin: randomx !!!! Doing only a benchmark and exiting. To mine, remove the '--benchmark' option. !!!! [2019-11-20 16:57:32] : Prepare benchmark for block version 0 [2019-11-20 16:57:32] : Starting 1x thread, affinity: 0. [New Thread 0x7ffff6f0b700 (LWP 18150)] [2019-11-20 16:57:32] : hwloc: memory pinned [2019-11-20 16:57:32] : Starting 1x thread, affinity: 1. [New Thread 0x7fff5ffff700 (LWP 18151)] [2019-11-20 16:57:32] : Starting 1x thread, affinity: 2. [New Thread 0x7fff5f7fe700 (LWP 18152)] [2019-11-20 16:57:32] : Starting 1x thread, affinity: 3. [New Thread 0x7fff5ebff700 (LWP 18153)] [2019-11-20 16:57:32] : Wait 30 sec until all backends are initialized [2019-11-20 16:58:02] : Wait 30 sec to initialize the dataset

Thread 4 "xmr-stak-rx" received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7fff5f7fe700 (LWP 18152)] randomx_calculate_hash (machine=0x0, input=, inputSize=, output=0x7fff5f7fd830) at /usr/local/src/xmr-stak-rx/xmr-stak-1.0.0-rx/xmrstak/backend/cpu/crypto/randomx/randomx.cpp:451 451 machine->initScratchpad(&tempHash); (gdb) bt

0 randomx_calculate_hash (machine=0x0, input=, inputSize=, output=0x7fff5f7fd830)

at /usr/local/src/xmr-stak-rx/xmr-stak-1.0.0-rx/xmrstak/backend/cpu/crypto/randomx/randomx.cpp:451

1 0x000055555558a448 in xmrstak::cpu::minethd::multiway_work_main<1u> (this=0x5555556572d0)

at /usr/include/c++/8/bits/std_mutex.h:229

2 0x00007ffff7ae6b2f in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6

3 0x00007ffff7f7afa3 in start_thread (arg=) at pthread_create.c:486

4 0x00007ffff77c64cf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

(gdb)

Let me know if you need more information.

psychocrypt commented 4 years ago

which processor do you used?

tantalus-ak commented 4 years ago
 *-cpu
      description: CPU
      product: Intel(R) Xeon(R) CPU E3-1270 v5 @ 3.60GHz
      vendor: Intel Corp.
      physical id: 4
      bus info: cpu@0
      version: Intel(R) Xeon(R) CPU E3-1270 v5 @ 3.60GHz
      serial: To Be Filled By O.E.M.
      slot: CPU0
      size: 3699MHz
      capacity: 4GHz
      width: 64 bits
      clock: 100MHz
      capabilities: lm fpu fpu_exception wp 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 x86-64 constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp md_clear flush_l1d cpufreq
      configuration: cores=4 enabledcores=4 threads=8
psychocrypt commented 4 years ago

thanks from your log I can see that one pointer is null but this should not be happen. I will have a look into it.

psychocrypt commented 4 years ago

@tantalus-ak could you please post your cpu.txt file

tantalus-ak commented 4 years ago

more cpu.txt // generated by xmr-stak-rx/1.0.0-rx/f8d367e95/unknown/lin/nvidia-cpu ... "cpu_threads_conf" : [ { "low_power_mode" : false, "no_prefetch" : true, "asm" : "auto", "affine_to_cpu" : 0 }, { "low_power_mode" : false, "no_prefetch" : true, "asm" : "auto", "affine_to_cpu" : 1 }, { "low_power_mode" : false, "no_prefetch" : true, "asm" : "auto", "affine_to_cpu" : 2 }, { "low_power_mode" : false, "no_prefetch" : true, "asm" : "auto", "affine_to_cpu" : 3 },

],

psychocrypt commented 4 years ago

Is the segfault only visible when you are running the benchmark. Could you try to use a testnet pool?

psychocrypt commented 4 years ago

@tantalus-ak You are using the nvidia-cpu version, could you please send me your nvidia.txt too

psychocrypt commented 4 years ago

@tantalus-ak can you please recompile all in a clean directory: Somehow the data you provided are not constant. You compiled with cmake . -DOpenCL_ENABLE=OFF -DCUDA_ENABLE=OFF but the version shows // generated by xmr-stak-rx/1.0.0-rx/f8d367e95/unknown/lin/nvidia-cpu

psychocrypt commented 4 years ago

@tantalus-ak could you please also try to start with the cli option --noTest

psychocrypt commented 4 years ago

@tantalus-ak if you recompile the miner please use https://github.com/psychocrypt/xmr-stak/tree/rx-topic-searchSegfault I added one more message. I like to see if the miner is going into the else part of a check.

tantalus-ak commented 4 years ago

Sorry about that; I copied over the *.txt files from my first compilation when the following variables and options were still enabled:

export CC=/usr/bin/gcc-6 export CXX=/usr/bin/g++-6 cmake . -DOpenCL_ENABLE=OFF -DCUDA_COMPILER=nvcc -DCUDA_ARCH=61

BTW, this generated an nvidia.txt file that was effectively disabled:

more nvidia.txt // generated by xmr-stak-rx/1.0.0-rx/f8d367e95/unknown/lin/nvidia-cpu ... "gpu_threads_conf" : [

],

The installed GPU is:

       *-display
            description: VGA compatible controller
            product: GP107 [GeForce GTX 1050]
            vendor: NVIDIA Corporation
            physical id: 0
            bus info: pci@0000:01:00.0
            version: a1
            width: 64 bits
            clock: 33MHz
            capabilities: pm msi pciexpress vga_controller bus_master cap_list rom
            configuration: driver=nvidia latency=0
            resources: irq:135 memory:d2000000-d2ffffff memory:c0000000-cfffffff memory:d0000000-d1ffffff ioport:3000(size=128) memory:d3080000-d30fffff

Anyway, the cleanly compiled program (-DCUDA_ENABLE=OFF) generates the same cpu.txt file (but with a header of "// generated by xmr-stak-rx/1.0.0-rx/f8d367e95/unknown/lin/cpu").

It seems to run fine connecting to `rx.minexmr.com:4444' in mining mode. The CPU hashrate is 1550 H/s versus 275 H/s with version 2.10.7 (compiler still run with no optimization [-O0]).

The benchmark mode still segfaults, however, regardless of whether "--noTest" is specified.

I'll download your test version and post the results.

psychocrypt commented 4 years ago

@tantalus-ak thanks for all the information. I think I found the problem. You started with option --benchmark 0. This is not initializing all data correct. I will disallow block version zero for testing.

psychocrypt commented 4 years ago

can you rerun with --benchmark 1 again!

tantalus-ak commented 4 years ago

Much better...

./xmr-stak-rx --benchmark 1 [2019-11-20 19:08:12] : start self test for 'randomx' [2019-11-20 19:08:12] : randomx create vm [2019-11-20 19:08:12] : randomx check for update dataset with 1 threads [2019-11-20 19:08:12] : Thread 0 started updating RandomX dataset 9b397858 [2019-11-20 19:08:12] : Thread 0 start updating RandomX dataset 0 34078719 [2019-11-20 19:08:32] : Thread 0 finished updating RandomX dataset

xmr-stak-rx 1.0.0-rx f8d367e95 ... [2019-11-20 19:08:32] : Mining coin: randomx !!!! Doing only a benchmark and exiting. To mine, remove the '--benchmark' option. !!!! [2019-11-20 19:08:32] : Prepare benchmark for block version 1 [2019-11-20 19:08:32] : Starting 1x thread, affinity: 0. [2019-11-20 19:08:32] : Starting 1x thread, affinity: 1. [2019-11-20 19:08:32] : Starting 1x thread, affinity: 2. [2019-11-20 19:08:32] : Starting 1x thread, affinity: 3. [2019-11-20 19:08:32] : Wait 30 sec until all backends are initialized [2019-11-20 19:09:02] : Wait 30 sec to initialize the dataset [2019-11-20 19:09:02] : randomx create vm [2019-11-20 19:09:02] : randomx create vm [2019-11-20 19:09:02] : randomx check for update dataset with 4 threads [2019-11-20 19:09:02] : randomx check for update dataset with 4 threads [2019-11-20 19:09:02] : randomx create vm [2019-11-20 19:09:02] : randomx create vm [2019-11-20 19:09:02] : randomx check for update dataset with 4 threads [2019-11-20 19:09:02] : randomx check for update dataset with 4 threads [2019-11-20 19:09:32] : Wait 2 sec to end warmup [2019-11-20 19:09:34] : Start a 60 second benchmark... [2019-11-20 19:09:34] : randomx check for update dataset with 4 threads [2019-11-20 19:09:34] : randomx check for update dataset with 4 threads [2019-11-20 19:09:34] : randomx check for update dataset with 4 threads [2019-11-20 19:09:34] : randomx check for update dataset with 4 threads [2019-11-20 19:10:34] : Wait 2 sec to collect benchmark data [2019-11-20 19:10:36] : Benchmark Thread 0 cpu: 386.5 H/S [2019-11-20 19:10:36] : Benchmark Thread 1 cpu: 389.0 H/S [2019-11-20 19:10:36] : Benchmark Thread 2 cpu: 388.2 H/S [2019-11-20 19:10:36] : Benchmark Thread 3 cpu: 386.5 H/S [2019-11-20 19:10:36] : Benchmark Total: 1550.2 H/S [2019-11-20 19:10:36] : Benchmark are measured without the dataset creation.

tantalus-ak commented 4 years ago

Here is the compilation of your version with the additional debugging statement running with verbose=10. gdb output with --benchmark 0 and 1:

(gdb) run --benchmark 0 Starting program: /usr/local/src/xmr-stak-rx/xmr-stak-rx-topic-searchSegfault/bin/xmr-stak-rx --benchmark 0 [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". [2019-11-20 19:33:29] : start self test for 'randomx' [2019-11-20 19:33:29] : randomx create vm [2019-11-20 19:33:29] : randomx check for update dataset with 1 threads [2019-11-20 19:33:29] : Thread 0 started updating RandomX dataset 55630858 [2019-11-20 19:33:30] : Thread 0 start updating RandomX dataset 0 34078719 [2019-11-20 19:33:50] : Thread 0 finished updating RandomX dataset ... [2019-11-20 19:33:50] : Mining coin: randomx !!!! Doing only a benchmark and exiting. To mine, remove the '--benchmark' option. !!!! [2019-11-20 19:33:50] : Prepare benchmark for block version 0 [2019-11-20 19:33:50] : Starting 1x thread, affinity: 0. [New Thread 0x7ffff6f0b700 (LWP 19799)] [2019-11-20 19:33:50] : hwloc: memory pinned [2019-11-20 19:33:50] : Starting 1x thread, affinity: 1. [New Thread 0x7fff5ffff700 (LWP 19800)] [2019-11-20 19:33:50] : invalid_algo can not find a job selector function [2019-11-20 19:33:50] : Starting 1x thread, affinity: 2. [New Thread 0x7fff5f7fe700 (LWP 19801)] [2019-11-20 19:33:50] : invalid_algo can not find a job selector function [2019-11-20 19:33:50] : Starting 1x thread, affinity: 3. [2019-11-20 19:33:50] : invalid_algo can not find a job selector function [New Thread 0x7fff5ebff700 (LWP 19802)] [2019-11-20 19:33:50] : Wait 30 sec until all backends are initialized [2019-11-20 19:33:50] : invalid_algo can not find a job selector function [2019-11-20 19:34:20] : Wait 30 sec to initialize the dataset

Thread 4 "xmr-stak-rx" received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7fff5f7fe700 (LWP 19801)] randomx_calculate_hash (machine=0x0, input=, inputSize=, output=0x7fff5f7fd830) at /usr/local/src/xmr-stak-rx/xmr-stak-rx-topic-searchSegfault/xmrstak/backend/cpu/crypto/randomx/randomx.cpp:451 451 machine->initScratchpad(&tempHash); (gdb) bt

0 randomx_calculate_hash (machine=0x0, input=, inputSize=, output=0x7fff5f7fd830)

at /usr/local/src/xmr-stak-rx/xmr-stak-rx-topic-searchSegfault/xmrstak/backend/cpu/crypto/randomx/randomx.cpp:451

1 0x000055555558ab18 in xmrstak::cpu::minethd::multiway_work_main<1u> (this=0x555555636630)

at /usr/include/c++/8/bits/std_mutex.h:229

2 0x00007ffff7ae6b2f in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6

3 0x00007ffff7f7afa3 in start_thread (arg=) at pthread_create.c:486

4 0x00007ffff77c64cf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Now with --benchmark 1:

(gdb) run --benchmark 1 Starting program: /usr/local/src/xmr-stak-rx/xmr-stak-rx-topic-searchSegfault/bin/xmr-stak-rx --benchmark 1 [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". [2019-11-20 19:35:02] : start self test for 'randomx' [2019-11-20 19:35:02] : randomx create vm [2019-11-20 19:35:02] : randomx check for update dataset with 1 threads [2019-11-20 19:35:02] : Thread 0 started updating RandomX dataset 55630858 [2019-11-20 19:35:03] : Thread 0 start updating RandomX dataset 0 34078719 [2019-11-20 19:35:22] : Thread 0 finished updating RandomX dataset ... [2019-11-20 19:35:22] : Mining coin: randomx !!!! Doing only a benchmark and exiting. To mine, remove the '--benchmark' option. !!!! [2019-11-20 19:35:22] : Prepare benchmark for block version 1 [2019-11-20 19:35:22] : Starting 1x thread, affinity: 0. [New Thread 0x7ffff6f0b700 (LWP 19811)] [2019-11-20 19:35:22] : hwloc: memory pinned [2019-11-20 19:35:22] : Starting 1x thread, affinity: 1. [2019-11-20 19:35:22] : invalid_algo can not find a job selector function [New Thread 0x7fff5ffff700 (LWP 19812)] [2019-11-20 19:35:22] : Starting 1x thread, affinity: 2. [New Thread 0x7fff5f7fe700 (LWP 19813)] [2019-11-20 19:35:22] : invalid_algo can not find a job selector function [2019-11-20 19:35:22] : Starting 1x thread, affinity: 3. [New Thread 0x7fff5ebff700 (LWP 19814)] [2019-11-20 19:35:22] : invalid_algo can not find a job selector function [2019-11-20 19:35:23] : Wait 30 sec until all backends are initialized [2019-11-20 19:35:23] : invalid_algo can not find a job selector function [2019-11-20 19:35:53] : Wait 30 sec to initialize the dataset [2019-11-20 19:35:53] : randomx create vm [2019-11-20 19:35:53] : randomx check for update dataset with 4 threads [2019-11-20 19:35:53] : randomx create vm [2019-11-20 19:35:53] : randomx check for update dataset with 4 threads [2019-11-20 19:35:53] : randomx create vm [2019-11-20 19:35:53] : randomx check for update dataset with 4 threads [2019-11-20 19:35:53] : randomx create vm [2019-11-20 19:35:53] : randomx check for update dataset with 4 threads [2019-11-20 19:36:23] : Wait 2 sec to end warmup [2019-11-20 19:36:25] : Start a 60 second benchmark... [2019-11-20 19:36:25] : randomx check for update dataset with 4 threads [2019-11-20 19:36:25] : randomx check for update dataset with 4 threads [2019-11-20 19:36:25] : randomx check for update dataset with 4 threads [2019-11-20 19:36:25] : randomx check for update dataset with 4 threads [2019-11-20 19:37:25] : Wait 2 sec to collect benchmark data [2019-11-20 19:37:27] : Benchmark Thread 0 cpu: 388.4 H/S [2019-11-20 19:37:27] : Benchmark Thread 1 cpu: 388.5 H/S [2019-11-20 19:37:27] : Benchmark Thread 2 cpu: 388.3 H/S [2019-11-20 19:37:27] : Benchmark Thread 3 cpu: 385.5 H/S [2019-11-20 19:37:27] : Benchmark Total: 1550.7 H/S [2019-11-20 19:37:27] : Benchmark are measured without the dataset creation. [Thread 0x7fff5ebff700 (LWP 19814) exited] [Thread 0x7fff5ffff700 (LWP 19812) exited] [Thread 0x7ffff6f0b700 (LWP 19811) exited] [Thread 0x7ffff6f1c980 (LWP 19807) exited] [Inferior 1 (process 19807) exited normally] (gdb)

psychocrypt commented 4 years ago

thanks for your help to analyse the issue.

tantalus-ak commented 4 years ago

You're very welcome. Your contribution of expertise is also much appreciated by all of us.

psychocrypt commented 4 years ago

fixed with #2561

psychocrypt commented 4 years ago

@bizlevel I have forgot to mention that rocm is not supported. For linux you must use the AMD driver.

minzak commented 4 years ago

For linux you must use the AMD driver. ((( It is locked to Ubuntu now (((

psychocrypt commented 4 years ago

As I said do not worry gpus will not have a guud randomx performance.I suggest to have look for an other coin to utilize your GPUs.