MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Ingo Strüwing Date:June 17 2009 5:27pm
Subject:Re: bzr commit into mysql-pe branch (Sergey.Glukhov:3367) Bug#43357
View as plain text  
Hi Sergey,

Sergey Glukhov, 17.06.2009 09:41:

...
>  3367 Sergey Glukhov	2009-06-17
>       Bug#43357 Server crash when selecting from INFORMATION_SCHEMA
>       The crash happens due to thd->mysys_var which is cleaned up in
>       'delete thd'. 'delete thd' should be called under LOCK_thread_count
>       lock but it does not happen for backup thread.


I'm stuck with the review as I don't understand the problem.

I understand that a thread, which places itself into the 'threads' list
(threads.append(thd)) must do this under LOCK_thread_count and must also
delete thd under LOCK_thread_count only. Otherwise iterators over the
list may be confused. BTW, I don't understand, how THDs are taken off
the 'threads' list. I find only uses of the append() and empty()
methods. In one case there's a get() method used, but this is a special
case.

But I do not understand, what thd->mysys_var has to do with the problem.
In ~THD() as well as in sql_show.cc accesses to mysys_var are protected
by thd->LOCK_delete. before each use of mysys_var in sql_show.cc it is
tested for NULL. So I don't see, how this could lead to a crash.

>       The fix is:
>       -move 'delete thd' under LOCK_thread_count lock.
>       -removed unnecessary net_end() call as it is
>        performed in 'delete thd'
>       
>       Note: backup_bml.result is not updated as it reqires FALCON engine


I understand the problem. But how did you test that your change fixed
the problem?

I think it should be possible to make a new test with DEBUG_SYNC to
force the server into the crash if the fix is not applied, and show that
it does no longer crash when the fix is applied.

...

Regards
Ingo
-- 
Ingo Strüwing, Database Group
Sun Microsystems GmbH, Sonnenallee 1, D-85551 Kirchheim-Heimstetten
Geschäftsführer: Thomas Schröder,   Wolfgang Engels,   Wolf Frenkel
Vorsitzender des Aufsichtsrates: Martin Häring   HRB München 161028
Thread
bzr commit into mysql-pe branch (Sergey.Glukhov:3367) Bug#43357Sergey Glukhov17 Jun
  • Re: bzr commit into mysql-pe branch (Sergey.Glukhov:3367) Bug#43357Ingo Strüwing17 Jun