Re: InnoDB: Cannot allocate 18446744073709540680 bytes of memory after 60 retries over 60 seconds.

From: Axel Schwenke <axel.schwenke_at_gmx.de>
Date: Wed, 1 Feb 2017 13:07:54 +0100
Message-ID: <o6sivi$fth$1_at_dont-email.me>


Hi Dave,

On 01.02.2017 12:30, djburbridge_at_gmail.com wrote:

> I've now tried setting it to this value explicitly in my.ini (and I know it's being used, as it's reported in the startup:
> 2017-02-01T11:23:42.362563Z 0 [Note] InnoDB: Initializing buffer pool, total siz
> e = 128M, instances = 1, chunk size = 128M
>
> However, I get exactly the same error. Complete output of startup as follows:

(snip)

> 14078e262 mysqld.exe!my_sigabrt_handler()[my_thr_init.c:449]
> 140b38489 mysqld.exe!raise()[winsig.c:587]
> 140b37380 mysqld.exe!abort()[abort.c:82]
> 14089f178 mysqld.exe!ut_dbg_assertion_failed()[ut0dbg.cc:67]
> 14089f44f mysqld.exe!ib::fatal_or_error::~fatal_or_error()[ut0ut.cc:931]
> 1407d190f mysqld.exe!ut_allocator<unsigned char>::allocate()[ut0new.h:369]
> 1408b8aed mysqld.exe!mem_heap_create_block_func()[mem0mem.cc:302]
> 1408b88c9 mysqld.exe!mem_heap_add_block()[mem0mem.cc:408]
> 1408b8bd6 mysqld.exe!mem_heap_dup()[mem0mem.cc:59]
> 140a0543c mysqld.exe!trx_undo_get_undo_rec_low()[trx0rec.cc:2124]
> 140a06b8c mysqld.exe!trx_undo_prev_version_build()[trx0rec.cc:2259]
> 1409e1458 mysqld.exe!row_vers_vc_matches_cluster()[row0vers.cc:704]
> 1409e0d48 mysqld.exe!row_vers_old_has_index_entry()[row0vers.cc:950]
> 1409f5b6d mysqld.exe!row_purge_poss_sec()[row0purge.cc:264]
> 140910ac1 mysqld.exe!btr_cur_search_to_nth_level()[btr0cur.cc:1152]
> 1409be87b mysqld.exe!btr_pcur_open_low()[btr0pcur.ic:470]
> 1409c09bf mysqld.exe!row_search_index_entry()[row0row.cc:1076]
> 1409f6238 mysqld.exe!row_purge_remove_sec_if_poss_leaf()[row0purge.cc:471]
> 1409f5fdd mysqld.exe!row_purge_remove_sec_if_poss()[row0purge.cc:587]
> 1409f6c57 mysqld.exe!row_purge_upd_exist_or_extern_func()[row0purge.cc:710]
> 1409f5c34 mysqld.exe!row_purge_record_func()[row0purge.cc:988]
> 1409f53b2 mysqld.exe!row_purge()[row0purge.cc:1034]
> 1409f6a42 mysqld.exe!row_purge_step()[row0purge.cc:1112]
> 1409c2d6f mysqld.exe!que_thr_step()[que0que.cc:1056]
> 1409c24cd mysqld.exe!que_run_threads_low()[que0que.cc:1121]
> 1409c22c2 mysqld.exe!que_run_threads()[que0que.cc:1160]
> 14080cc6f mysqld.exe!srv_task_execute()[srv0srv.cc:2461]
> 14080df1e mysqld.exe!srv_worker_thread()[srv0srv.cc:2508]

That looks serious. Indeed InnoDB starts normally, so this allocation is nothing related to startup or configuration. In fact this crash happens in the purge thread (a background thread that purges deleted rows). That can be either a bug in MySQL or (more likely) data corruption.

I checked bugs.mysql.com, but found no report of similar problems. Hence I suppose data corruption. I however remember some bugs in that area when using partitioned InnoDB tables or BLOBs.

If you have no data in that database or if you have a good(!) backup, you can delete the MySQL datadir, start with a fresh one and restore your data. Note: if you are unsure if your backup is good, you may keep a copy of the whole(!) datadir.

Else I suggest you first try latest 5.7. If that still crashes, start MySQL with innodb_force_recovery=2. You can try even higher recovery levels, but you need at least 2 to prevent the purge thread to be started. Once MySQL starts up, use mysqldump to extract your data. Then startup with a fresh datadir and load your data from the dump.

HTH, XL Received on Wed Feb 01 2017 - 13:07:54 CET

Original text of this message