Bug #55415 wait_for_update_bin_log enters a condition but does not leave
Submitted: 20 Jul 2010 19:46 Modified: 4 Oct 2010 14:44
Reporter: Davi Arnaut (OCA) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Replication Severity:S3 (Non-critical)
Version:trunk OS:Any
Assigned to: Alfranio Junior CPU Architecture:Any
Tags: misuse

[20 Jul 2010 19:46] Davi Arnaut
Description:
In sql/log.c, member function wait_for_update_bin_log, a condition is entered with THD::enter_cond but is not exited. This might leave dangling references to the mutex/condition in the per-thread information area.

How to repeat:
See sql/log.c:

5283 int MYSQL_BIN_LOG::wait_for_update_bin_log(THD* thd,
5284                                            const struct timespec *timeout)
5285 {
5286   int ret= 0;
5287   const char* old_msg = thd->proc_info;
5288   DBUG_ENTER("wait_for_update_bin_log");
5289   old_msg= thd->enter_cond(&update_cond, &LOCK_log,
5290                            "Master has sent all binlog to slave; "
5291                            "waiting for binlog to be updated");
5292   if (!timeout)
5293     mysql_cond_wait(&update_cond, &LOCK_log);
5294   else
5295     ret= mysql_cond_timedwait(&update_cond, &LOCK_log,
5296                               const_cast<struct timespec *>(timeout));
5297   DBUG_RETURN(ret);
5298 }
[4 Aug 2010 22:29] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/115053

3162 Alfranio Correia	2010-08-04
      BUG#55415 wait_for_update_bin_log enters a condition but does not leave
      
      In sql/log.c, member function wait_for_update_bin_log, a condition is entered with
      THD::enter_cond but is not exited. This might leave dangling references to the
      mutex/condition in the per-thread information area.
      
      To fix the problem, we call exit_cond to properly remove references to the mutex,
      LOCK_log.
[3 Sep 2010 13:50] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/117523

3203 Alfranio Correia	2010-09-03 [merge]
      BUG#55415 wait_for_update_bin_log enters a condition but does not leave
            
      In sql/log.c, member function wait_for_update_bin_log, a condition is entered with
      THD::enter_cond but is not exited. This might leave dangling references to the
      mutex/condition in the per-thread information area.
            
      To fix the problem, we call exit_cond to properly remove references to the mutex,
      LOCK_log.
[6 Sep 2010 17:22] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/117632

3203 Alfranio Correia	2010-09-06 [merge]
      BUG#55415 wait_for_update_bin_log enters a condition but does not leave
            
      In sql/log.c, member function wait_for_update_bin_log, a condition is entered with
      THD::enter_cond but is not exited. This might leave dangling references to the
      mutex/condition in the per-thread information area.
            
      To fix the problem, we call exit_cond to properly remove references to the mutex,
      LOCK_log.
[17 Sep 2010 13:26] Alfranio Junior
pushed to mysql-5.5-bugfixing, mysql-trunk-bugfixing and mysql-next-mr-bugfixing
[2 Oct 2010 18:13] Bugs System
Pushed into mysql-trunk 5.6.1-m4 (revid:alexander.nozdrin@oracle.com-20101002180948-852x1cuv7c6i85ea) (version source revid:alexander.nozdrin@oracle.com-20101002180857-an32jpuwzemsp4f2) (merge vers: 5.6.1-m4) (pib:21)
[2 Oct 2010 18:16] Bugs System
Pushed into mysql-next-mr (revid:alexander.nozdrin@oracle.com-20101002181053-6iotvl26uurcoryp) (version source revid:alexander.nozdrin@oracle.com-20101002180917-h0n62akupm3z20nt) (pib:21)
[2 Oct 2010 18:17] Bugs System
Pushed into mysql-5.5 5.5.7-rc (revid:alexander.nozdrin@oracle.com-20101002180831-590ka2tuit9qoxbb) (version source revid:alexander.nozdrin@oracle.com-20101002180831-590ka2tuit9qoxbb) (merge vers: 5.5.7-rc) (pib:21)
[4 Oct 2010 14:44] Jon Stephens
Thank you for your bug report. This issue has been committed to our source repository of that product and will be incorporated into the next release.

If necessary, you can access the source repository and build the latest available version, including the bug fix. More information about accessing the source trees is available at

    http://dev.mysql.com/doc/en/installing-source.html
[4 Oct 2010 14:45] Jon Stephens
Doesn't appear to have direct user-facing changes -- closed without further action.