MySQL Lists are EOL. Please join:

List:General Discussion« Previous MessageNext Message »
From:Jeremy Zawodny Date:January 29 2003 7:48am
Subject:Re: Weird locking/blocking issues
View as plain text  
On Tue, Jan 28, 2003 at 01:20:16PM -0500, Grigor, Peter wrote:
> Heya Folkth:
> I have built mysql (4.0.9) on freebsd (4.7-RELEASE) with linuxthreads
> (2.2.3) and still encounter the 'strange threading' behavior described in J.
> Zawodny's blog.
> Here's the situation...
> 1/ there are three threads which lock and then write to two different
> tables...

At the same time?  Each thread locks both tables and then writes?  Or
something else?  Can you post the exact SQL and sequence of events to
see if someone else can reproduce or explain it?

> the locks are gotten using 'low_priority write'; the writing threads
> are continually waiting for locks (i.e two are waiting, one is
> executing);


What if you don't use low-priority write?  Does it work normally then?

> 2/ On a different thread I do a select count(*) from one of the tables;
> Sometimes the select returns pretty quick witht the count; however,
> frequently the selecting thread will simply hang waiting to get the lock--if
> I look at the thread in [top] the thread will be taking a LOT of cpu time;
> if I look at the offending thread in the processlist it has a cycling status
> of
> 'waiting for tables', 'NULL', 'Locked', 'System Lock' and 'Reopen Tables'.

Any chance you can truss the pid of the process that's sucking CPU
time?  We manged to find an old thread-related bug on FreeBSD/MySQL
that way a year or so back.

> Note that this behavior occurs whether I compile with Linuxthreads
> or not, also I tried skip-external-locking to see if the 'system
> lock' status disappears, but it doesn't.

Jeremy D. Zawodny     |  Perl, Web, MySQL, Linux Magazine, Yahoo!
<Jeremy@stripped>  |

MySQL 4.0.8: up 1 days, processed 37,119,319 queries (338/sec. avg)
Weird locking/blocking issuesPeter Grigor28 Jan
  • Re: Weird locking/blocking issuesJeremy Zawodny29 Jan
RE: Weird locking/blocking issuesPeter Grigor29 Jan