[MDEV-12412] mmap failure and InnoDB Block incorrect state when run benchmark by DBT-3 Created: 2017-03-31  Updated: 2023-04-12  Resolved: 2023-04-11

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - InnoDB
Affects Version/s: 10.1.22
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: dic (Inactive) Assignee: Jan Lindström (Inactive)
Resolution: Won't Fix Votes: 0
Labels: None
Environment:

CentOS Linux release 7.3.1611 (Core)



 Description   

'#mysql_install_db --defaults-file=/opt/bm_test/mariadb-tools/dbt3_benchmark/config/s30/load_mysql_innodb_my.cnf --basedir=/usr --datadir=/opt/bm_test/db_data/myinnodb-s30/ --general-log

Installing MariaDB/MySQL system tables in '/opt/bm_test/db_data/myinnodb-s30/' ...
2017-03-29 14:08:42 140315532744960 [Note] Using unique option prefix 'key_buffer' is error-prone and can break in the future. Please use the full name 'key_buffer_size' instead.
2017-03-29 14:08:42 140315532744960 [Note] Using unique option prefix 'thread_cache' is error-prone and can break in the future. Please use the full name 'thread_cache_size' instead.
2017-03-29 14:08:42 140315532744960 [Note] /usr/sbin/mysqld (mysqld 10.1.22-MariaDB) starting as process 5341 ...
2017-03-29 14:08:42 7f9dc17c5900 InnoDB: Warning: Using innodb_additional_mem_pool_size is DEPRECATED. This option may be removed in future releases, together with the option innodb_use_sys_malloc and with the InnoDB's internal memory allocator.
2017-03-29 14:08:42 140315532744960 [Note] InnoDB: Using mutexes to ref count buffer pool pages
2017-03-29 14:08:42 140315532744960 [Note] InnoDB: The InnoDB memory heap is disabled
2017-03-29 14:08:42 140315532744960 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2017-03-29 14:08:42 140315532744960 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2017-03-29 14:08:42 140315532744960 [Note] InnoDB: Compressed tables use zlib 1.2.7
2017-03-29 14:08:42 140315532744960 [Note] InnoDB: Using Linux native AIO
2017-03-29 14:08:42 140315532744960 [Note] InnoDB: Using SSE crc32 instructions
2017-03-29 14:08:42 140315532744960 [Note] InnoDB: Initializing buffer pool, size = 50.0G
InnoDB: mmap(7028736000 bytes) failed; errno 12
InnoDB: Error: Block 0x7f9dbc43c968 incorrect state BUF_BLOCK_POOL_WATCH in buf_LRU_block_free_non_file_page()
170329 14:08:43 [ERROR] mysqld got signal 11 ;
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.22-MariaDB
key_buffer_size=16777216
read_buffer_size=131072
max_used_connections=0
max_threads=258
thread_count=0
It is possible that mysqld could use up to 
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 186782 K  bytes of memory
Hope that's ok; if not, decrease some variables in the equation.
 
Thread pointer: 0x0
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 = 0x0 thread_stack 0x48400
/usr/sbin/mysqld(my_print_stacktrace+0x2e)[0x7f9dc22a810e]
/usr/sbin/mysqld(handle_fatal_signal+0x305)[0x7f9dc1dcb9d5]
/lib64/libpthread.so.0(+0xf370)[0x7f9dc13e6370]
/usr/sbin/mysqld(+0x8854cb)[0x7f9dc209a4cb]
/usr/sbin/mysqld(+0x885aa3)[0x7f9dc209aaa3]
/usr/sbin/mysqld(+0x81a480)[0x7f9dc202f480]
mysys/stacktrace.c:268(my_print_stacktrace)[0x7f9dc1f5028e]
sql/signal_handler.cc:168(handle_fatal_signal)[0x7f9dc1dcdb24]
handler/ha_innodb.cc:4435(innobase_init(void*))[0x7f9dc1c5b8e5]
sql/handler.cc:513(ha_initialize_handlerton(st_plugin_int*))[0x7f9dc1c5d1fa]
sql/sql_plugin.cc:1400(plugin_initialize(st_mem_root*, st_plugin_int*, int*, char**, bool))[0x7f9dc1bb4d68]
sql/mysqld.cc:5732(mysqld_main(int, char**))[0x7f9dc1bb8ee5]
/lib64/libc.so.6(__libc_start_main+0xf5)[0x7f9dbf727b35]
/usr/sbin/mysqld(+0x397b8d)[0x7f9dc1bacb8d]
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.
/usr/bin/mysql_install_db: line 451:  5341 Segmentation fault      (core dumped) "$mysqld_bootstrap" $defaults "$mysqld_opt" --bootstrap "--basedir=$basedir" "--datadir=$ldata" --log-warnings=0 --enforce-storage-engine="" $args --max_allowed_packet=8M --net_buffer_length=16K
 
Installation of system tables failed!  Examine the logs in
/opt/bm_test/db_data/myinnodb-s30/ for more information.

'# ll /opt/bm_test/db_data/myinnodb-s30/
total 12
-rw-rw----. 1 root root 8192 Mar 29 14:08 aria_log.00000001
-rw-rw----. 1 root root   52 Mar 29 14:08 aria_log_control
drwx------. 2 root root    6 Mar 29 14:08 mysql
drwx------. 2 root root    6 Mar 29 14:00 test
 
'# free
              total        used        free      shared  buff/cache   available
Mem:        3882448      393560     2991592        9172      497296     3227972
Swap:       4063228           0     4063228



 Comments   
Comment by Daniel Black [ 2017-04-02 ]

InnoDB: mmap(7028736000 bytes) failed; errno 12
perror 12
OS error code  12:  Cannot allocate memory

So desired outcome - better reporting of the error message?

Comment by dic (Inactive) [ 2017-04-03 ]

Expected result:
Empty database created into a folder that will be used for the benchmark

Comment by Elena Stepanova [ 2017-05-02 ]

nguyen,

So, you have 3.5G memory plus 4G swap, you are trying to use 50G buffer pool which is allocated on startup and you expect it to work? It's not going to happen.

But I do agree that it shouldn't crash with SIGSEGV, but go down gracefully.

Comment by Jan Lindström [ 2023-04-11 ]

10.1 is EOL.

Generated at Thu Feb 08 07:57:31 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.