[MDEV-444] Crash in ALTER TABLE ADD PRIMARY KEY ..., ADD INDEX Created: 2012-08-10 Updated: 2012-09-05 Resolved: 2012-09-05 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | 5.5.25 |
| Fix Version/s: | 5.5.27 |
| Type: | Bug | Priority: | Major |
| Reporter: | Timour Katchaounov (Inactive) | Assignee: | Vladislav Vaintroub |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
OpenSuse 11.2 64-bit |
||
| Attachments: |
|
| Description |
|
When attempting to add indexes to a smaller version of table lineitem from DBT3, the ALTER TABLE crashes the server. How to reproduce:
create table t_ps_partkey as alter table t_ps_partkey add index i_ps_partkey(ps_partkey, ps_suppkey); create table lineitem_small as ALTER TABLE lineitem_small The last statement results in a crash: InnoDB: DEBUG: update_statistics for dbt3/lineitem_small. The stack trace is: #0 0x00007fa5b074ad95 in raise () from /lib64/libc.so.6 The crash is in the function: buf_page_set_sticky(), on the line: p buf_pool->LRU_list_mutex , |
| Comments |
| Comment by Timour Katchaounov (Inactive) [ 2012-08-10 ] |
|
p mutex_own(&buf_pool->LRU_list_mutex) |
| Comment by Timour Katchaounov (Inactive) [ 2012-08-10 ] |
|
In order to reproduce the crash, it is sufficient to run only this reduced statement: ALTER TABLE lineitem_small ADD PRIMARY KEY (l_orderkey, l_linenumber); |
| Comment by Elena Stepanova [ 2012-08-11 ] |
|
I haven't got the crash so far. Here is what I did in my latest (cleanest) attempt:
The last ALTER TABLE finished fairly fast (in ~30 seconds), no problems or errors in the log file. I was running it on perro, which is openSUSE 11.3 x86_64 8 Gb. A couple observations: First, despite what was discussed on IRC, it seems to depend on tmpdir after all. In previous dirty attempts I had been having a problem with disk space on alter table until I switched tmpdir from /tmp (which had about 2 Gb of free space) to the main storage which had about 17 Gb. Timour, you were going to check the tmpdir when you were reproducing the issue. Did you have enough space in there? |
| Comment by Timour Katchaounov (Inactive) [ 2012-08-13 ] |
|
I changed the temporary directory to my home dir, where there was ~25 GB free space. The server is a debug build, built with ./BUILD/compile-amd64-debug-max-no-ndb The server was started from the source tree with the following command line: ./sql/mysqld --no-defaults --skip-networking --datadir=/home/<user>/dbdata/dbt3s10-mdb-5.5-a --tmpdir=/home/<user>/tmp/db --socket=/home/<user>/dbdata/dbt3s10-mdb-5.5-a/mysql.sock --lc-messages-dir=/home/<user>/mprog/src/5.5/sql/share --character-sets-dir=/home/<user>/mprog/src/5.5/sql/share/charsets --lower-case-table-names=1 --key_buffer_size=64M --table_cache=256 --sort_buffer_size=64M --join_buffer_size=512M --read_buffer_size=16M --innodb_buffer_pool_size=1024M --innodb_additional_mem_pool_size=128M --innodb_log_buffer_size=64M --innodb_log_file_size=256M --innodb_file_per_table --innodb_data_file_path=ibdata1:128M:autoextend |
| Comment by Elena Stepanova [ 2012-08-15 ] |
|
Attached mdev-444.data – the load file for the provided test case. ~12 Mb uncompressed, contains 100K rows. |
| Comment by Elena Stepanova [ 2012-08-15 ] |
|
Reproducible on the current MariaDB 5.5 revno 3492 with XtraDB, percona-server revno 288.
--source include/have_innodb.inc SET GLOBAL innodb_file_per_table=ON; USE test; CREATE TABLE t1 ( LOAD DATA LOCAL INFILE 'mdev-444.data' INTO TABLE t1; --enable_reconnect ALTER TABLE t1 ADD PRIMARY KEY (l_orderkey, l_linenumber);
|
| Comment by Elena Stepanova [ 2012-08-17 ] |
|
Also filed for Percona Server as https://bugs.launchpad.net/percona-server/+bug/1038225 |
| Comment by Vladislav Vaintroub [ 2012-08-30 ] |
|
After conversation with Laurinas on IRC, found out that fix for the bug will be included into the next Percona Server, which should be released ASAP. It could make sense to wait and merge the new XtraDB before MariaDB release, since it has at least one more critical bugfix |
| Comment by Sergei Golubchik [ 2012-09-05 ] |
|
merged with XtraDB from Percona-Server-5.5.27-rel28.1 |