[MDEV-21757] Assertion `purpose == FIL_TYPE_TABLESPACE' failed in fil_space_t::modify_check Created: 2020-02-17  Updated: 2020-03-21  Resolved: 2020-03-17

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - InnoDB
Affects Version/s: 10.5
Fix Version/s: 10.5.2

Type: Bug Priority: Major
Reporter: Elena Stepanova Assignee: Marko Mäkelä
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Duplicate
duplicates MDEV-20370 Assertion `mtr->get_log_mode() == MTR... Closed

 Description   

--source include/have_innodb.inc
--source include/have_sequence.inc
 
SET @innodb_defragment.save= @@innodb_defragment;
SET GLOBAL innodb_defragment= ON;
 
CREATE TEMPORARY TABLE t1 (a INT, KEY (a)) ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
INSERT INTO t1 SELECT 0 FROM seq_1_to_180;
INSERT INTO t1 SELECT 5 FROM seq_1_to_160;
INSERT INTO t1 SELECT 1 FROM seq_1_to_1000;
OPTIMIZE TABLE t1;
 
# Cleanup
SET GLOBAL innodb_defragment= @innodb_defragment.save;

10.5 5874aac7

mysqld: /data/src/10.5/storage/innobase/fsp/fsp0fsp.cc:524: void fil_space_t::modify_check(const mtr_t&) const: Assertion `purpose == FIL_TYPE_TABLESPACE' failed.
200218  1:44:49 [ERROR] mysqld got signal 6 ;
 
#7  0x00007ff95c8e6f12 in __GI___assert_fail (assertion=0x55c89f22e158 "purpose == FIL_TYPE_TABLESPACE", file=0x55c89f22dac8 "/data/src/10.5/storage/innobase/fsp/fsp0fsp.cc", line=524, function=0x55c89f22ffe0 <fil_space_t::modify_check(mtr_t const&) const::__PRETTY_FUNCTION__> "void fil_space_t::modify_check(const mtr_t&) const") at assert.c:101
#8  0x000055c89ec39e11 in fil_space_t::modify_check (this=0x55c8a18f2040, mtr=...) at /data/src/10.5/storage/innobase/fsp/fsp0fsp.cc:524
#9  0x000055c89ec411a1 in fseg_free_page_low (seg_inode=0x7ff9520822b2 "", iblock=0x7ff951c845e0, space=0x55c8a18f2040, offset=142, ahi=false, mtr=0x7ff943ffe820) at /data/src/10.5/storage/innobase/fsp/fsp0fsp.cc:2554
#10 0x000055c89ec41a6b in fseg_free_page_func (seg_header=0x7ff95217804a "\377\377\377\376", space=0x55c8a18f2040, offset=142, ahi=false, mtr=0x7ff943ffe820) at /data/src/10.5/storage/innobase/fsp/fsp0fsp.cc:2684
#11 0x000055c89eb169b2 in btr_page_free (index=0x7ff92819ea20, block=0x7ff951c8ee80, mtr=0x7ff943ffe820, blob=false) at /data/src/10.5/storage/innobase/btr/btr0btr.cc:755
#12 0x000055c89eb789b1 in btr_defragment_merge_pages (index=0x7ff92819ea20, from_block=0x7ff951c8ee80, to_block=0x7ff951c8e9c0, zip_size=0, reserved_space=360, max_data_size=0x7ff943ffe308, heap=0x7ff93c00c2b0, mtr=0x7ff943ffe820) at /data/src/10.5/storage/innobase/btr/btr0defragment.cc:524
#13 0x000055c89eb79103 in btr_defragment_n_pages (block=0x7ff951c8e760, index=0x7ff92819ea20, n_pages=3, mtr=0x7ff943ffe820) at /data/src/10.5/storage/innobase/btr/btr0defragment.cc:691
#14 0x000055c89eb794d3 in btr_defragment_chunk () at /data/src/10.5/storage/innobase/btr/btr0defragment.cc:788
#15 0x000055c89eccc258 in tpool::task_group::execute (this=0x55c8a0416420 <task_group>, t=0x55c8a04164c0 <btr_defragment_task>) at /data/src/10.5/tpool/task_group.cc:55
#16 0x000055c89eccc60e in tpool::task::execute (this=0x55c8a04164c0 <btr_defragment_task>) at /data/src/10.5/tpool/task.cc:47
#17 0x000055c89ecc5cfc in tpool::thread_pool_generic::worker_main (this=0x55c8a16dbd80, thread_var=0x55c8a16eb890) at /data/src/10.5/tpool/tpool_generic.cc:518
#18 0x000055c89eccc069 in std::__invoke_impl<void, void (tpool::thread_pool_generic::* const&)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*>(std::__invoke_memfun_deref, void (tpool::thread_pool_generic::* const&)(tpool::worker_data*), tpool::thread_pool_generic*&&, tpool::worker_data*&&) (__f=@0x7ff9540030c8: (void (tpool::thread_pool_generic::*)(tpool::thread_pool_generic * const, tpool::worker_data *)) 0x55c89ecc5c64 <tpool::thread_pool_generic::worker_main(tpool::worker_data*)>, __t=<unknown type in /data/bld/10.5-debug-nightly/bin/mysqld, CU 0x6ba7908, DIE 0x6bb9080>, __args#0=<unknown type in /data/bld/10.5-debug-nightly/bin/mysqld, CU 0x6ba7908, DIE 0x6bb908c>) at /usr/include/c++/6/functional:227
#19 0x000055c89eccbfdb in std::__invoke<void (tpool::thread_pool_generic::* const&)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*>(void (tpool::thread_pool_generic::* const&)(tpool::worker_data*), tpool::thread_pool_generic*&&, tpool::worker_data*&&) (__fn=@0x7ff9540030c8: (void (tpool::thread_pool_generic::*)(tpool::thread_pool_generic * const, tpool::worker_data *)) 0x55c89ecc5c64 <tpool::thread_pool_generic::worker_main(tpool::worker_data*)>, __args#0=<unknown type in /data/bld/10.5-debug-nightly/bin/mysqld, CU 0x6ba7908, DIE 0x6bb9080>, __args#1=<unknown type in /data/bld/10.5-debug-nightly/bin/mysqld, CU 0x6ba7908, DIE 0x6bb908c>) at /usr/include/c++/6/functional:251
#20 0x000055c89eccbf6f in std::_Mem_fn_base<void (tpool::thread_pool_generic::*)(tpool::worker_data*), true>::operator()<tpool::thread_pool_generic*, tpool::worker_data*>(tpool::thread_pool_generic*&&, tpool::worker_data*&&) const (this=0x7ff9540030c8, __args#0=<unknown type in /data/bld/10.5-debug-nightly/bin/mysqld, CU 0x6ba7908, DIE 0x6bb9080>, __args#1=<unknown type in /data/bld/10.5-debug-nightly/bin/mysqld, CU 0x6ba7908, DIE 0x6bb908c>) at /usr/include/c++/6/functional:604
#21 0x000055c89eccbf21 in std::_Bind_simple<std::_Mem_fn<void (tpool::thread_pool_generic::*)(tpool::worker_data*)> (tpool::thread_pool_generic*, tpool::worker_data*)>::_M_invoke<0ul, 1ul>(std::_Index_tuple<0ul, 1ul>) (this=0x7ff9540030b8) at /usr/include/c++/6/functional:1391
#22 0x000055c89eccbe1f in std::_Bind_simple<std::_Mem_fn<void (tpool::thread_pool_generic::*)(tpool::worker_data*)> (tpool::thread_pool_generic*, tpool::worker_data*)>::operator()() (this=0x7ff9540030b8) at /usr/include/c++/6/functional:1380
#23 0x000055c89eccbdfe in std::thread::_State_impl<std::_Bind_simple<std::_Mem_fn<void (tpool::thread_pool_generic::*)(tpool::worker_data*)> (tpool::thread_pool_generic*, tpool::worker_data*)> >::_M_run() (this=0x7ff9540030b0) at /usr/include/c++/6/thread:197
#24 0x00007ff95d22ee6f in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#25 0x00007ff95e86f4a4 in start_thread (arg=0x7ff943fff700) at pthread_create.c:456
#26 0x00007ff95c9a3d0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97

Previous versions fail with MDEV-20370 instead.
10.5 also failed with MDEV-20370 till recently, but now it produces the assertion above with the provided test case.
No obvious effect on a non-debug build.



 Comments   
Comment by Marko Mäkelä [ 2020-03-17 ]

This will be fixed when the MDEV-20370 fix is merged to 10.5. That will most likely miss the 10.5.2 release.

Generated at Thu Feb 08 09:09:34 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.