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);

Hmm.

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
-- 
Jeremy D. Zawodny     |  Perl, Web, MySQL, Linux Magazine, Yahoo!
<[EMAIL PROTECTED]>  |  http://jeremy.zawodny.com/

MySQL 4.0.8: up 1 days, processed 37,119,319 queries (338/sec. avg)

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to