ChessUSA.com TalkChess.com
Hosted by Your Move Chess & Games
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

potential deadlock in syzygy reference implementation
Post new topic    TalkChess.com Forum Index -> Computer Chess Club: Programming and Technical Discussions Flat
View previous topic :: View next topic  
Author Message
Richard Vida



Joined: 16 Apr 2009
Posts: 481
Location: Slovakia, EU

PostPost subject: potential deadlock in syzygy reference implementation    Posted: Sat Nov 23, 2013 2:43 pm Reply to topic Reply with quote

https://github.com/syzygy1/Stockfish/blob/master/src/tbprobe.cpp#L136

in function probe_wdl_table(), there is a return statement at line 136 which exits the function without releasing the mutex first:
Code:

 if (!ptr->ready) {
    LOCK(TB_mutex);
    if (!ptr->ready) {
      char str[16];
      prt_str(pos, str, ptr->key != key);
      if (!init_table_wdl(ptr, str)) {
        ptr->data = NULL;
        ptr2[i].key = 0ULL;
        *success = 0;
        return 0;         // <- deadlock here
      }
      ptr->ready = 1;
    }
    UNLOCK(TB_mutex);
  }
Back to top
View user's profile Send private message
Display posts from previous:   
Subject Author Date/Time
potential deadlock in syzygy reference implementation Richard Vida Sat Nov 23, 2013 2:43 pm
      Re: potential deadlock in syzygy reference implementation Ronald de Man Sat Nov 23, 2013 3:14 pm
            Re: potential deadlock in syzygy reference implementation Gregor Cramer Sun Nov 24, 2013 6:34 am
                  Re: potential deadlock in syzygy reference implementation Ronald de Man Sun Nov 24, 2013 12:24 pm
                        Re: potential deadlock in syzygy reference implementation Gregor Cramer Sun Nov 24, 2013 6:37 pm
                              Re: potential deadlock in syzygy reference implementation Ronald de Man Sun Nov 24, 2013 8:53 pm
                                    Re: potential deadlock in syzygy reference implementation Gregor Cramer Sun Nov 24, 2013 9:13 pm
            Re: potential deadlock in syzygy reference implementation Gregor Cramer Fri Nov 29, 2013 12:24 pm
                  Re: potential deadlock in syzygy reference implementation Ronald de Man Fri Nov 29, 2013 8:09 pm
      Re: potential deadlock in syzygy reference implementation seyyed mostafa khatami Wed Dec 04, 2013 2:10 pm
Post new topic    TalkChess.com Forum Index -> Computer Chess Club: Programming and Technical Discussions

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Powered by phpBB © 2001, 2005 phpBB Group
Enhanced with Moby Threads