capture_persistent_env_contents: Assertion `r == 0' failed with tokudb_cache_size=1024

Bug #1511969 reported by Shahriyar Rzayev
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Server moved to https://jira.percona.com/projects/PS
Status tracked in 5.7
5.6
Triaged
High
Unassigned
5.7
Triaged
High
Unassigned

Bug Description

If you try to start Percona Server(TokuDB enabled) with tokudb_cache_size equal to 1024 (for eg.), it will fail to start.
Output from Error Log:

2015-10-31 19:29:55 15251 [Note] InnoDB: Percona XtraDB (http://www.percona.com) 5.6.26-74.0 started; log sequence number 876490089
/mnt/workspace/percona-server-5.6-debian-binary-new/label_exp/ubuntu-trusty-64bit/percona-server-5.6-5.6.26-74.0/storage/tokudb/PerconaFT/src/y
db.cc:587 capture_persistent_env_contents: Assertion `r == 0' failed (errno=2) (r=18446744073709451616)
: No such file or directory
Backtrace: (Note: toku_do_assert=0x0x7fe37a4d6ba0)
/usr/lib/mysql/plugin/ha_tokudb.so(_Z19db_env_do_backtraceP8_IO_FILE+0x1b)[0x7fe37a4d646b]
/usr/lib/mysql/plugin/ha_tokudb.so(+0x93593)[0x7fe37a4d6593]
/usr/lib/mysql/plugin/ha_tokudb.so(+0xa6602)[0x7fe37a4e9602]
/usr/lib/mysql/plugin/ha_tokudb.so(+0x131e35)[0x7fe37a574e35]
/usr/lib/mysql/plugin/ha_tokudb.so(+0x5102c)[0x7fe37a49402c]
/usr/sbin/mysqld(_Z24ha_initialize_handlertonP13st_plugin_int+0x48)[0x599a78]
/usr/sbin/mysqld[0x6e4ba1]
/usr/sbin/mysqld(_Z11plugin_initPiPPci+0x941)[0x6eb1f1]
/usr/sbin/mysqld[0x59236d]
/usr/sbin/mysqld(_Z11mysqld_mainiPPc+0x42c)[0x5933fc]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5)[0x7fe396d30ec5]
/usr/sbin/mysqld[0x5856ed]
.
.
.
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 = 0 thread_stack 0x30000
/usr/sbin/mysqld(my_print_stacktrace+0x2c)[0x8d037c]
/usr/sbin/mysqld(handle_fatal_signal+0x461)[0x6570f1]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x10340)[0x7fe397904340]
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0x39)[0x7fe396d45cc9]
/lib/x86_64-linux-gnu/libc.so.6(abort+0x148)[0x7fe396d490d8]
/usr/lib/mysql/plugin/ha_tokudb.so(+0x93598)[0x7fe37a4d6598]
/usr/lib/mysql/plugin/ha_tokudb.so(+0xa6602)[0x7fe37a4e9602]
/usr/lib/mysql/plugin/ha_tokudb.so(+0x131e35)[0x7fe37a574e35]
/usr/lib/mysql/plugin/ha_tokudb.so(+0x5102c)[0x7fe37a49402c]
/usr/sbin/mysqld(_Z24ha_initialize_handlertonP13st_plugin_int+0x48)[0x599a78]
/usr/sbin/mysqld[0x6e4ba1]
/usr/sbin/mysqld(_Z11plugin_initPiPPci+0x941)[0x6eb1f1]
/usr/sbin/mysqld[0x59236d]
/usr/sbin/mysqld(_Z11mysqld_mainiPPc+0x42c)[0x5933fc]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5)[0x7fe396d30ec5]
/usr/sbin/mysqld[0x5856ed]
You may download the Percona Server operations manual by visiting
http://www.percona.com/software/percona-server/. You may find information
in the manual which will help you identify the cause of the crash.

Tags: qa tokudb
Revision history for this message
George Ormond Lorch III (gl-az) wrote :

Yes, TokuDB can do numerous bad things when you have an absurdly small cache size. There is no logic that tests cache size against node size either, allowing you to have a cache size that is smaller than a single node size. We should add a more rational minimum cache size and additional logic that validates cache_size > node_size(block_size) *10 > basement_node_size(read_block_size)*4 or something similar.

Revision history for this message
Roel Van de Paar (roel11) wrote :

Another occurrence:

2016-01-26T12:54:37.444140Z 0 [Note] InnoDB: Buffer pool(s) load completed at 160126 23:54:37
/git/PS-5.7_dbg/storage/tokudb/PerconaFT/src/ydb.cc:979 env_open: Assertion `r == 0' failed (errno=2) (r=18446744073709451616)
: No such file or directory
Backtrace: (Note: toku_do_assert=0x0x7ff370d5f0f6)

+bt
#0 0x00007ff43ddb1741 in __pthread_kill (threadid=<optimized out>, signo=6) at ../nptl/sysdeps/unix/sysv/linux/pthread_kill.c:61
#1 0x0000000001811920 in my_write_core (sig=6) at /git/PS-5.7_dbg/mysys/stacktrace.c:247
#2 0x0000000000e609e3 in handle_fatal_signal (sig=6) at /git/PS-5.7_dbg/sql/signal_handler.cc:223
#3 <signal handler called>
#4 0x00007ff43c14a5f7 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#5 0x00007ff43c14bce8 in __GI_abort () at abort.c:90
#6 0x00007ff370d5ee6f in toku_do_backtrace_abort () at /git/PS-5.7_dbg/storage/tokudb/PerconaFT/portability/toku_assert.cc:147
#7 0x00007ff370d5f028 in toku_do_assert_zero_fail (expr=18446744073709451616, expr_as_string=0x7ff370d67c24 "r", function=0x7ff370d69b96 <env_open(__toku_db_env*, char const*, unsigned int, int)::__FUNCTION__> "env_open", file=0x7ff370d67fd0 "/git/PS-5.7_dbg/storage/tokudb/PerconaFT/src/ydb.cc", line=979, caller_errno=2) at /git/PS-5.7_dbg/storage/tokudb/PerconaFT/portability/toku_assert.cc:177
#8 0x00007ff370c60e65 in env_open (env=0x7ff38a31b200, home=0x2bfa300 <mysql_real_data_home> "/sda/PS-19.01.16-mysql-5.7.10-1rc1-linux-x86_64-debug/data/", flags=11403457, mode=438) at /git/PS-5.7_dbg/storage/tokudb/PerconaFT/src/ydb.cc:979
#9 0x00007ff370c4e4ea in tokudb_init_func (p=0x7ff4377fa120) at /git/PS-5.7_dbg/storage/tokudb/hatoku_hton.cc:553
#10 0x0000000000eeb963 in ha_initialize_handlerton (plugin=0x7ff38a361528) at /git/PS-5.7_dbg/sql/handler.cc:870
#11 0x0000000001534d2e in plugin_initialize (plugin=0x7ff38a361528) at /git/PS-5.7_dbg/sql/sql_plugin.cc:1178
#12 0x00000000015358ea in plugin_init (argc=0x2bff4b0 <remaining_argc>, argv=0x7ff43a022300, flags=0) at /git/PS-5.7_dbg/sql/sql_plugin.cc:1490
#13 0x0000000000e4fa53 in init_server_components () at /git/PS-5.7_dbg/sql/mysqld.cc:4221
#14 0x0000000000e51012 in mysqld_main (argc=12, argv=0x7ff43a022300) at /git/PS-5.7_dbg/sql/mysqld.cc:4897
#15 0x0000000000e48600 in main (argc=12, argv=0x7fff6fb656a8) at /git/PS-5.7_dbg/sql/main.cc:25

Revision history for this message
Roel Van de Paar (roel11) wrote :

That was with --no-defaults --tokudb-cache-size=12

tags: added: semi-qablock
tags: added: qa
removed: semi-qablock
Revision history for this message
George Ormond Lorch III (gl-az) wrote :
Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PS-938

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.