[MDEV-2201] LP:973039 - Assertion `share->in_trans == 0' failed in maria_close on DROP TABLE under LOCK Created: 2012-04-04  Updated: 2014-06-20  Resolved: 2012-10-04

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Elena Stepanova Assignee: Michael Widenius
Resolution: Fixed Votes: 0
Labels: Launchpad

Attachments: XML File LPexportBug973039.xml    

 Description   

Version: '5.5.22-MariaDB-debug-log'

mysqld: maria-5.5/storage/maria/ma_close.c:88: maria_close: Assertion `share->in_trans == 0' failed

#8 0xb7422014 in __assert_fail () from /lib/libc.so.6
#9 0x085de4cc in maria_close (info=0x971c778)
    at maria-5.5/storage/maria/ma_close.c:88
#10 0x0855e645 in ha_maria::close (this=0x9701e50)
    at maria-5.5/storage/maria/ha_maria.cc:1223
#11 0x083ce4b4 in handler::ha_close (this=0x9701e50)
    at maria-5.5/sql/handler.cc:2284
#12 0x082ed97e in closefrm (table=0x97016f0, free_share=true)
    at maria-5.5/sql/table.cc:2692
#13 0x081defc3 in intern_close_table (table=0x97016f0)
    at maria-5.5/sql/sql_base.cc:927
#14 0x081df03c in free_cache_entry (table=0x97016f0)
    at maria-5.5/sql/sql_base.cc:950
#15 0x081e0677 in close_thread_table (thd=0x965bbb8, table_ptr=0x9721c10)
    at maria-5.5/sql/sql_base.cc:1633
#16 0x081dffd0 in close_all_tables_for_name (thd=0x965bbb8, share=0x9704530,
    remove_from_locked_tables=true) at maria-5.5/sql/sql_base.cc:1428
#17 0x082c0dd8 in mysql_rm_table_no_locks (thd=0x965bbb8, tables=0x970b820,
    if_exists=false, drop_temporary=false, drop_view=false, dont_log_query=false)
    at maria-5.5/sql/sql_table.cc:2129
#18 0x082c0820 in mysql_rm_table (thd=0x965bbb8, tables=0x970b820,
    if_exists=0 '\000', drop_temporary=0 '\000')
    at maria-5.5/sql/sql_table.cc:1929
#19 0x0823ba68 in mysql_execute_command (thd=0x965bbb8)
    at maria-5.5/sql/sql_parse.cc:3117
#20 0x08242a67 in mysql_parse (thd=0x965bbb8,
    rawbuf=0x970b780 "DROP TABLE t1, t2", length=17, parser_state=0xad091db8)
    at maria-5.5/sql/sql_parse.cc:5731
#21 0x08236edc in dispatch_command (command=COM_QUERY, thd=0x965bbb8,
    packet=0x9743ba1 "DROP TABLE t1, t2", packet_length=17)
    at maria-5.5/sql/sql_parse.cc:1055
#22 0x082363a1 in do_command (thd=0x965bbb8)
    at maria-5.5/sql/sql_parse.cc:794
#23 0x08320b75 in do_handle_one_connection (thd_arg=0x965bbb8)
    at maria-5.5/sql/sql_connect.cc:1253
#24 0x083206c0 in handle_one_connection (arg=0x965bbb8)
    at maria-5.5/sql/sql_connect.cc:1168
#25 0x08548c7b in pfs_spawn_thread (arg=0x974c9e8)
    at maria-5.5/storage/perfschema/pfs.cc:1015
#26 0xb7701b25 in start_thread () from /lib/libpthread.so.0

bzr version-info
revision-id: <email address hidden>
date: 2012-04-03 08:00:57 +0200
build-date: 2012-04-04 06:45:20 +0400
revno: 3363

Could not reproduce on MariaDB 5.3.
Could not reproduce with MyISAM.

Test case:

CREATE TABLE t1 (i INT) ENGINE=Aria;
CREATE TABLE t2 (i INT) ENGINE=Aria;
LOCK TABLE t1 WRITE, t2 WRITE;

  1. Also fails with FLUSH TABLE t1
  2. and with REPAIR TABLE t1 USE_FRM
    DROP TABLE t1;
  1. End of test case


 Comments   
Comment by Elena Stepanova [ 2012-04-04 ]

Re: Assertion `share->in_trans == 0' failed in maria_close on DROP TABLE under LOCK
Set to 'High' rather than 'Critical' because it's a debug assertion, I have not gotten any visible negative effect on a non-debug build. Please adjust if needed.

Comment by Elena Stepanova [ 2012-04-04 ]

Re: Assertion `share->in_trans == 0' failed in maria_close on DROP TABLE under LOCK
Also filed in JIRA as MDEV-211

Comment by Michael Widenius [ 2012-05-16 ]

Re: Assertion `share->in_trans == 0' failed in maria_close on DROP TABLE under LOCK
Fixed and pushed.
This issue was due to lost signals to the storage engines of what is happening.

Comment by Rasmus Johansson (Inactive) [ 2012-05-16 ]

Launchpad bug id: 973039

Generated at Thu Feb 08 06:40:15 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.