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

Add AUTHORS #5

Merged
merged 2 commits into from
Jun 23, 2014
Merged

Add AUTHORS #5

merged 2 commits into from
Jun 23, 2014

Conversation

glinscott
Copy link
Contributor

Just a nice way to track contributors

@lucasart
Copy link

it's a bit annoying that people keep changing their names on git. there are lots of duplicates, where the same person appears under different names in the list. is it possible to make git display the login instead ?

anyway, this is a good idea. i'm sure many people have felt that their contribution was not recognized.

@glinscott
Copy link
Contributor Author

I removed some duplicates, maybe in the future we just ask folks what name they would like to be included under?

@zamar
Copy link

zamar commented Jun 23, 2014

I have no objections to this. Feel free to merge.

glinscott added a commit that referenced this pull request Jun 23, 2014
@glinscott glinscott merged commit ab58010 into official-stockfish:master Jun 23, 2014
@glinscott glinscott deleted the authors branch June 23, 2014 16:14
niklasf pushed a commit to niklasf/Stockfish that referenced this pull request Jun 29, 2015
vondele referenced this pull request in vondele/Stockfish Jul 26, 2017
Fixes a race when ucinewgame is issued 'after' a search, as seen for a thread-sanitized binary issuing :

```
go depth 5
[wait for bestmove ..]
ucinewgame
```
leading to

```
WARNING: ThreadSanitizer: data race (pid=5148)
  Write of size 4 at 0x7fbf5dcf6af8 by main thread:
    #0 __gnu_cxx::__enable_if<!std::__is_scalar<Move>::__value, void>::__type std::__fill_a<Move*, Move>(Move*, Move*, Move const&) <null> (stockfish+0x000000462884)
    #1 void std::fill<Move*, Move>(Move*, Move*, Move const&) /usr/include/c++/5/bits/stl_algobase.h:747 (stockfish+0x0000004618cc)
    #2 StatBoards<16, 64, Move>::fill(Move const&) src/movepick.h:36 (stockfish+0x00000046084f)
    #3 Search::clear() src/search.cpp:194 (stockfish+0x000000451732)
    #4 newgame src/uci.cpp:145 (stockfish+0x0000004738a0)
    #5 UCI::loop(int, char**) src/uci.cpp:200 (stockfish+0x000000473d7d)
    #6 main src/main.cpp:47 (stockfish+0x000000433322)

  Previous write of size 4 at 0x7fbf5dcf6af8 by thread T1:
    #0 update_stats src/search.cpp:1417 (stockfish+0x000000453ecb)
    #1 search<(<unnamed>::NodeType)0u> src/search.cpp:1114 (stockfish+0x00000045c4c6)
    #2 search<(<unnamed>::NodeType)1u> src/search.cpp:997 (stockfish+0x000000457658)
    #3 search<(<unnamed>::NodeType)1u> src/search.cpp:1019 (stockfish+0x000000457a50)
    #4 search<(<unnamed>::NodeType)1u> src/search.cpp:1019 (stockfish+0x000000457a50)
    #5 Thread::search() src/search.cpp:402 (stockfish+0x000000452e28)
    #6 MainThread::search() src/search.cpp:264 (stockfish+0x000000451c32)
    #7 Thread::idle_loop() src/thread.cpp:114 (stockfish+0x000000468c90)

```

The solution adopted is to split the uci commands in those that can be issued during search (quit, stop, ponderhit, isready, uci) and those that should not run during search (ucinewgame, setoption, .. ).  Waiting for search to finish was previously done only for a 'go'.

This fixes the above race.

There are two side effects, one possibly negative, depending on how a gui deals with uci (or a user at the cli).
- crashes are avoided (e.g. resizing hash during search).
- as earlier commands can block on the search to be completed, 'stop' can be non-effective. This behavior is already present on master :

```
go depth 20
go depth 5
stop
```

will wait for depth 20 to be completed before stopping depth 5. This behavior now shows for other commands as well. As such some gui testing of this patch would be useful.

No functional change.
vondele referenced this pull request in vondele/Stockfish Jul 27, 2017
limits.ponder was used as a signal between uci and search threads, but is not an atomic variable,
leading to the following race as flagged by a sanitized binary.

Expect input:
```
 spawn  ./stockfish
 send "uci\n"
 expect "uciok"
 send "setoption name Ponder value true\n"
 send "go wtime 4000 btime 4000\n"
 expect "bestmove"
 send "position startpos e2e4 d7d5\n"
 send "go wtime 4000 btime 4000 ponder\n"
 sleep 0.01
 send "ponderhit\n"
 expect "bestmove"
 send "quit\n"
 expect eof
```

Race:
```
WARNING: ThreadSanitizer: data race (pid=7191)
  Read of size 4 at 0x0000005c2260 by thread T1:
    #0 MainThread::check_time() src/search.cpp:1488 (stockfish+0x000000454471)
    #1 search<(<unnamed>::NodeType)0u> src/search.cpp:566 (stockfish+0x0000004594e0)
    #2 search<(<unnamed>::NodeType)0u> src/search.cpp:997 (stockfish+0x00000045bfb6)
    #3 search<(<unnamed>::NodeType)0u> src/search.cpp:1006 (stockfish+0x00000045c1a3)
    #4 search<(<unnamed>::NodeType)1u> src/search.cpp:997 (stockfish+0x000000457658)
    #5 Thread::search() src/search.cpp:402 (stockfish+0x000000452e28)
    #6 MainThread::search() src/search.cpp:264 (stockfish+0x000000451c32)
    #7 Thread::idle_loop() src/thread.cpp:114 (stockfish+0x000000468c90)

  Previous write of size 4 at 0x0000005c2260 by main thread:
    #0 UCI::loop(int, char**) src/uci.cpp:193 (stockfish+0x000000473c9b)
    #1 main src/main.cpp:47 (stockfish+0x000000433322)

  Location is global 'Search::Limits' of size 88 at 0x0000005c2220 (stockfish+0x0000005c2260)
```

The fix is to add an atomic bool to the threads structure to signal the ponder status, letting Search::Limits to reflect just what was passed to 'go'.

No functional change.
vondele referenced this pull request in vondele/Stockfish Aug 2, 2017
limits.ponder was used as a signal between uci and search threads, but is not an atomic variable,
leading to the following race as flagged by a sanitized binary.

Expect input:
```
 spawn  ./stockfish
 send "uci\n"
 expect "uciok"
 send "setoption name Ponder value true\n"
 send "go wtime 4000 btime 4000\n"
 expect "bestmove"
 send "position startpos e2e4 d7d5\n"
 send "go wtime 4000 btime 4000 ponder\n"
 sleep 0.01
 send "ponderhit\n"
 expect "bestmove"
 send "quit\n"
 expect eof
```

Race:
```
WARNING: ThreadSanitizer: data race (pid=7191)
  Read of size 4 at 0x0000005c2260 by thread T1:
    #0 MainThread::check_time() src/search.cpp:1488 (stockfish+0x000000454471)
    #1 search<(<unnamed>::NodeType)0u> src/search.cpp:566 (stockfish+0x0000004594e0)
    #2 search<(<unnamed>::NodeType)0u> src/search.cpp:997 (stockfish+0x00000045bfb6)
    #3 search<(<unnamed>::NodeType)0u> src/search.cpp:1006 (stockfish+0x00000045c1a3)
    #4 search<(<unnamed>::NodeType)1u> src/search.cpp:997 (stockfish+0x000000457658)
    #5 Thread::search() src/search.cpp:402 (stockfish+0x000000452e28)
    #6 MainThread::search() src/search.cpp:264 (stockfish+0x000000451c32)
    #7 Thread::idle_loop() src/thread.cpp:114 (stockfish+0x000000468c90)

  Previous write of size 4 at 0x0000005c2260 by main thread:
    #0 UCI::loop(int, char**) src/uci.cpp:193 (stockfish+0x000000473c9b)
    #1 main src/main.cpp:47 (stockfish+0x000000433322)

  Location is global 'Search::Limits' of size 88 at 0x0000005c2220 (stockfish+0x0000005c2260)
```

The fix is to add an atomic bool to the threads structure to signal the ponder status, letting Search::Limits to reflect just what was passed to 'go'.

No functional change.
protonspring pushed a commit to protonspring/Stockfish that referenced this pull request May 28, 2019
Lolligerhans pushed a commit to Lolligerhans/Stockfish that referenced this pull request May 30, 2019
Lolligerhans pushed a commit to Lolligerhans/Stockfish that referenced this pull request Jun 1, 2019
Lolligerhans pushed a commit to Lolligerhans/Stockfish that referenced this pull request Jul 4, 2019
@gvreuls gvreuls mentioned this pull request Jun 3, 2021
pb00067 referenced this pull request in pb00068/Stockfish Oct 24, 2023
locutus2 pushed a commit to locutus2/Stockfish that referenced this pull request Dec 31, 2023
…rdCorrHist2

Revert "Guard correction history from overflowing staticEval in the future."
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

Successfully merging this pull request may close these issues.

3 participants