mimblewimble / grin-miner

Standalone miner for grin
Apache License 2.0
296 stars 153 forks source link

thread 'unnamed' panicked at 'called `Option::unwrap()` #236

Closed rostfrei closed 4 years ago

rostfrei commented 4 years ago

I successfully built the miner from source code but I'm having issues running it. I get

[root@localhost grin-miner]# ./target/debug/grin-miner
Starting Grin-Miner from config file at: /root/Developement/grin-miner/grin-miner.toml
Jan 10 23:52:45.541 INFO This is Grin-Miner version 3.0.0-beta.1 (git v3.0.0-beta.1), built for x86_64-unknown-linux-gnu by rustc 1.40.0.
Jan 10 23:52:45.807 ERRO
thread 'unnamed' panicked at 'called `Option::unwrap()` on a `None` value': src/libcore/option.rs:378stack backtrace:
   0: grin_miner_util::logger::send_panic_to_log::{{closure}}
             at util/src/logger.rs:120
   1: std::panicking::rust_panic_with_hook
             at src/libstd/panicking.rs:468
   2: std::panicking::continue_panic_fmt
             at src/libstd/panicking.rs:373
   3: rust_begin_unwind
             at src/libstd/panicking.rs:302
   4: core::panicking::panic_fmt
             at src/libcore/panicking.rs:139
   5: core::panicking::panic
             at src/libcore/panicking.rs:70
   6: core::option::Option<T>::unwrap
             at /builddir/build/BUILD/rustc-1.40.0-src/src/libcore/macros.rs:41
   7: cuckoo_miner::miner::miner::CuckooMiner::solver_thread
             at cuckoo-miner/src/miner/miner.rs:95
   8: cuckoo_miner::miner::miner::CuckooMiner::start_solvers::{{closure}}
             at cuckoo-miner/src/miner/miner.rs:228
   9: std::sys_common::backtrace::__rust_begin_short_backtrace
             at /builddir/build/BUILD/rustc-1.40.0-src/src/libstd/sys_common/backtrace.rs:129
  10: std::thread::Builder::spawn_unchecked::{{closure}}::{{closure}}
             at /builddir/build/BUILD/rustc-1.40.0-src/src/libstd/thread/mod.rs:469
  11: <std::panic::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
             at /builddir/build/BUILD/rustc-1.40.0-src/src/libstd/panic.rs:317
  12: std::panicking::try::do_call
             at /builddir/build/BUILD/rustc-1.40.0-src/src/libstd/panicking.rs:287
  13: __rust_maybe_catch_panic
             at src/libpanic_unwind/lib.rs:78
  14: std::panicking::try
             at /builddir/build/BUILD/rustc-1.40.0-src/src/libstd/panicking.rs:265
  15: std::panic::catch_unwind
             at /builddir/build/BUILD/rustc-1.40.0-src/src/libstd/panic.rs:396
  16: std::thread::Builder::spawn_unchecked::{{closure}}
             at /builddir/build/BUILD/rustc-1.40.0-src/src/libstd/thread/mod.rs:468
  17: core::ops::function::FnOnce::call_once{{vtable.shim}}
             at /builddir/build/BUILD/rustc-1.40.0-src/src/libcore/ops/function.rs:227
  18: <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once
             at /builddir/build/BUILD/rustc-1.40.0-src/src/liballoc/boxed.rs:942
  19: <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once
             at /builddir/build/BUILD/rustc-1.40.0-src/src/liballoc/boxed.rs:942
      std::sys_common::thread::start_thread
             at src/libstd/sys_common/thread.rs:13
      std::sys::unix::thread::Thread::new::thread_start
             at src/libstd/sys/unix/thread.rs:79
  20: start_thread
  21: clone

Thread 'unnamed' panicked with message:
"called `Option::unwrap()` on a `None` value"
See grin.log for further details.
Jan 10 23:52:46.686 WARN Connection Status: Connected to Grin server at floonet-stratum.grinmint.com:13416.
Jan 10 23:52:47.009 INFO Got a job at height 320821 and difficulty 4

Messages are exchanging but no mining actually happens.

I am trying to mine with cuckaroom pow on

# whether to run the tui
run_tui = false

# listening grin stratum server url
#stratum_server_addr = "127.0.0.1:3416"
#stratum_server_addr = "eu-west-stratum.grinmint.com:3416"
stratum_server_addr = "floonet-stratum.grinmint.com:13416"

# login for the stratum server (if required)
stratum_server_login = "5647+test@gmail.com/rig1"

# password for the stratum server (if required)
#stratum_server_password = "x"

I have these graphics cards

[root@localhost grin-miner]# nvidia-smi
Fri Jan 10 23:37:32 2020
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 435.21       Driver Version: 435.21       CUDA Version: 10.1     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce GTX 106...  Off  | 00000000:0A:00.0  On |                  N/A |
| 33%   30C    P8     6W / 130W |     23MiB /  3016MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+
|   1  GeForce RTX 2080    Off  | 00000000:0B:00.0 Off |                  N/A |
|  0%   35C    P8     1W / 225W |      1MiB /  7982MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|    0      1835      G   /usr/bin/X                                    21MiB |
+-----------------------------------------------------------------------------+

and this miner configuration

# currently requires 6GB GPU memory
[[mining.miner_plugin_config]]
plugin_name = "cuckaroom_cuda_29"
#plugin_name = "cuckarood_cuda_29"
# or, prior to 2nd hardfork: plugin_name = "cuckarood_cuda_29"
#[mining.miner_plugin_config.parameters]
device = 1
cpuload = 1
ntrims = 399
#ntrims = 31
# or, prior to 2nd hardfork: ntrims = 31
genablocks = 1024
recoverblocks = 2048
recovertpb = 256

necessary plugins are there

[root@localhost grin-miner]# ls -alh target/debug/plugins/
total 20M
drwxr-xr-x 2 root root 4.0K Jan 10 23:31 .
drwxr-xr-x 8 root root 4.0K Jan 10 23:31 ..
-rwxr-xr-x 1 root root 402K Jan 10 23:31 cuckaroo_cpu_avx2_19.cuckooplugin
-rwxr-xr-x 1 root root 396K Jan 10 23:31 cuckaroo_cpu_avx2_29.cuckooplugin
-rwxr-xr-x 1 root root 375K Jan 10 23:31 cuckaroo_cpu_compat_19.cuckooplugin
-rwxr-xr-x 1 root root 371K Jan 10 23:31 cuckaroo_cpu_compat_29.cuckooplugin
-rwxr-xr-x 1 root root 1.4M Jan 10 23:31 cuckaroo_cuda_19.cuckooplugin
-rwxr-xr-x 1 root root 1.5M Jan 10 23:31 cuckaroo_cuda_29.cuckooplugin
-rwxr-xr-x 1 root root 406K Jan 10 23:31 cuckarood_cpu_avx2_19.cuckooplugin
-rwxr-xr-x 1 root root 398K Jan 10 23:31 cuckarood_cpu_avx2_29.cuckooplugin
-rwxr-xr-x 1 root root 379K Jan 10 23:31 cuckarood_cpu_compat_19.cuckooplugin
-rwxr-xr-x 1 root root 377K Jan 10 23:31 cuckarood_cpu_compat_29.cuckooplugin
-rwxr-xr-x 1 root root 1.6M Jan 10 23:31 cuckarood_cuda_19.cuckooplugin
-rwxr-xr-x 1 root root 1.6M Jan 10 23:31 cuckarood_cuda_29.cuckooplugin
-rwxr-xr-x 1 root root 1.7M Jan 10 23:31 cuckaroom_cuda_19.cuckooplugin
-rwxr-xr-x 1 root root 1.8M Jan 10 23:31 cuckaroom_cuda_29.cuckooplugin
-rwxr-xr-x 1 root root 267K Jan 10 23:31 cuckatoo_lean_cpu_avx2_31.cuckooplugin
-rwxr-xr-x 1 root root 238K Jan 10 23:31 cuckatoo_lean_cpu_compat_19.cuckooplugin
-rwxr-xr-x 1 root root 238K Jan 10 23:31 cuckatoo_lean_cpu_compat_31.cuckooplugin
-rwxr-xr-x 1 root root 839K Jan 10 23:31 cuckatoo_lean_cuda_19.cuckooplugin
-rwxr-xr-x 1 root root 835K Jan 10 23:31 cuckatoo_lean_cuda_31.cuckooplugin
-rwxr-xr-x 1 root root 437K Jan 10 23:31 cuckatoo_mean_cpu_avx2_19.cuckooplugin
-rwxr-xr-x 1 root root 459K Jan 10 23:31 cuckatoo_mean_cpu_avx2_31.cuckooplugin
-rwxr-xr-x 1 root root 396K Jan 10 23:31 cuckatoo_mean_cpu_compat_19.cuckooplugin
-rwxr-xr-x 1 root root 413K Jan 10 23:31 cuckatoo_mean_cpu_compat_31.cuckooplugin
-rwxr-xr-x 1 root root 1.5M Jan 10 23:31 cuckatoo_mean_cuda_gtx_31.cuckooplugin
-rwxr-xr-x 1 root root 1.4M Jan 10 23:31 cuckatoo_mean_cuda_rtx_31.cuckooplugin
rostfrei commented 4 years ago
[root@localhost grin-miner]# cat grin-miner.log
Jan 13 09:43:43.302 INFO This is Grin-Miner version 3.0.0-beta.1 (git v3.0.0-beta.1), built for x86_64-unknown-linux-gnu by rustc 1.40.0.
Jan 13 09:43:43.302 DEBG Built with profile "debug", features "CURSIVE, DEFAULT, TUI" on Fri, 10 Jan 2020 22:31:06 GMT.
Jan 13 09:43:43.302 TRCE Dependencies:
 aho-corasick 0.6.10, arc-swap 0.4.4, array-macro 1.0.3, arrayref 0.3.5, arrayvec 0.4.12, arrayvec 0.5.1, atty 0.2.13, autocfg 0.1.7, backtrace 0.3.40, backtrace-sys 0.1.32, base64 0.10.1, bitflags 0.9.1, bitflags 1.2.1, blake2-rfc 0.2.18, blake2b_simd 0.5.9, bufstream 0.1.4, built 0.2.3, byteorder 0.5.3, byteorder 1.3.2, c2-chacha 0.2.3, cc 1.0.48, cfg-if 0.1.10, chrono 0.4.10, cl-sys 0.4.2, cloudabi 0.0.3, cmake 0.1.42, const-cstr 0.2.1, constant_time_eq 0.1.4, core-foundation 0.6.4, core-foundation-sys 0.6.2, crossbeam 0.7.3, crossbeam-channel 0.3.9, crossbeam-channel 0.4.0, crossbeam-deque 0.7.2, crossbeam-epoch 0.8.0, crossbeam-queue 0.2.0, crossbeam-utils 0.6.6, crossbeam-utils 0.7.0, cuckoo_miner 3.0.0-beta.1, cursive 0.12.0, darling 0.10.2, darling_core 0.10.2, darling_macro 0.10.2, dirs 1.0.5, dirs 2.0.2, dirs-sys 0.3.4, enum-map 0.5.0, enum-map-derive 0.4.3, enum-map-internals 0.1.3, enum_primitive 0.1.1, enumset 0.4.4, enumset_derive 0.4.3, failure 0.1.6, failure_derive 0.1.6, fnv 1.0.6, foreign-types 0.3.2, foreign-types-shared 0.1.1, fs_extra 1.1.0, fuchsia-cprng 0.1.1, futures 0.1.29, gcc 0.3.55, getrandom 0.1.13, git2 0.6.11, glob 0.2.11, grin_miner 3.0.0-beta.1, grin_miner_config 3.0.0-beta.1, grin_miner_plugin 3.0.0-beta.1, grin_miner_util 3.0.0-beta.1, hashbrown 0.1.8, hashbrown 0.3.1, ident_case 1.0.1, idna 0.1.5, itoa 0.4.4, kernel32-sys 0.2.2, lazy_static 0.2.11, lazy_static 1.4.0, libc 0.1.12, libc 0.2.66, libgit2-sys 0.6.19, libloading 0.4.3, libz-sys 1.0.25, log 0.3.9, log 0.4.8, maplit 1.0.2, matches 0.1.8, memchr 2.2.1, memoffset 0.5.3, native-tls 0.2.3, ncurses 5.99.0, nodrop 0.1.14, num 0.1.42, num 0.2.0, num-bigint 0.1.44, num-complex 0.1.43, num-complex 0.2.3, num-integer 0.1.41, num-iter 0.1.39, num-rational 0.1.42, num-rational 0.2.2, num-traits 0.1.43, num-traits 0.2.10, ocl 0.19.3, ocl-core 0.11.2, ocl-core-vector 0.1.0, ocl_cuckaroo 1.0.2, ocl_cuckatoo 1.0.2, openssl 0.10.26, openssl-probe 0.1.2, openssl-sys 0.9.53, owning_ref 0.4.0, pancurses 0.16.1, pdcurses-sys 0.7.1, percent-encoding 1.0.1, pkg-config 0.3.17, ppv-lite86 0.2.6, proc-macro2 1.0.6, quote 1.0.2, qutex 0.2.3, rand 0.3.23, rand 0.4.6, rand 0.7.2, rand_chacha 0.2.1, rand_core 0.3.1, rand_core 0.4.2, rand_core 0.5.1, rand_hc 0.2.0, rand_os 0.1.3, rdrand 0.4.0, redox_syscall 0.1.56, redox_users 0.3.1, regex 0.2.11, regex-syntax 0.5.6, remove_dir_all 0.5.2, rust-argon2 0.5.1, rust-crypto 0.2.36, rustc-demangle 0.1.16, rustc-serialize 0.3.24, rustc_version 0.1.7, rustc_version 0.2.3, ryu 1.0.2, schannel 0.1.16, scopeguard 0.3.3, scopeguard 1.0.0, security-framework 0.3.4, security-framework-sys 0.3.3, semver 0.1.20, semver 0.9.0, semver-parser 0.7.0, serde 1.0.104, serde_derive 1.0.104, serde_json 1.0.44, signal-hook 0.1.12, signal-hook-registry 1.2.0, slog 2.1.1, slog-async 2.3.0, slog-term 2.4.2, smallvec 1.0.0, stable_deref_trait 1.1.1, strsim 0.9.3, syn 1.0.11, synstructure 0.12.3, take_mut 0.2.2, tempfile 3.1.0, term 0.4.6, term 0.6.1, term_size 0.3.1, thread_local 0.3.6, time 0.1.42, toml 0.4.10, toml 0.5.5, ucd-util 0.1.5, unicode-bidi 0.3.4, unicode-normalization 0.1.11, unicode-segmentation 1.6.0, unicode-width 0.1.7, unicode-xid 0.2.0, url 1.7.2, utf8-ranges 1.0.4, vcpkg 0.2.8, wasi 0.7.0, winapi 0.2.8, winapi 0.3.8, winapi-build 0.1.1, winapi-i686-pc-windows-gnu 0.4.0, winapi-x86_64-pc-windows-gnu 0.4.0, winreg 0.5.1, xi-unicode 0.1.0
Jan 13 09:43:43.302 DEBG Starting solvers
Jan 13 09:43:43.303 DEBG Using mining plugin dir provided by config: "/root/Developement/grin-miner/target/debug/plugins"
Jan 13 09:43:43.303 DEBG Loading miner plugin: /root/Developement/grin-miner/target/debug/plugins/cuckaroom_cuda_29.cuckooplugin
Jan 13 09:43:43.305 DEBG Loading miner plugin: /root/Developement/grin-miner/target/debug/plugins/cuckaroom_cuda_29.cuckooplugin
Jan 13 09:43:43.560 ERRO
thread 'unnamed' panicked at 'called `Option::unwrap()` on a `None` value': src/libcore/option.rs:378stack backtrace:
   0: grin_miner_util::logger::send_panic_to_log::{{closure}}
             at util/src/logger.rs:120
   1: std::panicking::rust_panic_with_hook
             at src/libstd/panicking.rs:468
   2: std::panicking::continue_panic_fmt
             at src/libstd/panicking.rs:373
   3: rust_begin_unwind
             at src/libstd/panicking.rs:302
   4: core::panicking::panic_fmt
             at src/libcore/panicking.rs:139
   5: core::panicking::panic
             at src/libcore/panicking.rs:70
   6: core::option::Option<T>::unwrap
             at /builddir/build/BUILD/rustc-1.40.0-src/src/libcore/macros.rs:41
   7: cuckoo_miner::miner::miner::CuckooMiner::solver_thread
             at cuckoo-miner/src/miner/miner.rs:95
   8: cuckoo_miner::miner::miner::CuckooMiner::start_solvers::{{closure}}
             at cuckoo-miner/src/miner/miner.rs:228
   9: std::sys_common::backtrace::__rust_begin_short_backtrace
             at /builddir/build/BUILD/rustc-1.40.0-src/src/libstd/sys_common/backtrace.rs:129
  10: std::thread::Builder::spawn_unchecked::{{closure}}::{{closure}}
             at /builddir/build/BUILD/rustc-1.40.0-src/src/libstd/thread/mod.rs:469
  11: <std::panic::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
             at /builddir/build/BUILD/rustc-1.40.0-src/src/libstd/panic.rs:317
  12: std::panicking::try::do_call
             at /builddir/build/BUILD/rustc-1.40.0-src/src/libstd/panicking.rs:287
  13: __rust_maybe_catch_panic
             at src/libpanic_unwind/lib.rs:78
  14: std::panicking::try
             at /builddir/build/BUILD/rustc-1.40.0-src/src/libstd/panicking.rs:265
  15: std::panic::catch_unwind
             at /builddir/build/BUILD/rustc-1.40.0-src/src/libstd/panic.rs:396
  16: std::thread::Builder::spawn_unchecked::{{closure}}
             at /builddir/build/BUILD/rustc-1.40.0-src/src/libstd/thread/mod.rs:468
  17: core::ops::function::FnOnce::call_once{{vtable.shim}}
             at /builddir/build/BUILD/rustc-1.40.0-src/src/libcore/ops/function.rs:227
  18: <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once
             at /builddir/build/BUILD/rustc-1.40.0-src/src/liballoc/boxed.rs:942
  19: <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once
             at /builddir/build/BUILD/rustc-1.40.0-src/src/liballoc/boxed.rs:942
      std::sys_common::thread::start_thread
             at src/libstd/sys_common/thread.rs:13
      std::sys::unix::thread::Thread::new::thread_start
             at src/libstd/sys/unix/thread.rs:79
  20: start_thread
  21: clone
quentinlesceller commented 4 years ago

Hi @rostfrei, can you try to:

  1. Update submodules:
    git submodule update --recursive
  2. Build in release mode cargo build --release. Don't forget to uncomment and uncomments the following lines to build Cuda plugins: https://github.com/mimblewimble/grin-miner/blob/master/Cargo.toml#L38-L40

If you are still stuck, can you talk to me either on Keybase @quentinlesceller or Gitter same username. Thanks!

rostfrei commented 4 years ago

Hi @quentinlesceller

If I recursively update with

git submodule update --recursive

plugins do not compile at all

running: "cmake" "--build" "." "--target" "" "--config" "Release" "--"
[  1%] Building NVCC (Device) object CMakeFiles/cuckaroom_cuda_29.dir/cuckoo/src/cuckaroom/cuckaroom_cuda_29_generated_mean.cu.o
[  2%] Building NVCC (Device) object CMakeFiles/cuckatoo_lean_cuda_19.dir/cuckoo/src/cuckatoo/cuckatoo_lean_cuda_19_generated_lean.cu.o
[  3%] Building NVCC (Device) object CMakeFiles/cuckaroom_cuda_19.dir/cuckoo/src/cuckaroom/cuckaroom_cuda_19_generated_mean.cu.o
[  5%] Building NVCC (Device) object CMakeFiles/cuckarood_cuda_29.dir/cuckoo/src/cuckarood/cuckarood_cuda_29_generated_photon.cu.o
[  6%] Building NVCC (Device) object CMakeFiles/cuckarood_cuda_19.dir/cuckoo/src/cuckarood/cuckarood_cuda_19_generated_photon.cu.o
[  7%] Linking CXX shared library plugins/cuckatoo_lean_cuda_19.cuckooplugin
[  8%] Built target cuckatoo_lean_cuda_19

--- stderr
/root/Developement/grin-miner/cuckoo-miner/src/cuckoo_sys/plugins/cuckoo/src/cuckaroom/mean.cu(148): warning: variable "sizeC" was declared but never referenced

/root/Developement/grin-miner/cuckoo-miner/src/cuckoo_sys/plugins/cuckoo/src/cuckaroom/mean.cu(534): error: expected a comma (the one-argument version of static_assert is not enabled in this mode)

/root/Developement/grin-miner/cuckoo-miner/src/cuckoo_sys/plugins/cuckoo/src/cuckaroom/mean.cu(535): error: expected a comma (the one-argument version of static_assert is not enabled in this mode)

/root/Developement/grin-miner/cuckoo-miner/src/cuckoo_sys/plugins/cuckoo/src/cuckaroom/mean.cu(536): error: expected a comma (the one-argument version of static_assert is not enabled in this mode)

/root/Developement/grin-miner/cuckoo-miner/src/cuckoo_sys/plugins/cuckoo/src/cuckaroom/mean.cu(537): error: expected a comma (the one-argument version of static_assert is not enabled in this mode)

4 errors detected in the compilation of "/tmp/tmpxft_00004751_00000000-14_mean.compute_75.cpp1.ii".
CMake Error at cuckaroom_cuda_29_generated_mean.cu.o.Release.cmake:279 (message):
  Error generating file
  /root/Developement/grin-miner/target/release/build/cuckoo_miner-f0d1c48c509addef/out/build/CMakeFiles/cuckaroom_cuda_29.dir/cuckoo/src/cuckaroom/./cuckaroom_cuda_29_generated_mean.cu.o

gmake[2]: *** [CMakeFiles/cuckaroom_cuda_29.dir/build.make:408: CMakeFiles/cuckaroom_cuda_29.dir/cuckoo/src/cuckaroom/cuckaroom_cuda_29_generated_mean.cu.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:72: CMakeFiles/cuckaroom_cuda_29.dir/all] Error 2
gmake[1]: *** Waiting for unfinished jobs....
/root/Developement/grin-miner/cuckoo-miner/src/cuckoo_sys/plugins/cuckoo/src/cuckaroom/mean.cu(148): warning: variable "sizeC" was declared but never referenced

/root/Developement/grin-miner/cuckoo-miner/src/cuckoo_sys/plugins/cuckoo/src/cuckarood/photon.cu(491): error: expected a comma (the one-argument version of static_assert is not enabled in this mode)

/root/Developement/grin-miner/cuckoo-miner/src/cuckoo_sys/plugins/cuckoo/src/cuckarood/photon.cu(492): error: expected a comma (the one-argument version of static_assert is not enabled in this mode)

/root/Developement/grin-miner/cuckoo-miner/src/cuckoo_sys/plugins/cuckoo/src/cuckarood/photon.cu(493): error: expected a comma (the one-argument version of static_assert is not enabled in this mode)

/root/Developement/grin-miner/cuckoo-miner/src/cuckoo_sys/plugins/cuckoo/src/cuckarood/photon.cu(494): error: expected a comma (the one-argument version of static_assert is not enabled in this mode)

/root/Developement/grin-miner/cuckoo-miner/src/cuckoo_sys/plugins/cuckoo/src/cuckaroom/mean.cu(534): error: expected a comma (the one-argument version of static_assert is not enabled in this mode)

/root/Developement/grin-miner/cuckoo-miner/src/cuckoo_sys/plugins/cuckoo/src/cuckaroom/mean.cu(535): error: expected a comma (the one-argument version of static_assert is not enabled in this mode)

/root/Developement/grin-miner/cuckoo-miner/src/cuckoo_sys/plugins/cuckoo/src/cuckaroom/mean.cu(536): error: expected a comma (the one-argument version of static_assert is not enabled in this mode)

/root/Developement/grin-miner/cuckoo-miner/src/cuckoo_sys/plugins/cuckoo/src/cuckaroom/mean.cu(537): error: expected a comma (the one-argument version of static_assert is not enabled in this mode)

4 errors detected in the compilation of "/tmp/tmpxft_0000475e_00000000-14_photon.compute_75.cpp1.ii".
4 errors detected in the compilation of "/tmp/tmpxft_0000475f_00000000-14_mean.compute_75.cpp1.ii".
CMake Error at cuckarood_cuda_29_generated_photon.cu.o.Release.cmake:279 (message):
  Error generating file
  /root/Developement/grin-miner/target/release/build/cuckoo_miner-f0d1c48c509addef/out/build/CMakeFiles/cuckarood_cuda_29.dir/cuckoo/src/cuckarood/./cuckarood_cuda_29_generated_photon.cu.o

gmake[2]: *** [CMakeFiles/cuckarood_cuda_29.dir/build.make:408: CMakeFiles/cuckarood_cuda_29.dir/cuckoo/src/cuckarood/cuckarood_cuda_29_generated_photon.cu.o] Error 1
gmake[2]: *** Waiting for unfinished jobs....
CMake Error at cuckaroom_cuda_19_generated_mean.cu.o.Release.cmake:279 (message):
  Error generating file
  /root/Developement/grin-miner/target/release/build/cuckoo_miner-f0d1c48c509addef/out/build/CMakeFiles/cuckaroom_cuda_19.dir/cuckoo/src/cuckaroom/./cuckaroom_cuda_19_generated_mean.cu.o

gmake[2]: *** [CMakeFiles/cuckaroom_cuda_19.dir/build.make:233: CMakeFiles/cuckaroom_cuda_19.dir/cuckoo/src/cuckaroom/cuckaroom_cuda_19_generated_mean.cu.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:109: CMakeFiles/cuckaroom_cuda_19.dir/all] Error 2
/root/Developement/grin-miner/cuckoo-miner/src/cuckoo_sys/plugins/cuckoo/src/cuckarood/photon.cu(491): error: expected a comma (the one-argument version of static_assert is not enabled in this mode)

/root/Developement/grin-miner/cuckoo-miner/src/cuckoo_sys/plugins/cuckoo/src/cuckarood/photon.cu(492): error: expected a comma (the one-argument version of static_assert is not enabled in this mode)

/root/Developement/grin-miner/cuckoo-miner/src/cuckoo_sys/plugins/cuckoo/src/cuckarood/photon.cu(493): error: expected a comma (the one-argument version of static_assert is not enabled in this mode)

/root/Developement/grin-miner/cuckoo-miner/src/cuckoo_sys/plugins/cuckoo/src/cuckarood/photon.cu(494): error: expected a comma (the one-argument version of static_assert is not enabled in this mode)

4 errors detected in the compilation of "/tmp/tmpxft_00004794_00000000-14_photon.compute_75.cpp1.ii".
CMake Error at cuckarood_cuda_19_generated_photon.cu.o.Release.cmake:279 (message):
  Error generating file
  /root/Developement/grin-miner/target/release/build/cuckoo_miner-f0d1c48c509addef/out/build/CMakeFiles/cuckarood_cuda_19.dir/cuckoo/src/cuckarood/./cuckarood_cuda_19_generated_photon.cu.o

gmake[2]: *** [CMakeFiles/cuckarood_cuda_29.dir/build.make:233: CMakeFiles/cuckarood_cuda_19.dir/cuckoo/src/cuckarood/cuckarood_cuda_19_generated_photon.cu.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:146: CMakeFiles/cuckarood_cuda_29.dir/all] Error 2
gmake: *** [Makefile:84: all] Error 2
thread 'main' panicked at '
command did not execute successfully, got: exit code: 2

build script failed, must exit now', /root/.cargo/registry/src/github.com-1ecc6299db9ec823/cmake-0.1.42/src/lib.rs:861:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

@tromp sugested to recursively update to remote

git submodule update --remote --recursive

I also had to comment out 104 line in the cuckoo-miner/src/cuckoo_sys/plugins/CMakeLists.txt as suggested by @tromp

Now everything compiles and I have all configured plugins in

[root@localhost grin-miner]# ls -alh target/release/plugins/
total 14M
drwxr-xr-x 2 root root 4.0K Jan 14 08:16 .
drwxr-xr-x 8 root root 4.0K Jan 14 08:23 ..
-rwxr-xr-x 1 root root  56K Jan 14 08:23 cuckaroo_cpu_avx2_19.cuckooplugin
-rwxr-xr-x 1 root root  65K Jan 14 08:23 cuckaroo_cpu_avx2_29.cuckooplugin
-rwxr-xr-x 1 root root  56K Jan 14 08:23 cuckaroo_cpu_compat_19.cuckooplugin
-rwxr-xr-x 1 root root  60K Jan 14 08:23 cuckaroo_cpu_compat_29.cuckooplugin
-rwxr-xr-x 1 root root 1.3M Jan 14 08:23 cuckaroo_cuda_19.cuckooplugin
-rwxr-xr-x 1 root root 1.3M Jan 14 08:23 cuckaroo_cuda_29.cuckooplugin
-rwxr-xr-x 1 root root  60K Jan 14 08:23 cuckarood_cpu_avx2_19.cuckooplugin
-rwxr-xr-x 1 root root  65K Jan 14 08:23 cuckarood_cpu_avx2_29.cuckooplugin
-rwxr-xr-x 1 root root  56K Jan 14 08:23 cuckarood_cpu_compat_19.cuckooplugin
-rwxr-xr-x 1 root root  60K Jan 14 08:23 cuckarood_cpu_compat_29.cuckooplugin
-rwxr-xr-x 1 root root 1.5M Jan 14 08:23 cuckarood_cuda_19.cuckooplugin
-rwxr-xr-x 1 root root 1.5M Jan 14 08:23 cuckarood_cuda_29.cuckooplugin
-rwxr-xr-x 1 root root 1.6M Jan 14 08:23 cuckaroom_cuda_19.cuckooplugin
-rwxr-xr-x 1 root root 1.6M Jan 14 08:23 cuckaroom_cuda_29.cuckooplugin
-rwxr-xr-x 1 root root  44K Jan 14 08:23 cuckatoo_lean_cpu_avx2_31.cuckooplugin
-rwxr-xr-x 1 root root  40K Jan 14 08:23 cuckatoo_lean_cpu_compat_19.cuckooplugin
-rwxr-xr-x 1 root root  40K Jan 14 08:23 cuckatoo_lean_cpu_compat_31.cuckooplugin
-rwxr-xr-x 1 root root 757K Jan 14 08:23 cuckatoo_lean_cuda_19.cuckooplugin
-rwxr-xr-x 1 root root 757K Jan 14 08:23 cuckatoo_lean_cuda_31.cuckooplugin
-rwxr-xr-x 1 root root  64K Jan 14 08:23 cuckatoo_mean_cpu_avx2_19.cuckooplugin
-rwxr-xr-x 1 root root  77K Jan 14 08:23 cuckatoo_mean_cpu_avx2_31.cuckooplugin
-rwxr-xr-x 1 root root  56K Jan 14 08:23 cuckatoo_mean_cpu_compat_19.cuckooplugin
-rwxr-xr-x 1 root root  69K Jan 14 08:23 cuckatoo_mean_cpu_compat_31.cuckooplugin
-rwxr-xr-x 1 root root 1.3M Jan 14 08:23 cuckatoo_mean_cuda_gtx_31.cuckooplugin
-rwxr-xr-x 1 root root 1.3M Jan 14 08:23 cuckatoo_mean_cuda_rtx_31.cuckooplugin

but I still get runtime exception

[root@localhost grin-miner]# ./target/release/grin-miner
Starting Grin-Miner from config file at: /root/Developement/grin-miner/grin-miner.toml
Jan 14 08:19:14.097 INFO This is Grin-Miner version 3.0.0-beta.1 (git v3.0.0-beta.1), built for x86_64-unknown-linux-gnu by rustc 1.40.0.
Thread 'unnamed' panicked with message:
"called `Option::unwrap()` on a `None` value"
See grin.log for further details.
Jan 14 08:19:14.160 ERRO
thread 'unnamed' panicked at 'called `Option::unwrap()` on a `None` value': src/libcore/option.rs:378stack backtrace:
   0: grin_miner_util::logger::send_panic_to_log::{{closure}}
   1: std::panicking::rust_panic_with_hook
             at src/libstd/panicking.rs:468
   2: std::panicking::continue_panic_fmt
             at src/libstd/panicking.rs:373
   3: rust_begin_unwind
             at src/libstd/panicking.rs:302
   4: core::panicking::panic_fmt
             at src/libcore/panicking.rs:139
   5: core::panicking::panic
             at src/libcore/panicking.rs:70
   6: cuckoo_miner::miner::miner::CuckooMiner::solver_thread
   7: std::sys_common::backtrace::__rust_begin_short_backtrace
   8: std::panicking::try::do_call
   9: __rust_maybe_catch_panic
             at src/libpanic_unwind/lib.rs:78
  10: core::ops::function::FnOnce::call_once{{vtable.shim}}
  11: <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once
             at /builddir/build/BUILD/rustc-1.40.0-src/src/liballoc/boxed.rs:942
  12: <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once
             at /builddir/build/BUILD/rustc-1.40.0-src/src/liballoc/boxed.rs:942
      std::sys_common::thread::start_thread
             at src/libstd/sys_common/thread.rs:13
      std::sys::unix::thread::Thread::new::thread_start
             at src/libstd/sys/unix/thread.rs:79
  13: start_thread
  14: clone

Jan 14 08:19:15.279 WARN Connection Status: Connected to Grin server at floonet-stratum.grinmint.com:13416.
Jan 14 08:19:16.006 INFO Got a job at height 324666 and difficulty 4
Jan 14 08:19:17.013 INFO Mining: Cucka*oo* at 0 gps (graphs per second)
Jan 14 08:19:20.002 INFO Got a new job: JobTemplate { height: 324666, job_id: 1, difficulty: 4, pre_pow: "0003000000000004f43a000000005e1d6b7621824af12a229aac0b276870f7e2b2ec62632ef3ba88aa17432045659f3f95c091d21a25038813e0b9135f2b49f0b7d8605c3605b1b95d6a4be843f91943cd242cb916c728912b087baa96739dc95255fbbab41a13d10ede924ec0d92b2b89b1259d4f5b4755590bbc756e33014b67f78fb711b8bedfb142e0d15a1af3068e49f4b843d7690c911bf86bff8574930c703d802e044ab6238639a257ac30ad9745bcd38d9698f4f8cfbe7e3f643ddf6db159ce69da8c9646270b0c02a5bd37ae4c00000000000cb5dd00000000000ab90c000000fe1483ddce0000000d" }
Jan 14 08:19:20.027 INFO Mining: Cucka*oo* at 0 gps (graphs per second)

When debugging in debug version I can see that ctx in miners.rs:94 is null

        let ctx = solver.lib.create_solver_ctx(&mut solver.config.params);
        let control_ctx = SolverCtxWrapper(NonNull::new(ctx).unwrap());

so context is somehow not properly created

tromp commented 4 years ago

the compilation issues should be fixed in the latest grin-miner PR

quentinlesceller commented 4 years ago

@rostfrei can you confirm?

rostfrei commented 4 years ago

@quentinlesceller I can confirm that whole project compiles without any needed patches, but exception problem still persists.

quentinlesceller commented 4 years ago

Going to close that issue since it's 6+ months old.