Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stockfish hang in TCEC S16 Division P Game 51 #2291

Closed
xoto10 opened this issue Sep 9, 2019 · 234 comments
Closed

Stockfish hang in TCEC S16 Division P Game 51 #2291

xoto10 opened this issue Sep 9, 2019 · 234 comments

Comments

@xoto10
Copy link
Contributor

xoto10 commented Sep 9, 2019

In the TCEC Archive here

Reproduces with a few seconds to move for me:

Engine master(1) failed to respond to ping
Terminating process of engine master(1)
Warning: Unexpected result claim from master: 1/2-1/2 {Draw by stalled connection}
Engine master(0) failed to respond to ping
Terminating process of engine master(0)

@xoto10
Copy link
Contributor Author

xoto10 commented Sep 9, 2019

I used this as the opening book:

[FEN "8/4kp2/2Bp1p2/b1pP1P1p/P1P4P/6P1/8/6K1 b - - 19 57"]
[Result "1/2-1/2"]

1/2-1/2

@vondele
Copy link
Member

vondele commented Sep 9, 2019

can you give the precise sequence of uci commands to reproduce the hang + info on the system you run on.

@crossbr
Copy link

crossbr commented Sep 9, 2019

I entered that FEN (but without any "Result") and SF_19082608 is up to d=82, 9.5 billion nodes, and no crash yet.

@xoto10
Copy link
Contributor Author

xoto10 commented Sep 9, 2019

Apologies, stall was due to bad memory setting by me :(

@vondele
Copy link
Member

vondele commented Sep 9, 2019

right now, I see no issues with this particular fen... will need more info to see if this is an issue / what it is.

@xoto10
Copy link
Contributor Author

xoto10 commented Sep 9, 2019

When it happened at TCEC I would guess it was a hang, there was a msg from cutechess terminating the engine process. It had just under 17 minutes to use, but the longest recent thinks were around 400 and 300 seconds, depths 86/94 and 90/106, 33bn and 22bn nodes.

@vondele
Copy link
Member

vondele commented Sep 9, 2019

well, recent multi-threaded tests are all crash free, for 100000s of games. So if it is a real issue, will be hard to find.

@xoto10
Copy link
Contributor Author

xoto10 commented Sep 9, 2019

Sure. Let's wait to see what TCEC say ...

@MJZ1977
Copy link
Contributor

MJZ1977 commented Sep 9, 2019

Perhaps an issue linked to low memory available in comparison with high multithread needs ?

Edit : specially breadcrumbs ? don't know how many memory they need

@vondele
Copy link
Member

vondele commented Sep 9, 2019

breadcrumbs use 16K memory, independent of the number of threads ... generally threads don't need much memory (mostly the history tables). It is also no reason to hang.

@MichaelB7
Copy link
Contributor

Just curious, how did TCEC know it was hung as the result appears to be adjudicated on TCEC and did the TCEC stop play before the time on the clock was used up. If it was hung, it would have lost by time forfeit eventually ( I would think), and there would have been no need to adjudicated the result. So I am curious as to why the result was adjudicated, and if they adjudicated the result before time expired?

@xoto10
Copy link
Contributor Author

xoto10 commented Sep 9, 2019

It ran out of time.

Edit: and was then unresponsive to cutechess so cutechess killed it.

@MichaelB7
Copy link
Contributor

That was unfortunate as it was a dead draw at that point.

No issue here on my machine ( slightly modified)

dep	score	nodes	time	(not shown:  tbhits	knps	seldep)
100	 -0.26 	21.7G	11:25.26	Kf8 Kf2 Bb4 Kf3 Bd2 Bb5 Kg7 Ke2 Bc3 Kd1 Ba5 Kc2 Be1 Kd3 Bb4 Ke4 Ba5 Be8 Be1 Bc6 Kh6 Kf3 Ba5 g4 hxg4+ Kxg4 Kg7 Kg3 Be1+ Kg2 Bc3 Bb5 Bd2 Kf3 Bc3 Bd7 Kf8 Ke2 Kg7 Bc8 Kh6 Kf3 Kh5 Kg3 Be1+ Kh3 Kh6 Ba6 Ba5 Kg4 Kg7 Kg3 Be1+ Kf3 Bc3 B 
 99	 -0.26 	19.6G	10:16.29	Kf8 Kf2 Bb4 Kf3 Bd2 Bb5 Kg7 Ke2 Bc3 Kd1 Ba5 Kc2 Be1 Kd3 Bb4 Ke4 Ba5 Be8 Be1 Bc6 Kh6 Kf3 Ba5 g4 hxg4+ Kxg4 Kg7 Kg3 Be1+ Kg2 Bc3 Bb5 Bd2 Kf3 Bc3 Bd7 Kf8 Ke2 Kg7 Bc8 Kh6 Kf3 Kh5 Kg3 Be1+ Kh3 Kh6 Ba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.01	Kf8 Kg2 Bd2 Kf3 Be1 Bd7 Kg7 Be8 Kf8 Bc6 Kg7 Bb7 Bd2 g4 hxg4+ Kxg4 Bc3 
 12	 -0.32 	171209	0:00.01	Kf8 Kf2 Kg7 Kg2 Bc3 Kf3 Be1 g4 hxg4+ Kxg4 Bd2 h5 Bc3 Kf4 
 11	 -0.33 	140075	0:00.01	Kf8 Kf2 Kg7 Kf3 Bd2 g4 hxg4+ Kxg4 Kh6 Be8 Kg7 h5 
 10	 -0.36 	88917  	0:00.00	Kf8 Kf1 Kg7 Kf2 Bb4 Kf3 Bc3 g4 hxg4+ Kxg4 Kh6 Bd7 
  9	 -0.32 	66143  	0:00.00	Kf8 Kf1 Kg7 Ke2 Bc3 Kf3 Bd2 g4 hxg4+ Kxg4 Kh6 
  8	 -0.44 	52361  	0:00.00	Kf8 Kf2 Kg8 Kf3 Bd2 g4 hxg4+ Kg3 Kh7 
  7	 -0.42 	30033  	0:00.00	Kf8 g4 hxg4 Kf2 g3+ Kxg3 Kg7 
  6	 -0.38 	14349  	0:00.00	Kd8 Kf2 Kc7 Be8 Bc3 Bxf7 
  5	 -0.31 	7651    	0:00.00	Be1 Kg2 Bd2 Kf3 Be1 
  4	 -0.27 	6157    	0:00.00	Kd8 Kf2 Kc7 
  3	 -0.37 	4237    	0:00.00	Be1 Kh2 Bd2 
  2	 -0.20 	2508    	0:00.00	Kd8 Kg2 
  1	 -0.08 	951      	0:00.00	Be1 
  0	# 

@xoto10
Copy link
Contributor Author

xoto10 commented Sep 9, 2019

In the absence of other evidence TCEC have ruled it as a stockfish crash (well, hang really).

A viewer said this was the last output, posted after about 22s of thought:

<Stockfish 190826(13): info depth 83 seldepth 114 multipv 1 score cp -41 nodes 2661493724 nps 121020995 hashfull 97 tbhits 1495869 time 21992 pv e7f8 g1f2 a5c7 f2f3 f8e7 c6b7 c7a5 g3g4 h5g4 f3g3 a5c3 g3g4 c3a5 b7a6 a5c3 a6b5 c3d2 b5c6 d2e1 c6a8 e1a5 g4h5 a5d2 a8c6 d2e1 h5g4 e1d2 c6b5 d2a5 g4h3 a5d2 b5a6 d2c3 a6c8 c3e1 c8b7 e1d2 h3g2 d2c3 b7c6 c3d2 g2f1 d2c3 c6a8 c3d2 f1f2 e7f8 f2e2 d2b4 e2f3 f8e7 f3f2 b4d2 a8b7 e7f8 f2f3 d2e1 b7c6 f8e7 f3e2 e1b4 c6b5 ............

Roughly 16 mins later, after running out of time:

Stockfish 190826(13): stop Terminating process of engine Stockfish 190826(13)

So it sounds like something happened while it was in its normal window of thinking time that made it not send any more output to cutechess. That could have been when it tried to send its move, of course, or it could be some kind of internal infinite loop, or ...

In fact previous moves took 23/22/36/22/21 seconds, so 22s sounds like when it tried to send a move back to cutechess?

@MJZ1977
Copy link
Contributor

MJZ1977 commented Sep 9, 2019

In fact previous moves took 23/22/36/22/21 seconds, so 22s sounds like when it tried to send a move back to cutechess?

This explanation seems the most logic. Specially the position has no reason to lead to infinite loops. But is it a SF issue or cutechess issue. I don't know ... Perhaps SF sended the move but cutechess didn't receive it.

@Aloril
Copy link

Aloril commented Sep 9, 2019

Whole log for this game is at https://tcec-chess.com/crash/s16divp_51.7z (= http://tinyurl.com/y597lyyp listed in Crash info)

@snicolet
Copy link
Member

snicolet commented Sep 9, 2019

Specially the position has no reason to lead to infinite loops.

Maybe not infinite loops, but search explosion?

The last output received from Stockfish was at depth 82 and selective depth 114 after (almost) 22 seconds, and then nothing happened in like 15 minutes before Stockfish was flagged:

82128711 <Stockfish 190826(13): info depth 83 seldepth 114 multipv 1 score cp -41 nodes 2661493724 nps 121020995 hashfull 97 tbhits 1495869 time 21992 pv e7f8 g1f2 a5c7 f2f3 f8e7 c6b7 c7a5 g3g4 h5g4 f3g3 a5c3 g3g4 c3a5 b7a6 a5c3 a6b5 c3d2 b5c6 d2e1 c6a8 e1a5 g4h5 a5d2 a8c6 d2e1 h5g4 e1d2 c6b5 d2a5 g4h3 a5d2 b5a6 d2c3 a6c8 c3e1 c8b7 e1d2 h3g2 d2c3 b7c6 c3d2 g2f1 d2c3 c6a8 c3d2 f1f2 e7f8 f2e2 d2b4 e2f3 f8e7 f3f2 b4d2 a8b7 e7f8 f2f3 d2e1 b7c6 f8e7 f3e2 e1b4 c6b5 b4a5 b5a6 a5c3 a6c8 c3b4 e2f2 e7f8 f2f3 b4c3 c8e6 f8g7 f3g4 c3d2 g4g3 d2c3 e6c8 c3e1 g3f3 g7h6 f3g4 e1a5 c8b7 a5e1 b7c6 h6g7 c6b5 e1a5 g4f4 g7f8 b5d7 a5d2 f4f3 d2a5 h4h5 f8g7 h5h6 g7h6

But already at depth 29 we were reaching selective depth 113:

82106994 <Stockfish 190826(13): info depth 29 seldepth 113 multipv 1 score cp -41 nodes 852215 nps 85221500 tbhits 0 time 10 pv e7f8 g1f2 a5c7 f2f3 f8e7 c6b7 c7a5 g3g4 h5g4 f3g3 a5c3 g3g4 c3e1 g4h5 e1b4 h5h6 e7f8 b7c8 b4e1 c8d7 e1d2 h6h5 d2e1 d7c6 e1d2 c6b7 f8e7 b7a6 d2b4 a6b5 b4e1 h5g4 e1a5 b5c6 a5d2 g4f3 d2e1 f3e2 e1b4 e2d1 b4a5 c6b7 a5c3 b7c8 e7f8 d1e2 f8e7 c8a6 c3b4 h4h5 b4a5 e2f2

Maybe I am wrong, but the sort of position when this happened (shuffling in a draw opposite colored bishops endgame with score = 0.41, stockfish having not yet shown 0.00) seems to hint that maybe we observed a search explosion problem somewhere, maybe related to the shuffling patch?

I wasn't really active when the shuffling patch was developed, but did we had problems like that during its development or tuning?

@Mindbreaker1
Copy link

It went fine through depth 85. Then I ran it again and I got some sort of memory leak at depth 79. Speed went down to a crawl. Third time seems to be just fine again. I am using Fritz 16 interface.

@vondele
Copy link
Member

vondele commented Sep 9, 2019

unlikely that shuffle extensions are related. Threads will quit search if they observe the signal stop. I.e. pass at line 1199 in search. Similarly, stop will be signaled by the mainthread if that one reaches line 1828. It isn't very easy to prove this happens always, but maybe there is some very rare case (that I can't see, but why is the cycle detection code before the time check)?

Memory corruption could of course cause anything, e.g. if some random write causes ponder to be true, this would happen.

@vondele
Copy link
Member

vondele commented Sep 9, 2019

@Mindbreaker1 with or without TB ?

@Mindbreaker1
Copy link

With 6-man and less

@Mindbreaker1
Copy link

I had the hash set at 12+ GB
Tried a few more times. Haven't got it to do it again.

@snicolet
Copy link
Member

snicolet commented Sep 9, 2019

Threads will quit search if they observe the signal stop

Hmmm, maybe our code is not robust enough for time emergency, by the way. It is true that we exit the search in line 1199 in any thread if the main thread has signaled in check_time(), but line 1199 is after closing a subtree, so there could still be an (infinite) chain of subtree openings before we stop.

I would prefer to add these lines around line 1199 when entering the search function, to be honest:

if (Threads.stop.load(std::memory_order_relaxed))
    return VALUE_ZERO;

Of course that would just be to be 100% sure that our time emergency procedure is correct in case of explosion problem, but that doesn't fix the underlying problem.

@vondele
Copy link
Member

vondele commented Sep 9, 2019

I really think this wasn't a time emergency. max_time (which is checked by check_time) must have been much shorter than the available time on the clock (would need to verify, but I'm rather sure, additionally with have the 1s moveoverhead).

I agree we should be defensive in the code, but before we rush to a solution we should understand what is going on.

@Mindbreaker1
Copy link

Well, I got another unusual result. It stayed on 79 much longer, but everything else looked fine.

@snicolet
Copy link
Member

snicolet commented Sep 9, 2019

@vondele What makes me really suspiscious is the depth 29 / selective depth 119 reported in the logs

@xoto10
Copy link
Contributor Author

xoto10 commented Sep 9, 2019

I had a 10 minute gap in writes to the log while testing (11 slow cores, but still):

Note the ^C because nothing seemed to be happening and the date at that point compared to output of ls:

$ tail -f sfmaster.log
<< info depth 87 currmove a5d2 currmovenumber 2
<< info depth 87 currmove a5b4 currmovenumber 3
<< info depth 87 currmove a5c3 currmovenumber 4
<< info depth 87 currmove a5e1 currmovenumber 5
<< info depth 87 currmove e7d8 currmovenumber 6
<< info depth 87 currmove a5d8 currmovenumber 7
<< info depth 87 currmove a5c7 currmovenumber 8
<< info depth 87 currmove a5b6 currmovenumber 9
<< info depth 87 seldepth 140 multipv 1 score cp -42 nodes 18627970197 nps 17266666 hashfull 1000 tbhits 0 time 1078840 pv e7f8 g1f2 f8g7 c6d7 g7f8 f2e3 f8e7 d7b5 a5c3 e3e2 e7f8 b5a6 f8e7 e2f2 c3a5 f2e3 a5e1 e3f3 e7d8 a6b7 e1a5 f3g2 d8c7 b7c6 c7d8 c6b5 d8e7 g2h3 e7d8 b5a6 d8e7 a6b7 e7d7 h3h2 d7e7 h2g2 a5e1 b7c6 e1a5 g2f3 a5d2 f3e4 e7d8 c6b5 d8e7 b5a6 d2c3 a6b7 c3a5 b7c6 a5e1 e4e3 e1c3 e3d3 c3e1 d3e2 e1c3 c6a8 c3a5 e2f1 e7d8 f1g1 d8e7 g1h1 e7d8 a8b7 d8c7 b7a6 c7d8 h1g2 d8c7 g2f2 c7d7 f2f3 a5e1 a6b5 d7d8 a4a5 e1a5 f3f2 a5b4 b5a4 b4c3 f2g2 d8e7 a4d1 e7d7 d1h5
<< info depth 88 currmove e7f8 currmovenumber 1
^C
$ ls -lt
total 6814112
-rw------- 1 sf sf 48842 Sep 9 16:19 sfmaster.log
-rw------- 1 sf sf 297 Sep 9 16:01 sfnew.log
-rw------- 1 sf sf 656 Sep 9 16:01 cute_2h_master.out
drwx------ 3 sf sf 24576 Sep 9 16:01 ./
-rwx------ 1 sf sf 1620 Sep 9 16:01 cute_2h*
...
$ date
Mon 9 Sep 16:29:44 BST 2019

Output continued very shortly after:

$ tail -f sfmaster.log
<< info depth 87 currmove a5d2 currmovenumber 2
<< info depth 87 currmove a5b4 currmovenumber 3
<< info depth 87 currmove a5c3 currmovenumber 4
<< info depth 87 currmove a5e1 currmovenumber 5
<< info depth 87 currmove e7d8 currmovenumber 6
<< info depth 87 currmove a5d8 currmovenumber 7
<< info depth 87 currmove a5c7 currmovenumber 8
<< info depth 87 currmove a5b6 currmovenumber 9
<< info depth 87 seldepth 140 multipv 1 score cp -42 nodes 18627970197 nps 17266666 hashfull 1000 tbhits 0 time 1078840 pv e7f8 g1f2 f8g7 c6d7 g7f8 f2e3 f8e7 d7b5 a5c3 e3e2 e7f8 b5a6 f8e7 e2f2 c3a5 f2e3 a5e1 e3f3 e7d8 a6b7 e1a5 f3g2 d8c7 b7c6 c7d8 c6b5 d8e7 g2h3 e7d8 b5a6 d8e7 a6b7 e7d7 h3h2 d7e7 h2g2 a5e1 b7c6 e1a5 g2f3 a5d2 f3e4 e7d8 c6b5 d8e7 b5a6 d2c3 a6b7 c3a5 b7c6 a5e1 e4e3 e1c3 e3d3 c3e1 d3e2 e1c3 c6a8 c3a5 e2f1 e7d8 f1g1 d8e7 g1h1 e7d8 a8b7 d8c7 b7a6 c7d8 h1g2 d8c7 g2f2 c7d7 f2f3 a5e1 a6b5 d7d8 a4a5 e1a5 f3f2 a5b4 b5a4 b4c3 f2g2 d8e7 a4d1 e7d7 d1h5
<< info depth 88 currmove e7f8 currmovenumber 1
<< info depth 88 currmove a5d2 currmovenumber 2
<< info depth 88 currmove a5e1 currmovenumber 3
<< info depth 88 currmove a5b4 currmovenumber 4
<< info depth 88 currmove a5c3 currmovenumber 5
<< info depth 88 currmove e7d8 currmovenumber 6
<< info depth 88 currmove a5d8 currmovenumber 7
<< info depth 88 currmove a5b6 currmovenumber 8
<< info depth 88 currmove a5c7 currmovenumber 9
<< info depth 88 seldepth 96 multipv 1 score cp -42 nodes 32787387402 nps 16933010 hashfull 1000 tbhits 0 time 1936300 pv e7f8 g1f2 f8g7 c6d7 g7f8 f2e3 f8e7 d7b5 a5c3 e3e2 e7f8 b5a6 f8e7 e2f2 c3b4 f2g2 b4a5 a6b5 e7f8 g2f3 a5c3 f3e4 c3a5 e4e3 f8e7 e3f3 a5d2 b5c6 d2c3 f3e2 e7f8 e2d3 c3e1 d3e3 f8g7 c6b7 g7h6 e3d3 e1a5 b7c6 h6g7 c6d7 a5e1 d3e4 g7f8 e4e3 f8e7 d7c6 e1c3 e3f3 c3e1 f3e4 e1a5 c6b7 a5e1 e4f4 e1d2 f4f3 d2c3 f3f2 c3a5 b7c6 e7d8 f2e3 d8e7 c6a8 a5e1 e3f4 e1d2 f4f3 d2c3 f3f2 c3a5 a8b7 e7d8 b7a6 d8c7 f2e3 a5e1 g3g4 h5g4 h4h5 g4g3 e3f3 e1d2 f3g3 c7d7 g3f2 d7e7 f2e2 d2b4
<< info depth 89 currmove e7f8 currmovenumber 1

Does hashful 1000 indicate a full hash? I was using 8GB (option.Hash=8192)

@Alayan-stk-2
Copy link

Yes hashfull 1000 is 100% utilization of hash. Hashfull 123 is 12.3% full.

@xoto10
Copy link
Contributor Author

xoto10 commented Sep 9, 2019

I put some debug output in and maximumtime looks to be around say 15-20% of total time, so if the check is made, it should stop us in plenty of time.
This matches my experience watching TCEC where I would say sf takes a max of about 33% of available time. (Some engines occasionally get up towards 50%)

@vondele
Copy link
Member

vondele commented Sep 9, 2019

@vondele What makes me really suspiscious is the depth 29 / selective depth 119 reported in the logs

that's quite usual with the shuffle extensions, and was discussed in depth. This should still not cause the time_check mechanism to fail (if that's what is going on).

@ppigazzini
Copy link
Contributor

ppigazzini commented Sep 16, 2019

@vondele
https://github.com/vondele/Stockfish/tree/noCustomMutex
2.6% slowdown wrt master, both dynamic build w/ gcc 9.2 by msys2, same dlls (switching libwinpthread-1.dll has not effect on performance)

$ bash bench-parallel.sh ./stockfish-master.exe ./stockfish-noCM.exe 100
run   1 /100
run   2 /100
run   3 /100
run   4 /100
run   5 /100
...
 98  1911486  1856040  -55446
 99  1907220  1854419  -52801
100  1905518  1861733  -43785

base =    1904572 +/- 5351
test =    1854418 +/- 5065
diff =     -50153 +/- 965
speedup = -0.026333

@noobpwnftw
Copy link
Contributor

noobpwnftw commented Sep 16, 2019

I think I can make it not hang under any conditions, without damaging performance, but it may look ugly.
@ppigazzini Can you test my #2307 after "Wake up again in case of a data race."? It should not hang even with new DLLs under MINGW.

@joergoster
Copy link
Contributor

Updated my msys2 installation this morning, compiled current master and experienced no problems so far.

@ppigazzini
Copy link
Contributor

@joergoster what is your CPU? At the moment we have hangs on Intel 3770k, Amd FX, Intel Xeon (bmi2) and the TCEC CPU.

make profile-build ARCH=x86-64-modern COMP=mingw -j (or COMP=gcc to have a dynamic build) and run this:

.\cutechess-cli.exe -repeat -rounds 1000 -tournament gauntlet -resign movecount=3 score=400 -draw movenumber=34 movecount=8 score=20 -concurrency 2 -engine cmd=stockfish.exe option.Hash=8 option.Threads=4 -engine cmd=stockfish.exe option.Hash=8 option.Threads=4 -each proto=uci tc=1+0.01 -openings file=2moves_v1.pgn format=pgn order=random plies=16

@joergoster
Copy link
Contributor

@ppigazzini CPU i5-4570
compiled with make profile-build ARCH=x86-64-bmi2 comp=mingw -j3

However, just noticed that the compiles only run under msys2 prompt.
Under Windows prompt it doesn't run anymore. :-(
This is eventually related to a major Windows update this morning. I need to investigate.

@ppigazzini
Copy link
Contributor

ppigazzini commented Sep 16, 2019

@noobpwnftw #2307 so far so good (400/1000). Dynamic build w/ msys gcc 9.2 and latest msys2 libwinpthread.

@ppigazzini
Copy link
Contributor

@noobpwnftw 1000 games completed successfully.
Same speed of the master:

$ bash bench-parallel.sh ./stockfish-master.exe ./stockfish-t2.exe 100
run   1 /100
...
 99  1961511  1952508  -9003
100  1906369  1889749  -16620

base =    1934715 +/- 4579
test =    1923861 +/- 5288
diff =     -10854 +/- 1144
speedup = -0.005610

@snicolet
Copy link
Member

Just for reference, here is a version using atomic instead of condition variable: https://github.com/snicolet/Stockfish/tree/hang

Does it hang?

@ppigazzini
Copy link
Contributor

@snicolet No, it runs fine w/ the latest libwinpthread (ie the problematic one).
Slowdown 2% wrt master.

$ bash bench-parallel.sh ./stockfish-master.exe ./stockfish-hang.exe 20

base =    1706058 +/- 20454
test =    1665974 +/- 22636
diff =     -40083 +/- 16241
speedup = -0.023495

@ppigazzini
Copy link
Contributor

@noobpwnftw here the script to test the speed

#!/bin/bash
if [[ $# -ne 3 ]]; then
  echo "usage:" $0 "base test n_runs"
  echo "example:" $0 "./stockfish_base ./stockfish_test 10"
  exit 1
fi

base=$1
test=$2
n_runs=$3

# temporary files initialization
cat /dev/null > base000.txt
cat /dev/null > test000.txt
cat /dev/null > tmp000.txt

# preload of CPU/cache/memory
($base bench >/dev/null 2>&1)&
($test bench >/dev/null 2>&1)&
wait

# bench loop: SMP bench with background subshells
for k in `seq 1 $n_runs`;
  do
    printf "run %3d /%3d\n" $k $n_runs

    # swap the execution order to avoid bias
    if [ $((k%2)) -eq 0 ];
      then
        ($base bench >/dev/null 2>> base000.txt)&
        ($test bench >/dev/null 2>> test000.txt)&
        wait
      else
        ($test bench >/dev/null 2>> test000.txt)&
        ($base bench >/dev/null 2>> base000.txt)&
        wait
    fi
  done

# text processing to extract nps values
cat base000.txt | grep second | grep -Eo '[0-9]{1,}' > base001.txt
cat test000.txt | grep second | grep -Eo '[0-9]{1,}' > test001.txt

for k in `seq 1 $n_runs`;
  do
    echo $k >> tmp000.txt
  done

printf "\nrun\tbase\ttest\tdiff\n"
paste tmp000.txt base001.txt test001.txt | awk '{printf "%3d  %d  %d  %+d\n", $1, $2, $3, $3-$2}'
paste base001.txt test001.txt | awk '{printf "%d\t%d\t%d\n", $1, $2, $2-$1}' > tmp000.txt

# compute: sample mean, 1.96 * std of sample mean (95% of samples), speedup
# std of sample mean = sqrt(NR/(NR-1)) * (std population) / sqrt(NR)
cat tmp000.txt | awk '{sum1 += $1 ; sumq1 += $1**2 ;sum2 += $2 ; sumq2 += $2**2 ;sum3 += $3 ; sumq3 += $3**2 } END {printf "\nbase = %10d +/- %d\ntest = %10d +/- %d\ndiff = %10d +/- %d\nspeedup = %.6f\n\n", sum1/NR , 1.96 * sqrt(sumq1/NR - (sum1/NR)**2)/sqrt(NR-1) , sum2/NR , 1.96 * sqrt(sumq2/NR - (sum2/NR)**2)/sqrt(NR-1) , sum3/NR  , 1.96 * sqrt(sumq3/NR - (sum3/NR)**2)/sqrt(NR-1) , (sum2 - sum1)/sum1 }'

# remove temporary files
rm -f base000.txt test000.txt tmp000.txt base001.txt test001.txt

@adentong
Copy link

Seeing how @noobpwnftw closed his PR, I guess a practical question is, if SF makes it to the superfinals, do we 1) downgrade libwinpthread 2) use a different build of SF (e.g. abrok) 3) change the custom implementation of mutex/conditional variable in SF or 4) something else?

@noobpwnftw
Copy link
Contributor

noobpwnftw commented Sep 17, 2019

If we are keeping MINGW compiles, then libwinpthread must be downgraded to be 100% sure it doesn't deadlock elsewhere(while we can fix our use case or not use CV at all(i.e. using atomic instead), we cannot fix their STL or not to use STL at all).

@ppigazzini
Copy link
Contributor

ppigazzini commented Sep 17, 2019

After db00e16 the speedup of msys2 build (pgo & lto) vs Abrok one (pgo & lto) is only 0.26%

$ bash bench-parallel.sh ./stockfish_19091615_x64_bmi2.exe ./stockfish_msys2.exe 100

base =    1793776 +/- 9052
test =    1798456 +/- 9169
diff =       4679 +/- 3190
speedup = 0.002609

@snicolet
Copy link
Member

snicolet commented Sep 17, 2019

@ppigazzini Interesting script for the parallel execution, I do almost the same locally to test speed but I like to

a) show the md5 signature of the two binaries (to avoid looking for speed difference when the binaries are the same :-))
b) do less iterations and use bench at depth 22 instead of 12 (to reduce the impact of the launching time and hash initialization time)

# show the md5 signatures of the two tested binaries
md5 $testdir/testedpatch
md5 $testdir/master

# two long bench runs (depth 22), in parallel
$testdir/testedpatch  bench 16 1 22 > /dev/null && echo "testedpatch"  &
$testdir/master       bench 16 1 22 > /dev/null && echo "master"

@ppigazzini
Copy link
Contributor

@snicolet not a big difference in precision

  • using bench
$ bash bench-parallel.sh ./stockfish_msys2_ss3.exe ./stockfish_msys2_ss4.exe 10
run     base    test    diff
  1  1620088  1747310  +127222
  2  1771216  1679313  -91903
  3  1740901  1762447  +21546
  4  1745168  1755928  +10760
  5  1760994  1768283  +7289
  6  1769748  1773421  +3673
  7  1760269  1759544  -725
  8  1762447  1765360  +2913
  9  1754485  1750173  -4312
 10  1751608  1753765  +2157

base =    1743692 +/- 27586
test =    1751554 +/- 16520
diff =       7862 +/- 32465
speedup = 0.004509
  • using bench 16 1 22
$ bash bench-parallel.sh ./stockfish_msys2_ss3.exe ./stockfish_msys2_ss4.exe 10
run     base    test    diff
  1  1663089  1655786  -7303
  2  1662813  1639512  -23301
  3  1663466  1658005  -5461
  4  1663692  1672258  +8566
  5  1731483  1740323  +8840
  6  1785393  1784149  -1244
  7  1779448  1778672  -776
  8  1750255  1748615  -1640
  9  1778701  1773629  -5072
 10  1728167  1764137  +35970

base =    1720650 +/- 32824
test =    1721508 +/- 35972
diff =        857 +/- 9455
speedup = 0.000499

@snicolet
Copy link
Member

I have written some code to try to get a reduction of the hang: #2309

@snicolet
Copy link
Member

snicolet commented Sep 24, 2019

in the forum thread about the preparation for the super-final binary, Pasquale made the remark that the Abrok versions are build using MinGW too:

Le mardi 24 septembre 2019 02:24:32 UTC+2, pasquale...@gmail.com a écrit :
Past Abrok builds were slow because the Ubuntu 16.04 MinGW was not able to do a Profile Guided Optimization. Now Ubuntu 18.04 MinGW is able to do a PGO. The compiler is always MinGW, built by msys2, by mingw-w64, by ubuntu.

Now I am confused, is there a risk that the Abrok builds use the buggy condition variable implementation too?

https://groups.google.com/forum/?fromgroups=#!topic/fishcooking/xc3DM_xzxYA

@vondele
Copy link
Member

vondele commented Sep 24, 2019

I think so, depends on what libraries are being used... that's why it needs testing.

@snicolet
Copy link
Member

snicolet commented Sep 24, 2019

@ppigazzini @CoffeeOne
Is it my understanding that you have managed to fix your libraries for your compiler, and that you are now able to build a binary for Stockfish that no longer crash when you compile the latest versions of master with the latest patches, matching the speed of Abrok builds?

@Krgp
Did you update the pthread DLL on your machine?

@xoto10
Copy link
Contributor Author

xoto10 commented Sep 24, 2019 via email

@snicolet
Copy link
Member

On the top of the Abrok page it says: "They are compiled with gcc/mingw 7.3 on Ubuntu 18.04."

But how can we sure? This is the problem, if the Abrok people decided to update their compiler but didn't change the page...

Is there a way to get a binary and tell which compiler produced it?

@ppigazzini
Copy link
Contributor

@snicolet different versions of MinGW, only the msys2 one uses the bugged libwinpthread

gcc version 9.2.0 (Rev2, Built by MSYS2 project)

gcc version 8.1.0 (x86_64-posix-seh-rev0, Built by MinGW-W64 project)

gcc version 7.3-posix 20180312 (GCC) Ubuntu 18.04

Nevertheless @CoffeeOne tested that the proposed bugfix is working fine
msys2/MINGW-packages#5610 (comment)

@ppigazzini
Copy link
Contributor

@snicolet Ubuntu 19.04 uses this:
gcc version 8.3-posix 20190406 (GCC)

But PGO build works only w/ Ubuntu 18.04, so if Abrok will upgrade to a newer Ubuntu version, SF will be terribly slow :)

x86_64-w64-mingw32-c++-posix -Wall -Wcast-qual -fno-exceptions -std=c++11 -fprofile-generate -Wextra -Wshadow -DNDEBUG -O3 -DIS_64BIT -msse -msse3 -mpopcnt -DUSE_POPCNT -flto   -c -o syzygy/tbprobe.o syzygy/tbprobe.cpp
x86_64-w64-mingw32-c++-posix: fatal error: Killed signal terminated program cc1plus
compilation terminated.
make[2]: *** [<builtin>: misc.o] Error 1
make[2]: *** Waiting for unfinished jobs....

On the top of the Abrok page it says: "They are compiled with gcc/mingw 7.3 on Ubuntu 18.04."

But how can we sure? This is the problem, if the Abrok people decided to update their compiler but didn't change the page...

@ppigazzini
Copy link
Contributor

@snicolet please freeze in proper time the commit that you want to use in the SuFi.

@snicolet
Copy link
Member

See pull request #2327 for a tentative to show at startup time which compiler was used to compile Stockfish.

@snicolet
Copy link
Member

Closing this issue now that the reasons for the hang are well understood (buggy external pthread library for GCC 9.1 and 9.2 compiler suite on MinGW64). What remains to be done is documenting the reasons properly in our Wiki pages.

Thanks to everybody here for all the investigations and testing during the last two weeks!

snicolet pushed a commit that referenced this issue Sep 26, 2019
As part of the investigation of the hang caused by an incorrect implementation
of condition_variable in libwinpthread, it was realized that our custom Mutex
implementation is no longer needed. Prior to lazySMP this custom implementation
resulted in a 30% speedup, but now no speed difference can be measured as no
mutex is used on the hot path in lazySMP.

#2291
#2309 (comment)  #2309 (comment)

The interest of this patch is that it removes platform-specific code, which is
always less tested.

No functional change.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests