Possible SF bug

Discussion of chess software programming and technical issues.

Moderators: hgm, Harvey Williamson, bob

Post Reply
whittenizer
Posts: 85
Joined: Sun May 29, 2011 9:56 pm
Location: San Diego

Possible SF bug

Post by whittenizer » Tue Mar 20, 2012 1:05 pm

Hey guys,

In testing things, I've uncovered an issue with the following position in both the C++ and C# versions:

position startpos moves e2e4 e7e5 g1f3 b8c6 f1c4 g8f6 f3g5 d7d5 e4d5 c6a5 c4b5 c7c6 d5c6 b7c6 d1f3 f8e7 b5c6 a5c6 f3c6 c8d7 c6c4 e8g8 d2d3

go depth 12. With this, I get an abort() error, nothing too detailed. It doesn't happen all the time in C++ but it always happens in the C# so not easy to reproduce. Can you guys take a quick peek? I'll try to reproduce it too with maybe a few other things going on in the background.

Thanks

User avatar
Eelco de Groot
Posts: 3816
Joined: Sun Mar 12, 2006 1:40 am
Location: Groningen

Re: Possible SF bug

Post by Eelco de Groot » Tue Mar 20, 2012 4:47 pm

It is very unlikely that there is a bug in Stockfish itself that would cause such an abort. The position is not special as far as I can see, and if this crashes a build then it is unlikely to survive other simple tests. Have you tried a debug version, so you could check if any asserts are triggered. Maybe there is something wrong in the input/output code in your version, but why it would crash in this position but not in others seems a bit strange.

[D]r2q1rk1/p2bbppp/5n2/4p1N1/2Q5/3P4/PPP2PPP/RNB1K2R b KQ - 0 12

This is not Stockfish but a modified version of the Github master of yesterday ago just to give an idea what should be the output:

Stockfish 120319 by Tord Romstad, Marco Costalba and Joona Kiiski
position startpos moves e2e4 e7e5 g1f3 b8c6 f1c4 g8f6 f3g5 d7d5 e4d5 c6a5 c4b5 c
7c6 d5c6 b7c6 d1f3 f8e7 b5c6 a5c6 f3c6 c8d7 c6c4 e8g8 d2d3
go depth 12
info depth 1 seldepth 1 score cp 298 nodes 152 nps 0 time 0 multipv 1 pv d7g4
info depth 2 seldepth 3 score cp -60 nodes 1848 nps 0 time 0 multipv 1 pv h7h6 g
5e4
info depth 3 seldepth 4 score cp 274 nodes 2799 nps 0 time 0 multipv 1 pv a8c8 g
5f7 c8c4 f7d8 c4c2
info depth 4 seldepth 5 score cp 64 nodes 4630 nps 289375 time 16 multipv 1 pv h
7h6 g5e4 d7e6 e4f6 e7f6
info depth 5 seldepth 6 score cp 149 nodes 6366 nps 397875 time 16 multipv 1 pv
h7h6 h2h4 h6g5 h4g5 d7e6
info depth 6 seldepth 7 score cp 121 nodes 11649 nps 375774 time 31 multipv 1 pv
h7h6 h2h4 a8c8 c4b3 h6g5 h4g5
info depth 7 seldepth 9 score cp 193 nodes 17005 nps 361808 time 47 multipv 1 pv
a8c8 c4b3 h7h6 h2h4 h6g5 h4g5 d7e6 c2c3
info depth 8 seldepth 13 score cp 307 nodes 31081 nps 398474 time 78 multipv 1 p
v a8c8 c4h4 c8c2 e1g1 h7h6 b1c3 h6g5 c1g5 c2b2
info depth 9 seldepth 13 score cp 303 nodes 59498 nps 381397 time 156 multipv 1
pv a8c8 c4h4 c8c2 e1g1 h7h6 g5f3 f6g4 h4g3 e7c5 f3e5 f7f5
info depth 10 seldepth 15 score cp 254 nodes 171208 nps 390885 time 438 multipv
1 pv a8c8 c4b3 f6g4 h2h4 h7h6 f2f3 h6g5 f3g4 g5h4 g4g5 d7e6
info depth 11 seldepth 16 score cp 250 nodes 203980 nps 372906 time 547 multipv
1 pv a8c8 c4b3 f6g4 h2h4 h7h6 f2f3 h6g5 f3g4 g5h4 c1e3 e7g5 e3g5 d8g5 e1g1 g5g4
info depth 12 seldepth 20 score cp 246 nodes 345759 nps 381632 time 906 multipv
1 pv a8c8 c4b3 f6g4 h2h4 h7h6 f2f3 h6g5 f3g4 g5h4 b1c3 d7c6 c1d2 c6g2 e1c1 e7g5
h1e1 g2f3 e1e5
bestmove a8c8 ponder c4b3


Regards, Eelco
Last edited by Eelco de Groot on Tue Mar 20, 2012 5:59 pm, edited 1 time in total.
Debugging is twice as hard as writing the code in the first
place. Therefore, if you write the code as cleverly as possible, you
are, by definition, not smart enough to debug it.
-- Brian W. Kernighan

whittenizer
Posts: 85
Joined: Sun May 29, 2011 9:56 pm
Location: San Diego

Re: Possible SF bug

Post by whittenizer » Tue Mar 20, 2012 5:37 pm

Yes, as stated before, it doesnt happen all the time. If I do a depth 10 search, it never crashes. So, something going on there. I'll debug it more tonight, and get back to you guys as to my findings.

Thanks for the reply.

ZirconiumX
Posts: 1325
Joined: Sun Jul 17, 2011 9:14 am

Re: Possible SF bug

Post by ZirconiumX » Tue Mar 20, 2012 5:45 pm

Can't reproduce on my computer.

Score : -1.17
Depth : 12/34
Time : 00:00:04
Nodes : 484642
N/sec : 97252
12... Rc8 13. Qb3 Rb8 14. Qc4 Ng4 15. Nf3 Rc8 16. Qb3 Rb8 17. Qc4

Matthew:out
Some believe in the almighty dollar.

I believe in the almighty printf statement.

Post Reply