Re: InnoDB: Cannot allocate 18446744073709540680 bytes of memory after 60 retries over 60 seconds.
Date: Wed, 1 Feb 2017 03:30:45 -0800 (PST)
Message-ID: <b33ad509-dc69-4be6-8031-79acf8465be5_at_googlegroups.com>
Thanks Axel! Comments inline...
On Wednesday, February 1, 2017 at 10:56:54 AM UTC, Axel Schwenke wrote:
> On 01.02.2017 10:19, djb wrote:
> > Just tried starting my mysql server (on localhost) this morning, and got the error above.
> > Any idea what I should be looking for?
>
> InnoDB could not allocate memory. The biggest chunk that InnoDB allocates at
> startup is the buffer pool (innodb_buffer_pool_size in my.ini)
>
> > In the detail below, I note that InnoDB is trying to allocate something like 16.8TB of
> > memory - something that's highly likely to fail given that I've only got
> 4GB of RAM and
> > 3GB of free disk space. How is this value calculated?
>
> That number is bogus. It's 2^64 - 10936. Looks like -10936 was interpreted
> as an 64 bit unsigned number. This might be the problem itself. Or not.
>
> What MySQL version is this? Are you upgrading from an old one? Which? What
> is in your my.ini?
Sorry, had meant to state this:-) 5.7.16, 64-bit, so only 0.0.1 behind the current one. Running on Win7.
The only uncommented settings in my.ini are as follows:
sql_mode=
character-set-server=utf8
collation-server=utf8_unicode_ci
secure-file-priv=
innodb_force_recovery = 1
> Keep in mind that some MySQL packages might install a new my.ini. Also that
> new MySQL versions can have new defaults. I.e. the buffer pool size default
> was increased just recently.
>
> I suggest you set the innodb buffer pools size to some reasonable value in
> my.ini; i.e. 1GB. If you had set the size of the InnoDB redo log
> (innodb_log_file_size) before, you must retain this setting. Same goes for
> the size set in innodb_data_file_path
According to https://dev.mysql.com/doc/refman/5.6/en/innodb-parameters.html#sysvar_innodb_buffer_pool_size , the default on 64-bit is 134217728. [Quoted] 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:
mysqld: Could not create or access the registry key needed for the MySQL applica
tion
to log to the Windows EventLog. Run the application with sufficient
privileges once to create the key, add the key manually, or turn off
logging for that application.
2017-02-01T11:23:41.325459Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is
deprecated. Please use --explicit_defaults_for_timestamp server option (see doc
umentation for more details).
2017-02-01T11:23:41.344461Z 0 [Warning] 'NO_AUTO_CREATE_USER' sql mode was not s
et.
2017-02-01T11:23:41.344461Z 0 [Warning] Insecure configuration for --secure-file
-priv: Current value does not restrict location of generated files. Consider set
ting it to a valid, non-empty path.
2017-02-01T11:23:41.354462Z 0 [ERROR] Cannot open Windows EventLog; check privil
eges, or start server with --log_syslog=0
2017-02-01T11:23:41.372464Z 0 [Note] c:\temp\mysql\bin\mysqld (mysqld 5.7.16) st
arting as process 6352 ...
2017-02-01T11:23:41.735500Z 0 [Note] InnoDB: Mutexes and rw_locks use Windows in
terlocked functions
2017-02-01T11:23:41.736500Z 0 [Note] InnoDB: Uses event mutexes
2017-02-01T11:23:41.736500Z 0 [Note] InnoDB: _mm_lfence() and _mm_sfence() are u
sed for memory barrier
2017-02-01T11:23:41.736500Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.3 2017-02-01T11:23:42.249552Z 0 [Note] InnoDB: Number of pools: 1 2017-02-01T11:23:42.261553Z 0 [Note] InnoDB: Not using CPU crc32 instructions 2017-02-01T11:23:42.362563Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M 2017-02-01T11:23:42.391566Z 0 [Note] InnoDB: Completed initialization of buffer pool
2017-02-01T11:23:42.746601Z 0 [Note] InnoDB: Highest supported file format is Ba rracuda.
2017-02-01T11:23:42.772604Z 0 [Note] InnoDB: Log scan progressed past the checkp oint lsn 41558753537
2017-02-01T11:23:42.772604Z 0 [Note] InnoDB: Doing recovery: scanned up to log s equence number 41558753594
2017-02-01T11:23:42.792606Z 0 [Note] InnoDB: Doing recovery: scanned up to log s equence number 41558753594
2017-02-01T11:23:42.794606Z 0 [Note] InnoDB: Database was not shutdown normally!
2017-02-01T11:23:42.794606Z 0 [Note] InnoDB: Starting crash recovery.
2017-02-01T11:23:49.091236Z 0 [Note] InnoDB: Removed temporary tablespace data f
ile: "ibtmp1"
2017-02-01T11:23:49.093236Z 0 [Note] InnoDB: Creating shared tablespace for temp
orary tables
2017-02-01T11:23:49.095236Z 0 [Note] InnoDB: Setting file '.\ibtmp1' size to 12
MB. Physically writing the file full; Please wait ...
2017-02-01T11:23:49.776304Z 0 [Note] InnoDB: File '.\ibtmp1' size is now 12 MB.
2017-02-01T11:23:49.796306Z 0 [Note] InnoDB: 96 redo rollback segment(s) found.
96 redo rollback segment(s) are active.
2017-02-01T11:23:49.796306Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are
active.
2017-02-01T11:23:49.798306Z 0 [Note] InnoDB: Waiting for purge to start 2017-02-01T11:23:49.848311Z 0 [Note] InnoDB: Waiting for purge to start 2017-02-01T11:23:49.898316Z 0 [Note] InnoDB: page_cleaner: 1000ms intended looptook 7477ms. The settings might not be optimal. (flushed=0 and evicted=0, during the time.)
2017-02-01T11:23:49.908317Z 0 [Note] InnoDB: 5.7.16 started; log sequence number 41558753594
2017-02-01T11:23:49.909318Z 0 [Note] InnoDB: Loading buffer pool(s) from c:\temp \mysql\data\ib_buffer_pool
2017-02-01T11:23:49.941321Z 0 [Note] Plugin 'FEDERATED' is disabled. 2017-02-01T11:23:50.348361Z 0 [Warning] Failed to set up SSL because of the foll owing SSL library error: SSL context is not usable without certificate and priva te key
2017-02-01T11:23:50.370364Z 0 [Note] Server hostname (bind-address): '*'; port: 3306
2017-02-01T11:23:50.379365Z 0 [Note] IPv6 is available. 2017-02-01T11:23:50.379365Z 0 [Note] - '::' resolves to '::'; 2017-02-01T11:23:50.380365Z 0 [Note] Server socket created on IP: '::'. 2017-02-01T11:23:52.136540Z 0 [Note] Event Scheduler: Loaded 0 events 2017-02-01T11:23:52.136540Z 0 [Note] c:\temp\mysql\bin\mysqld: ready for connections.
Version: '5.7.16' socket: '' port: 3306 MySQL Community Server (GPL) 2017-02-01T11:23:52.327559Z 0 [Note] InnoDB: Buffer pool(s) load completed at 17 0201 11:23:52
2017-02-01T11:24:52.032529Z 0 [ERROR] InnoDB: Cannot allocate 184467440737095406 80 bytes of memory after 60 retries over 60 seconds. OS error: Not enough space (12). Check if you should increase the swap file or ulimits of your operating sy stem. Note that on most 32-bit computers the process memory space is limited to 2 GB or 4 GB.
2017-02-01 11:24:52 0x1868 InnoDB: Assertion failure in thread 6248 in file ut0 ut.cc line 931
InnoDB: Failing assertion: !m_fatal 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.7/en/forcing-innodb-recovery.html InnoDB: about forcing recovery.
11:24:52 UTC - mysqld got exception 0x80000003 ; 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. Attempting to collect some information that could help diagnose the problem. As this is a crash and something is definitely wrong, the information collection process might fail.
key_buffer_size=8388608
read_buffer_size=131072
max_used_connections=0
max_threads=151
thread_count=0
connection_count=0
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 68011 K b
ytes of memory
Hope that's ok; if not, decrease some variables in the equation.
Thread pointer: 0x1461b3d0
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...
[Quoted] 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]76dc59cd kernel32.dll!BaseThreadInitThunk() 76efa561 ntdll.dll!RtlUserThreadStart()
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (0):
Connection ID (thread ID): 0
Status: NOT_KILLED
The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains information that should help you find out what is causing the crash.
...followed by the Windows message mysqld has stopped working.
Thanks again for looking at this, Axel.
Dave
Received on Wed Feb 01 2017 - 12:30:45 CET