Hi!

On FreeBSD there was a problem that ALTER TABLE and any operation
involving more than about 150 rows hung, with CPU running at 100 %.

I found now the reason. FreeBSD does not seem to reschedule
threads even after the time quota of some 10 msec, if a thread is
spinning and constantly executing pthread_mutex_trylock on a
reserved pthread mutex.

In long operations in Innobase these pthread mutex collisions occurred,
and the spinning started.

The fix is the following. Edit mysql/innobase/sync/sync0sync.c and
add line

i++;

on line 369 in the file. I.e., just before the line
'if (i < SYNC_SPIN_ROUNDS) {'. Then recompile.

The fix will naturally be also in upcoming 3.23.37.

Regards,

Heikki

At 12:34 PM 4/4/01 +0200, you wrote:
>Great! Hope you will be able to reproduce the bug without too much
>trobles (you know, these bugs are hard to trigger.. unless you are
>in production :-))
>
>Good luck,
>Rick
>
>> Rick,
>> 
>> it is the same bug as in ALTER TABLE I think. I got our FreeBSD machine
>> running yesterday, and today I will have time to study what happens
>> inside the server. It has something to do with spin waits of mutexes.
>> A fix may be available even tonight.
>> 
>> Regards,
>> 
>> Heikki
>> 
>> At 10:24 AM 4/4/01 +0200, you wrote:
>> >Heikki,
>> >
>> >I am being bitten by the other Innobase bug you mentioned (the one
>> >that you describe as "all operations with > about 150 rows hang")
>> >and would like to ask you if you know when a fix for this problem
>> >will be available (or, at least, a work-around). I am otherwise satisfied 
>> >by the (impressive, I must say) performances of my Innobase tables... but
>> >my production machine hangs every night during maintenance because of
>> >the bug... 
>> >
>> >Thanks,
>> >
>> >Rick
>> >
>> >
>> >> Rick,
>> >> 
>> >> thank you for your praise!
>> >> 
>> >> Your bug is not known. I just tried ALTER TABLE to some small tables
>> >> with several keys, but the altering went well both MyISAM->Innobase
>> >> and Innobase->MyISAM.
>> >> 
>> >> Could you describe in detail the definition and size of your
>> >> tables?
>> >> 
>> >> If the tables are big, inserts into secondary indexes can be
>> >> rather random, generating a lot of disk i/o. Can you convert
>> >> small tables without problems? Can you increase the Innobase buffer pool
>> >> size? The default is 16 MB which is rather small for today's
>> >> computers.
>> >> 
>> >> What operating system you are using?
>> >> 
>> >> I will try ALTERing some bigger tables and look what happens.
>> >> 
>> >> Regards,
>> >> 
>> >> Heikki
>> >> 
>> >> 
>> >> At 03:04 PM 3/28/01 +0200, you wrote:
>> >> >Hi there!
>> >> >First let me congratulate for your great MySQL addition: transactions and
>> >> >row level locking that actually work!!
>> >> >I have, however, a question that seem to be unanswered by your web
>> >> >site and/or manual pages.
>> >> >I am trying to convert a table from MyISAM to Innobase using ALTER
TABLE but
>> >> >if the table contains secondary keys or even multicolumn primary keys
>> >> >the ALTER TABLE statement hangs mysqld in what seem an endless loop
>> >> >that uses 100% CPU and requires abrutal mysqld kill to recover.
>> >> >Is this a known bug or what? Any workaround you can suggest  is greatly
>> >> >appreciated!!
>> >> >
>> >> >Thanks in advance
>> >> >
>> >> >Rick
>> >> >Ital
>> >> >-- 
>> >> >Riccardo  Pizzi,  Network Engineer @ adhoc.net
>> >> >AD HOC Network High Quality ISP, Rimini, ITALY
>> >> >Phone: +39-0541-382488    Fax: +39-0541-306910
>> >> >
>> >> 
>> >
>> >
>> >-- 
>> >Riccardo  Pizzi,  Network Engineer @ adhoc.net
>> >AD HOC Network High Quality ISP, Rimini, ITALY
>> >Phone: +39-0541-382488    Fax: +39-0541-306910
>> >
>> 
>
>
>-- 
>Riccardo  Pizzi,  Network Engineer @ adhoc.net
>AD HOC Network High Quality ISP, Rimini, ITALY
>Phone: +39-0541-382488    Fax: +39-0541-306910
>


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