Bug 248091 - Read lock unable to be removed on mysql-server-5.0.18-4.el4s1.1
Read lock unable to be removed on mysql-server-5.0.18-4.el4s1.1
Status: CLOSED INSUFFICIENT_DATA
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: mysql (Show other bugs)
4.5
x86_64 Linux
low Severity urgent
: ---
: ---
Assigned To: Tom Lane
http://bugs.mysql.com/bug.php?id=17741
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-07-13 02:13 EDT by Anchor Systems Managed Hosting
Modified: 2013-07-02 23:14 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-04-28 17:58:50 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Anchor Systems Managed Hosting 2007-07-13 02:13:14 EDT
Description of problem:

Occasionally we are seeing a problem with a read lock that cannot be removed.
The server is a replication slave and so the read lock that is applied to all
tables is blocking the sql slave thread and hence replication fails. The read
lock is put in place by a database backup script that runs every ten minutes and
then removes the lock.

Version-Release number of selected component (if applicable):

5.0.18-4.el4s1.1 from the Red Hat Web Application Stack Beta 1.0 Channel

How reproducible:

It does not occur frequently. Every few days we may see the problem, and
'mysqladmin debug' does not offer any good diagnostics to show what is holding
open the lock.

Steps to Reproduce:
1. The script that takes the backup runs every ten minutes
2. In one thread it issues 'FLUSH TABLES WITH READ LOCK', then it starts a
mysqlbackup of all databases with no locks. Finally, 'UNLOCK TABLES' is issued
in the first thread.
3. 'show processlist' shows that the slave sql thread is waiting on a read lock
to make an insert or update from the replication data. However there are no
other threads running which have the outstanding lock.
4. 'show slave status' shows the seconds from master steadily increasing.
5. Issuing 'unlock tables' in a mysql interactive session does not appear to
remove the lock as the slave sql thread still mentions it is waiting on a read lock.
6. Issuing 'stop slave' hangs, and isn't able to stop the slave.
7. Mysql must be restarted to get rid of the lock.
  
Actual results:
A phantom read lock prevents the slave sql thread from updating the database.

Expected results:
The read lock should be removed as soon as 'unlock tables' is issued by the client.

Additional info:
There doesn't appear to be any way to diagnose the state of locks on the MySQL
server, which could be used to determine the origin of this problem.
Comment 1 Anchor Systems Managed Hosting 2007-07-13 02:50:53 EDT
May be related to this bug:

http://bugs.mysql.com/bug.php?id=17741
Comment 2 Tom Lane 2007-07-13 11:09:24 EDT
The currently shipping Application Stack release of mysql is 5.0.30.  Please update and see whether the 
problem still exists.
Comment 3 Anchor Systems Managed Hosting 2007-07-15 21:47:11 EDT
The Red Hat Web Application Stack 1.0 Beta (for ES v. 4 AMD64/EM64T) channel
(https://rhn.redhat.com/network/software/channels/details.pxt?cid=5271) shows
that  mysql-server-5.0.18-4.el4s1.1.x86_64 is the latest available package.
Comment 4 Tom Lane 2007-07-15 22:53:53 EDT
I do not know why you are subscribed to a beta channel for a product that was released many months ago, 
but I cannot provide support for an ancient beta version.  Please update to the current release and let me 
know whether it still shows the bug.
Comment 5 Tom Lane 2008-04-28 17:58:50 EDT
Closing for lack of response.

Note You need to log in before you can comment on or make changes to this bug.