Scorpio icon indicating copy to clipboard operation
Scorpio copied to clipboard

Segmentation fault when using either nnue or nn

Open schahmatist opened this issue 8 months ago • 8 comments

Installed scorpio using install.bat. I have Windows 11. Engine crashes with Segmentation fault every time I run it using any nnue or nn. Tried lczero and scorpio for nn, or stockfish and scorpio format for nnue, does not matter. Works fine without network. (use_nn = 0 ; use_nnue = 0) . As soon as any of those parameters is 1, no matter which nets I use, or which other relevant parameters I set, engine crashes immediately as soon as I issue "go" command. Tried to re-install multiple times, does not matter, same issue. Please let me know if there is a way to trace the issue.

schahmatist avatar May 07 '25 05:05 schahmatist

$ ./scorpio.exe
treeht 162179754 X 192 = 29696.0 MB
Number of cores 1 of 32
go
--------------------------
ht 33554432 X 2 X 16 X 1 = 1024.0 MB
eht 1048576 X 2 X 4 X 116 = 928.0 MB
processors [116]
Process running on node 0 and core 0
--------------------------
EgbbProbe not Loaded!
loading_time = 0s
# rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1
# [st = 10685ms, mt = 29220ms , hply = 0 , moves_left 10]
Segmentation fault

schahmatist avatar May 07 '25 06:05 schahmatist

@schahmatist Have you tried running with the batch file instead like:

./scorpio.bat go quit

dshawul avatar May 07 '25 12:05 dshawul

The same thing, it exits without making a move:

$ ./scorpio.bat go quit
treeht 162179754 X 192 = 29696.0 MB
Number of cores 1 of 32
--------------------------
ht 33554432 X 2 X 16 X 1 = 1024.0 MB
eht 1048576 X 2 X 4 X 116 = 928.0 MB
processors [116]
Process running on node 0 and core 0
--------------------------
EgbbProbe not Loaded!
loading_time = 0s
# rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1
# [st = 10685ms, mt = 29220ms , hply = 0 , moves_left 10]

schah@MSI MINGW64 ~/Downloads/Scorpio/bin/Windows

Also it does not work from any GUI. I think I did isolate the problem and it happens only when either nnue or nn is being used.

schahmatist avatar May 07 '25 17:05 schahmatist

@schahmatist Thank you. It looks like egbbdll.dll is either missing or it is missing dependencies? Make sure that the path specified in scorpio.ini for "egbb_path" exists. Also by default it should have been using the 32 out of 32 cores you have unless affinity is set to 1 in scorpio.ini. Could you please post the scorpio.ini file? Also please let me know how you install scorpio i.e. what arguments you passed to install.bat.

Yes the fact that it worked when using use_nn 0 use_nnue 0 points to an isssue to egbbdll.so and the NN libraries it depends on.

dshawul avatar May 07 '25 18:05 dshawul

  1. yes, while initially trying to troubleshoot the error I thought, that maybe 32 cores is too much, and set it to 1 . But with 32 - it's the same error.
  2. I actually just downloaded install.bat and clicked on it (did not execute it from the command line) so I guess all the defaults? or is it a bad way of executing it?
  3. will upload .ini shortly

schahmatist2 avatar May 08 '25 04:05 schahmatist2

Here we go. (had to rename to .ini.txt in order to attach) scorpio.ini.txt

In this version I just try to use nnue, without using nn - still fails. I doublechecked and I do have all the dlls including egbbdll64.dll under egbb_path (C:\Users\schah\Downloads\Scorpio\bin\Windows ) and I do have the egbb files under egbb_files_path (C:\Users\schah\Downloads\Scorpio\egbb) I tried to tweak couple other parameters (like cache size , etc), but none made a difference.

schahmatist avatar May 08 '25 04:05 schahmatist

when setting both nn and nnue to 0 , I still get the message that EgbbProbe is not Loaded, but the engine works fine and makes a move.

schahmatist avatar May 08 '25 05:05 schahmatist

Hi. I have an interesting update. Jim Ablett released his own compiles of the newest Scorpio Code:

https://outskirts.altervista.org/forum/viewtopic.php?p=70243&hilit=scorpio#p70243

First I thought that this bug was fixed ,as all his executables initially work fine. After uci command, I can issue "go" without issues (and without any Segmentation Fault error) - the engine thinks and makes a d2-d4 move.

However with gui (I use Banksia) - it executes:: ucinewgame command. And "ucinewgame" immediately crashes the engine with Segmentation fault. Reproducible from the command line.

schahmatist avatar Jul 28 '25 21:07 schahmatist