UBSAN storage/tokudb/PerconaFT/ft/ft-cachetable-wrappers.cc:278:45: runtime error: variable length array bound evaluates to non-positive value

Description

just a few tests that illustrate the issue:
tokudb.rpl.rpl_tokudb_row_img_blobs 'row'

There are a few of these around the library but these are all being reported as a group because they must be fixed as a group with function signature changes and proper dynamic arrays

storage/tokudb/PerconaFT/ft/ft-cachetable-wrappers.cc:279:67: runtime error: variable length array bound evaluates to non-positive value 0
/percona-server/storage/tokudb/PerconaFT/ft/ft-cachetable-wrappers.cc:278:45: runtime error: variable length array bound evaluates to non-positive value 0 #0 0x7f08c734277e in toku_pin_ftnode_with_dep_nodes(ft*, blocknum_s, unsigned int, ftnode_fetch_extra*, pair_lock_type, unsigned int, ftnode**, ftnode**, bool) /home/glorch/dev/8.0/percona-server/storage/tokudb/PerconaFT/ft/ft-cachetable-wrappers.cc:278 #1 0x7f08c7342cf2 in toku_pin_ftnode(ft*, blocknum_s, unsigned int, ftnode_fetch_extra*, pair_lock_type, ftnode**, bool) /home/glorch/dev/8.0/percona-server/storage/tokudb/PerconaFT/ft/ft-cachetable-wrappers.cc:315 #2 0x7f08c7133bc3 in toku_ft_is_empty_fast(ft_handle*) /home/glorch/dev/8.0/percona-server/storage/tokudb/PerconaFT/ft/ft-ops.cc:5184 #3 0x7f08c721d912 in toku_logger_open_rollback(tokulogger*, cachetable*, bool) /home/glorch/dev/8.0/percona-server/storage/tokudb/PerconaFT/ft/logger/logger.cc:248 #4 0x7f08c70151e2 in env_open /home/glorch/dev/8.0/percona-server/storage/tokudb/PerconaFT/src/ydb.cc:1009 #5 0x7f08c6f54dbe in tokudb_init_func /home/glorch/dev/8.0/percona-server/storage/tokudb/hatoku_hton.cc:471 #6 0x557c67f5899c in ha_initialize_handlerton(st_plugin_int*) /home/glorch/dev/8.0/percona-server/sql/handler.cc:769 #7 0x557c66cb8a93 in plugin_initialize /home/glorch/dev/8.0/percona-server/sql/sql_plugin.cc:1202 #8 0x557c66cd3e1c in plugin_init_initialize_and_reap /home/glorch/dev/8.0/percona-server/sql/sql_plugin.cc:1358 #9 0x557c66cfc13c in plugin_register_dynamic_and_init_all(int*, char**, int) /home/glorch/dev/8.0/percona-server/sql/sql_plugin.cc:1585 #10 0x557c6639aeda in init_server_components /home/glorch/dev/8.0/percona-server/sql/mysqld.cc:5303 #11 0x557c663b1764 in mysqld_main(int, char**) /home/glorch/dev/8.0/percona-server/sql/mysqld.cc:6183 #12 0x557c66363fd2 in main /home/glorch/dev/8.0/percona-server/sql/main.cc:30 #13 0x7f08ea845b96 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b96) #14 0x557c66363ee9 in _start (/home/glorch/dev/8.0/percona-server-install-8.0/bin/mysqld+0x18678ee9)
storage/tokudb/PerconaFT/ft/cachetable/cachetable.cc:1575:52: runtime error: variable length array bound evaluates to non-positive value 0 #0 0x7f08c70c9a08 in toku_cachetable_get_and_pin_with_dep_pairs(cachefile*, blocknum_s, unsigned int, void**, CACHETABLE_WRITE_CALLBACK, int (*)(cachefile*, ctpair*, int, blocknum_s, unsigned int, void**, void**, pair_attr_s*, int*, void*), bool (*)(void*, void*), int (*)(void*, void*, void*, int, pair_attr_s*), pair_lock_type, void*, unsigned int, ctpair**, cachetable_dirty*) /home/glorch/dev/8.0/percona-server/storage/tokudb/PerconaFT/ft/cachetable/cachetable.cc:1575 #1 0x7f08c7342aae in toku_pin_ftnode_with_dep_nodes(ft*, blocknum_s, unsigned int, ftnode_fetch_extra*, pair_lock_type, unsigned int, ftnode**, ftnode**, bool) /home/glorch/dev/8.0/percona-server/storage/tokudb/PerconaFT/ft/ft-cachetable-wrappers.cc:299 #2 0x7f08c7342cf2 in toku_pin_ftnode(ft*, blocknum_s, unsigned int, ftnode_fetch_extra*, pair_lock_type, ftnode**, bool) /home/glorch/dev/8.0/percona-server/storage/tokudb/PerconaFT/ft/ft-cachetable-wrappers.cc:315 #3 0x7f08c7133bc3 in toku_ft_is_empty_fast(ft_handle*) /home/glorch/dev/8.0/percona-server/storage/tokudb/PerconaFT/ft/ft-ops.cc:5184 #4 0x7f08c721d912 in toku_logger_open_rollback(tokulogger*, cachetable*, bool) /home/glorch/dev/8.0/percona-server/storage/tokudb/PerconaFT/ft/logger/logger.cc:248 #5 0x7f08c70151e2 in env_open /home/glorch/dev/8.0/percona-server/storage/tokudb/PerconaFT/src/ydb.cc:1009 #6 0x7f08c6f54dbe in tokudb_init_func /home/glorch/dev/8.0/percona-server/storage/tokudb/hatoku_hton.cc:471 #7 0x557c67f5899c in ha_initialize_handlerton(st_plugin_int*) /home/glorch/dev/8.0/percona-server/sql/handler.cc:769 #8 0x557c66cb8a93 in plugin_initialize /home/glorch/dev/8.0/percona-server/sql/sql_plugin.cc:1202 #9 0x557c66cd3e1c in plugin_init_initialize_and_reap /home/glorch/dev/8.0/percona-server/sql/sql_plugin.cc:1358 #10 0x557c66cfc13c in plugin_register_dynamic_and_init_all(int*, char**, int) /home/glorch/dev/8.0/percona-server/sql/sql_plugin.cc:1585 #11 0x557c6639aeda in init_server_components /home/glorch/dev/8.0/percona-server/sql/mysqld.cc:5303 #12 0x557c663b1764 in mysqld_main(int, char**) /home/glorch/dev/8.0/percona-server/sql/mysqld.cc:6183 #13 0x557c66363fd2 in main /home/glorch/dev/8.0/percona-server/sql/main.cc:30 #14 0x7f08ea845b96 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b96) #15 0x557c66363ee9 in _start (/home/glorch/dev/8.0/percona-server-install-8.0/bin/mysqld+0x18678ee9)
storage/tokudb/PerconaFT/ft/cachetable/cachetable.cc:1451:52: runtime error: variable length array bound evaluates to non-positive value 0 #0 0x7f08c70c8bb1 in try_pin_pair /home/glorch/dev/8.0/percona-server/storage/tokudb/PerconaFT/ft/cachetable/cachetable.cc:1451 #1 0x7f08c70c9d07 in toku_cachetable_get_and_pin_with_dep_pairs(cachefile*, blocknum_s, unsigned int, void**, CACHETABLE_WRITE_CALLBACK, int (*)(cachefile*, ctpair*, int, blocknum_s, unsigned int, void**, void**, pair_attr_s*, int*, void*), bool (*)(void*, void*), int (*)(void*, void*, void*, int, pair_attr_s*), pair_lock_type, void*, unsigned int, ctpair**, cachetable_dirty*) /home/glorch/dev/8.0/percona-server/storage/tokudb/PerconaFT/ft/cachetable/cachetable.cc:1608 #2 0x7f08c7342aae in toku_pin_ftnode_with_dep_nodes(ft*, blocknum_s, unsigned int, ftnode_fetch_extra*, pair_lock_type, unsigned int, ftnode**, ftnode**, bool) /home/glorch/dev/8.0/percona-server/storage/tokudb/PerconaFT/ft/ft-cachetable-wrappers.cc:299 #3 0x7f08c7342cf2 in toku_pin_ftnode(ft*, blocknum_s, unsigned int, ftnode_fetch_extra*, pair_lock_type, ftnode**, bool) /home/glorch/dev/8.0/percona-server/storage/tokudb/PerconaFT/ft/ft-cachetable-wrappers.cc:315 #4 0x7f08c7133bc3 in toku_ft_is_empty_fast(ft_handle*) /home/glorch/dev/8.0/percona-server/storage/tokudb/PerconaFT/ft/ft-ops.cc:5184 #5 0x7f08c721d912 in toku_logger_open_rollback(tokulogger*, cachetable*, bool) /home/glorch/dev/8.0/percona-server/storage/tokudb/PerconaFT/ft/logger/logger.cc:248 #6 0x7f08c70151e2 in env_open /home/glorch/dev/8.0/percona-server/storage/tokudb/PerconaFT/src/ydb.cc:1009 #7 0x7f08c6f54dbe in tokudb_init_func /home/glorch/dev/8.0/percona-server/storage/tokudb/hatoku_hton.cc:471 #8 0x557c67f5899c in ha_initialize_handlerton(st_plugin_int*) /home/glorch/dev/8.0/percona-server/sql/handler.cc:769 #9 0x557c66cb8a93 in plugin_initialize /home/glorch/dev/8.0/percona-server/sql/sql_plugin.cc:1202 #10 0x557c66cd3e1c in plugin_init_initialize_and_reap /home/glorch/dev/8.0/percona-server/sql/sql_plugin.cc:1358 #11 0x557c66cfc13c in plugin_register_dynamic_and_init_all(int*, char**, int) /home/glorch/dev/8.0/percona-server/sql/sql_plugin.cc:1585 #12 0x557c6639aeda in init_server_components /home/glorch/dev/8.0/percona-server/sql/mysqld.cc:5303 #13 0x557c663b1764 in mysqld_main(int, char**) /home/glorch/dev/8.0/percona-server/sql/mysqld.cc:6183 #14 0x557c66363fd2 in main /home/glorch/dev/8.0/percona-server/sql/main.cc:30 #15 0x7f08ea845b96 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b96) #16 0x557c66363ee9 in _start (/home/glorch/dev/8.0/percona-server-install-8.0/bin/mysqld+0x18678ee9)

Environment

None

Smart Checklist

Activity

Show:

Julia Vural March 4, 2025 at 9:06 PM

It appears that this issue is no longer being worked on, so we are closing it for housekeeping purposes. If you believe the issue still exists, please open a new ticket after confirming it's present in the latest release.

Won't Do

Details

Assignee

Reporter

Labels

Time tracking

1h 30m logged

Components

Affects versions

Priority

Smart Checklist

Created September 19, 2018 at 2:55 PM
Updated March 4, 2025 at 9:06 PM
Resolved March 4, 2025 at 9:06 PM