On Wed, 20 Mar 2013 12:42:48 +0100, Sergei Golubchik <serg@askmonty.org> wrote:
Hi, Gordan!
On Mar 20, Gordan Bobic wrote:
I have a situation with MariaDB 10.0.0 where an INSERT INTO ... SELECT query that takes 3 seconds to run ends up stuck in the closing tables state for 15+ minutes while burning 100% of CPU.
I have seen bug reports dating back 5 years that sound very similar but none of them are listed as resolved.
Is there a way to debug/troubleshoot this further? The problem is quite intermittent. My data is in a state of constant flux so finding an exact reproducible test case based on data lone isn't likely to be viable. Is there a reasonable way to capture more detailed debug information than what is available from "show full processlist"?
Next time you see that, you could try a poor man's profiler of Domas: http://poormansprofiler.org/
Simply, collect all the stack traces with
gdb -ex "set pagination 0" -ex "thread apply all bt" \ --batch -p $(pidof mysqld) > stack.traces
You can also repeat that few times, like, every five minutes.
Thanks for the tip. Stack trace attached in a text file. Does this provide enough information for a worthwhile bug report? Gordan