[MDEV-7362] ANALYZE TABLES crash with table-independent-statistics gathering Created: 2014-12-23 Updated: 2015-01-22 Resolved: 2015-01-22 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Optimizer |
| Affects Version/s: | 10.0.15 |
| Fix Version/s: | 10.0.16 |
| Type: | Bug | Priority: | Major |
| Reporter: | Daniel Black | Assignee: | Vicențiu Ciorbaru |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
wheezy x86_64 |
||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Description |
|
Was running mysqlanalyze --skip-write-binlog --all-databases Ran though a lot of tables without error.
Settings where:
After restart with:
This is repeatable on this table:
Running with use_stat_tables=NEVER didn't cause a crash. If you can repeat this without a copy of oq_dev_eventum.eventum_support_email_body that would be good. If you can't I'll see what I can do. |
| Comments |
| Comment by Elena Stepanova [ 2014-12-23 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Could you please attach your cnf file(s) – or maybe it is already attached to some other bug that you reported? | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Black [ 2014-12-24 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
use_stat_tables = COMPLEMENTARY histogram_size=255 was set at runtime however I could repeat it with the default histogram_size=0. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2014-12-24 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Thanks, I'll try to reproduce with your configs (had no luck with default settings). In your steps to reproduce, you do the following, all in the same session:
And you also said that with use_stat_tables=NEVER there is no crash. But the thing is, if you set the GLOBAL value of use_stat_tables, it does not (should not, at least) have any effect on the current connection. And from the 2nd ANALYZE, we see that it's so indeed – there is nothing about statistics collection; there would have been if statistics was already activated. Note: It seems that this description https://mariadb.com/kb/en/mariadb/documentation/optimization-and-tuning/query-optimizations/statistics-for-optimizing-queries/engine-independent-table-statistics/ is outdated or wrongly phrased; in fact, simple ANALYZE TABLE already collects statistics if use_stat_tables is anything but NEVER; and ANALYZE TABLE ... PERSISTENT collects statistics even if use_stat_tables is NEVER. Are you absolutely sure about the point regarding use_stat_tables=NEVER preventing the crash? | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Black [ 2014-12-24 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Sorry there was a new session created after the set global. I did the same mistake here but it does that the default use_stats_tables doesn't crash with ANALYZE TABLE and with it set in a session it does. The following was running on a trunk developed server running
gdb caught the process at this point which is the attached bt.txt Documentation edits are my fault. I'll test and revert. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Black [ 2014-12-26 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Server running from mysql-test directory;
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Black [ 2014-12-26 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
second seg fault after restarting the server
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2014-12-26 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Thanks a lot for the test case. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2014-12-26 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Here is a shorter test case on which I'm getting the same crash as in the initial description right now, but it seems it can be volatile – different stack traces on the same test case. Below I'll give more examples of stack traces that I'm getting with variations of the test case. I hope all of them, and
|