fairy-stockfish / variant-nnue-tools

Variant NNUE training data generator for Fairy-Stockfish
GNU General Public License v3.0
12 stars 12 forks source link

Generator crash on Teeko data generation #19

Closed Belzedar94 closed 2 months ago

Belzedar94 commented 4 months ago

Trying to generate data for Teeko variant, but the generator crashes as soon as it starts, without giving any assertion or error message.

Command used:

uci setoption name Use NNUE value false setoption name Threads value 28 setoption name Hash value 2048 setoption name UCI_Variant value teeko isready generate_training_data depth 5 count 100000000 random_multi_pv 4 random_multi_pv_diff 300 random_move_count 8 random_move_max_ply 20 write_min_ply 5 eval_limit 10000 set_recommended_uci_options data_format bin output_file_name teeko_100Md5.bin quit

yjf2002ghty commented 4 months ago

In fairyground, commit 9b9501be is the currently used fairy-stockfish.wasm. When variant teeko is selected and click "Go" button, the following problems occurred:

readyok
info string classical evaluation enabled
info depth 1 seldepth 1 multipv 1 score cp 69 nodes 25 nps 1190 tbhits 0 time 21 pv P@c3
info depth 2 seldepth 2 multipv 1 score cp 46 nodes 77 nps 3500 tbhits 0 time 22 pv P@c3 P@b1
info depth 3 seldepth 3 multipv 1 score cp 130 nodes 172 nps 7478 tbhits 0 time 23 pv P@c3 P@b1 P@c2
info depth 4 seldepth 4 multipv 1 score cp 38 nodes 960 nps 38400 tbhits 0 time 25 pv P@c3 P@b1 P@c2 P@c4
info depth 5 seldepth 5 multipv 1 score cp 53 nodes 1613 nps 59740 tbhits 0 time 27 pv P@c3 P@b3 P@d2 P@d3
info depth 6 seldepth 6 multipv 1 score cp 69 nodes 6675 nps 166875 tbhits 0 time 40 pv P@c3 P@d4 P@d3 P@b3 P@d2
pthread sent an error! https://fairyground.vercel.app/lib/stockfish.worker.js:1: Uncaught RuntimeError: divide by zero
yjf2002ghty commented 4 months ago

Here is GDB Traceback in FSF: Signal:

Thread 4 received signal SIGFPE, Arithmetic exception.
0x00007ff6f8da71ae in Stockfish::operator/ (d=Stockfish::RookniValueMg, i=0) at E:/Fairy-Stockfish-master/latest/Fairy-Stockfish/src/types.h:632

Stack:

#0  0x00007ff6f8da71ae in Stockfish::operator/ (d=Stockfish::RookniValueMg, i=0)
    at types.h:632
#1  0x00007ff6f8da7157 in Stockfish::operator/ (s=(unknown: 0x3200320), i=0)
    at types.h:686
#2  0x00007ff6f8cd7a8d in Stockfish::(anonymous namespace)::Evaluation<(Stockfish::Trace::Tracing)0>::variant<(Stockfish::Color)0> (this=0xc4e5edb860)
    at evaluate.cpp:1301
#3  0x00007ff6f8cccd6a in Stockfish::(anonymous namespace)::Evaluation<(Stockfish::Trace::Tracing)0>::value (this=0xc4e5edb860)
    at evaluate.cpp:1528
#4  0x00007ff6f8ccbecf in Stockfish::Eval::evaluate (pos=...)
    at evaluate.cpp:1604
#5  0x00007ff6f8d30bca in Stockfish::(anonymous namespace)::qsearch<(Stockfish::<unnamed>::NodeType)0>(Stockfish::Position &, Stockfish::Search::Stack *, Stockfish::Value, Stockfish::Value, Stockfish::Depth) (pos=..., ss=0xc4e5ffbc60,alpha=-145, beta=-144, depth=0)
    at search.cpp:1600
#6  0x00007ff6f8d2d323 in Stockfish::(anonymous namespace)::search<(Stockfish::<unnamed>::NodeType)0>(Stockfish::Position &, Stockfish::Search::Stack *, Stockfish::Value, Stockfish::Value, Stockfish::Depth, bool) (pos=...,ss=0xc4e5ffbc60, alpha=-145, beta=-144, depth=0, cutNode=true)
    at search.cpp:674
#7  0x00007ff6f8d3015b in Stockfish::(anonymous namespace)::search<(Stockfish::<unnamed>::NodeType)0>(Stockfish::Position &, Stockfish::Search::Stack *, Stockfish::Value, Stockfish::Value, Stockfish::Depth, bool) (pos=...,ss=0xc4e5ffbc28, alpha=144, beta=145, depth=1, cutNode=false)
    at search.cpp:1359
#8  0x00007ff6f8d3015b in Stockfish::(anonymous namespace)::search<(Stockfish::<unnamed>::NodeType)0>(Stockfish::Position &, Stockfish::Search::Stack *, Stockfish::Value, Stockfish::Value, Stockfish::Depth, bool) (pos=...,ss=0xc4e5ffbbf0, alpha=-145, beta=-144, depth=2, cutNode=true)
    at search.cpp:1359
#9  0x00007ff6f8d3015b in Stockfish::(anonymous namespace)::search<(Stockfish::<unnamed>::NodeType)0>(Stockfish::Position &, Stockfish::Search::Stack *, Stockfish::Value, Stockfish::Value, Stockfish::Depth, bool) (pos=...,ss=0xc4e5ffbbb8, alpha=144, beta=145, depth=3, cutNode=false)
    at search.cpp:1359
#10 0x00007ff6f8d3015b in Stockfish::(anonymous namespace)::search<(Stockfish::<unnamed>::NodeType)0>(Stockfish::Position &, Stockfish::Search::Stack *, Stockfish::Value, Stockfish::Value, Stockfish::Depth, bool) (pos=...,ss=0xc4e5ffbb80, alpha=-145, beta=-144, depth=4, cutNode=true)
    at search.cpp:1359
#11 0x00007ff6f8d3015b in Stockfish::(anonymous namespace)::search<(Stockfish::<unnamed>::NodeType)0>(Stockfish::Position &, Stockfish::Search::Stack *, Stockfish::Value, Stockfish::Value, Stockfish::Depth, bool) (pos=...,ss=0xc4e5ffbb48, alpha=144, beta=145, depth=5, cutNode=false)
    at search.cpp:1359
#12 0x00007ff6f8d3015b in Stockfish::(anonymous namespace)::search<(Stockfish::<unnamed>::NodeType)0>(Stockfish::Position &, Stockfish::Search::Stack *, Stockfish::Value, Stockfish::Value, Stockfish::Depth, bool) (pos=...,ss=0xc4e5ffbb10, alpha=-145, beta=-144, depth=6, cutNode=true)
    at search.cpp:1359
#13 0x00007ff6f8d2b95d in Stockfish::(anonymous namespace)::search<(Stockfish::<unnamed>::NodeType)2>(Stockfish::Position &, Stockfish::Search::Stack *, Stockfish::Value, Stockfish::Value, Stockfish::Depth, bool) (pos=...,ss=0xc4e5ffbad8, alpha=144, beta=161, depth=7, cutNode=false)
    at search.cpp:1344
#14 0x00007ff6f8d26cbd in Stockfish::Thread::search (this=0x24d6d348080)
    at search.cpp:443
#15 0x00007ff6f8d25280 in Stockfish::MainThread::search (this=0x24d6d348080)
    at search.cpp:217
#16 0x00007ff6f8d35e59 in Stockfish::Thread::idle_loop (this=0x24d6d348080)
    at thread.cpp:130
#17 0x00007ff6f8d9825c in Stockfish::start_routine<Stockfish::Thread, std::pair<Stockfish::Thread*, void (Stockfish::Thread::*)()> > (ptr=0x24d6d15c230)
    at thread_win32_osx.h:42
#18 0x00007ff6f8d7e49b in pthread_create_wrapper ()
#19 0x00007ffcea80b0ea in msvcrt!_beginthreadex () from C:\Windows\System32\msvcrt.dll
#20 0x00007ffcea80b1bc in msvcrt!_endthreadex () from C:\Windows\System32\msvcrt.dll
#21 0x00007ffced467974 in KERNEL32!BaseThreadInitThunk () from C:\Windows\System32\kernel32.dll
#22 0x00007ffced59a2f1 in ntdll!RtlUserThreadStart () from C:\Windows\SYSTEM32\ntdll.dll
#23 0x0000000000000000 in ?? ()
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
ianfab commented 2 months ago

I will close this in favor of the corresponding issue in the Fairy-SF repo. This should implicitly be fixed by a merge from upstream once it is fixed there.