[Maria-discuss] Crash when adding a column to a very large table

2016-07-27 Thread Mark Wadham

Hi,

MariaDB 10.1.16 with a 3-node galera cluster.

We had 187GB free disk space and had the gcache set to 800GB.  We 
started firing write traffic at the cluster and then began testing the 
process of performing DDL on a single node in RSU mode.  Our command was 
a single ALTER TABLE statement that added a column to a ~160GB table.


While this was occurring we were firing around 20GB/hour of write 
traffic at the cluster which was being collected in the gcache for 
catchup after the node completed the DDL.


At around 3h 45min into the DDL process the node performing it crashed 
with an error indicating it was unable to write to a temporary ibdata 
file.  There was still plenty of disk space available.


Full crash log is below, if anyone can shed light on this we'd be very 
grateful.


My own research so far suggests that the problem is because the ALTER 
TABLE statement inserts all of the rows into the newly rebuilt table at 
once, effectively requiring a rollback to be created for every row in 
the table and this is just too much for *some limit* that I haven't 
worked out yet.  I saw a suggestion[1] to increase the number of ibdata 
files but this doesn't really make sense to me given that we have two 
and the second one is set to autoextend.


It's a very slow debug process so I'd like to get a reasonable idea of 
what happened here before starting another test run.


Thanks,
Mark

[1] 
http://dba.stackexchange.com/questions/68319/mysql-index-creation-failing-on-table-is-full




2016-07-27  8:45:59 140258863733504 [Note] InnoDB: Online DDL : Start
2016-07-27  8:45:59 140258863733504 [Note] InnoDB: Online DDL : Start 
reading clustered index of the table and create temporary files
2016-07-27  9:42:23 140258863733504 [Note] InnoDB: Online DDL : End of 
reading clustered index of the table and create temporary files
2016-07-27  9:42:23 140258863733504 [Note] InnoDB: Online DDL : Start 
merge-sorting index `PRIMARY` (1 / 4), estimated cost : 14.7886
2016-07-27  9:42:23 140258863733504 [Note] InnoDB: Online DDL : 
merge-sorting has estimated 72714 runs
2016-07-27 11:47:05 140258863733504 [Note] InnoDB: Online DDL : End of  
merge-sorting index `PRIMARY` (1 / 4)
2016-07-27 11:47:05 140258863733504 [Note] InnoDB: Online DDL : Start 
building index `PRIMARY` (1 / 4), estimated cost : 22.1242
2016-07-27 12:26:52 7f908fbfdb00 InnoDB: Error: Write to file 
./db/#sql-ib16588-3044794026.ibd failed at offset 54409560064.
InnoDB: 1048576 bytes should have been written, only 991232 were 
written.
InnoDB: Operating system error n2016-07-27 12:26:52 140258863733504 
[Note] InnoDB: Online DDL : Completed
2016-07-27 12:26:53 7f908fbfdb00  InnoDB: Assertion failure in thread 
140258863733504 in file handler0alter.cc line 137

InnoDB: We intentionally generate a memory trap.
InnoDB: Submit a detailed bug report to http://bugs.mysql.com.
InnoDB: If you get repeated assertion failures or crashes, even
InnoDB: immediately after the mysqld startup, there may be
InnoDB: corruption in the InnoDB tablespace. Please refer to
InnoDB: 
http://dev.mysql.com/doc/refman/5.6/en/forcing-innodb-recovery.html

InnoDB: about forcing recovery.
160727 12:26:53 [ERROR] mysqld got signal 6 ;
This could be because you hit a bug. It is also possible that this 
binary
or one of the libraries it was linked against is corrupt, improperly 
built,
or misconfigured. This error can also be caused by malfunctioning 
hardware.


To report this bug, see https://mariadb.com/kb/en/reporting-bugs

We will try our best to scrape up some info that will hopefully help
diagnose the problem, but since we have already crashed,
something is definitely wrong and this may fail.

Server version: 10.1.16-MariaDB
key_buffer_size=33554432
read_buffer_size=16777216
max_used_connections=4
max_threads=770
thread_count=11
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 
37895560 K  bytes of memory

Hope that's ok; if not, decrease some variables in the equation.

Thread pointer: 0x0x7ebbabfb9008
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
stack_bottom = 0x7f908fbfd180 thread_stack 0x48400
(my_addr_resolve failure: fork)
/usr/sbin/mysqld(my_print_stacktrace+0x2b) [0x555e557caaab]
/usr/sbin/mysqld(handle_fatal_signal+0x475) [0x555e55327ef5]
/lib64/libpthread.so.0(+0xf100) [0x7f90982ce100]
/lib64/libc.so.6(gsignal+0x37) [0x7f909663b5f7]
/lib64/libc.so.6(abort+0x148) [0x7f909663cce8]
/usr/sbin/mysqld(+0x734ff9) [0x555e55491ff9]
/usr/sbin/mysqld(+0x736eec) [0x555e55493eec]
/usr/sbin/mysqld(+0x3a4c24) [0x555e55101c24]
/usr/sbin/mysqld(mysql_alter_table(THD*, char*, char*, HA_CREATE_INFO*, 
TABLE_LIST*, Alter_info*, unsigned int, st_order*, bool)+0x27f9) 
[0x555e5523dff9]
/usr/sbin/mysqld(Sql_cmd_alter_table::execute(THD*)+0x5d7) 
[0x555e5527f8b7]


Re: [Maria-discuss] MariaDB Knowledge base - 500 error

2016-07-27 Thread Sergei Golubchik
Hi, Karthick!

On Jul 27, Karthick Subramanian wrote:
> Did anyone facing this 500 error while accessing the Maria DB Knowledge
> Base. Thank you.

I've just tried it - seems to work for me. And yesterday it worked too.
Did you get this error for any KB page or for some specific url?

> Don't know to whom we need to report this, so sending to this mail ID.
> Sorry if it cause any inconvenient for others.

yeah, silly enough, the contact information is in the kb:
https://mariadb.com/kb/en/meta/contact/
"
  If you have a question or comment about this site, please join the
  #maria channel on freenode or email us, kb-admins [AT] mariadb (dot)
  org.
"
> When we click the Support in MariaDb website, getting below error:
> 
> Database Error:
> 
> *There seems to be a problem connecting to the database server
> specified in your configuration file. Please contact your local system
> administrator for further assistance. *

Okay, support portal is not part of the KB. But anyway, I've tried
clicking Suport and it worked for me too.

Regards,
Sergei
Chief Architect MariaDB
and secur...@mariadb.org

___
Mailing list: https://launchpad.net/~maria-discuss
Post to : maria-discuss@lists.launchpad.net
Unsubscribe : https://launchpad.net/~maria-discuss
More help   : https://help.launchpad.net/ListHelp


Re: [Maria-discuss] Finicky syntax with RETURNING?

2016-07-27 Thread Sergei Golubchik
Hi, Rhys.Campbell!

On Jul 27, rhys.campb...@swisscom.com wrote:
> Hi Sergei,
> 
> Thanks for your response. Shouldn't this work?
> 
> EXPLAIN DELETE uc FROM t1 AS uc
> WHERE uc.id IN (SELECT p.id FROM t2 AS p WHERE p.account_id = )
> RETURNING uc.some_id;
> 
> Or does that count in the definition of a multi-table delete? (I thought 
> not). 

It does. See the manual: https://mariadb.com/kb/en/mariadb/delete/

Single table delete: DELETE FROM ...
Multi-table detele: DELETE tables FROM

Regards,
Sergei
Chief Architect MariaDB
and secur...@mariadb.org

___
Mailing list: https://launchpad.net/~maria-discuss
Post to : maria-discuss@lists.launchpad.net
Unsubscribe : https://launchpad.net/~maria-discuss
More help   : https://help.launchpad.net/ListHelp


[Maria-discuss] MariaDB Knowledge base - 500 error

2016-07-27 Thread Karthick Subramanian
Did anyone facing this 500 error while accessing the Maria DB Knowledge
Base. Thank you.

Don't know to whom we need to report this, so sending to this mail ID.
Sorry if it cause any inconvenient for others.

When we click the Support in MariaDb website, getting below error:

Database Error:


*There seems to be a problem connecting to the database server specified in
your configuration file. Please contact your local system administrator for
further assistance. *
___
Mailing list: https://launchpad.net/~maria-discuss
Post to : maria-discuss@lists.launchpad.net
Unsubscribe : https://launchpad.net/~maria-discuss
More help   : https://help.launchpad.net/ListHelp