[MDEV-3571] LP:624099 - ma_close.c:75: maria_close: Assertion `share->in_trans == 0' failed on UNLOCK TABLES Created: 2010-08-25  Updated: 2015-02-02  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: Philip Stoev (Inactive) Assignee: Michael Widenius
Resolution: Fixed Votes: 0
Labels: Launchpad

Attachments: XML File LPexportBug624099.xml     Zip Archive LPexportBug624099_bug624099.zip     File LPexportBug624099_osmdb06-maria.sql     Zip Archive LPexportBug624099_var-bug624099.zip    

 Description   

When trying to load an OpenStreetMap dataset using the Osmosis tool, the server asserted as follows:

mysqld: ma_close.c:75: maria_close: Assertion `share->in_trans == 0' failed.

backtrace:

#8 0x00897de8 in __assert_fail () from /lib/libc.so.6
#9 0x0857cda5 in maria_close (info=0x9b98608) at ma_close.c:75
#10 0x0852b820 in ha_maria::close (this=0x9b92d00) at ha_maria.cc:1051
#11 0x082dfb94 in closefrm (table=0x9b8d928, free_share=true) at table.cc:2451
#12 0x082c7446 in intern_close_table (table=0x9b8d928) at sql_base.cc:786
#13 0x082c74e7 in free_cache_entry (table=0x9b8d928) at sql_base.cc:808
#14 0x0872b94c in my_hash_delete (hash=0x8a717a0, record=0x9b8d928 "\370\223\272\t") at hash.c:562
#15 0x082c86e8 in close_thread_table (thd=0x9961660, table_ptr=0x99616ac) at sql_base.cc:1406
#16 0x082c8117 in close_open_tables (thd=0x9961660) at sql_base.cc:1203
#17 0x082c84b0 in close_thread_tables (thd=0x9961660) at sql_base.cc:1361
#18 0x0827ccf7 in unlock_locked_tables (thd=0x9961660) at sql_parse.cc:154
#19 0x082856ca in mysql_execute_command (thd=0x9961660) at sql_parse.cc:3561
#20 0x0828cef3 in mysql_parse (thd=0x9961660, inBuf=0xcbd06c0 "UNLOCK TABLES", length=13, found_semicolon=0xa767c22c) at sql_parse.cc:6055
#21 0x0827f0ef in dispatch_command (command=COM_QUERY, thd=0x9961660, packet=0x98c9f01 "UNLOCK TABLES", packet_length=13) at sql_parse.cc:1204
#22 0x0827e593 in do_command (thd=0x9961660) at sql_parse.cc:898
#23 0x0827b554 in handle_one_connection (arg=0x9961660) at sql_connect.cc:1154
#24 0x00a08919 in start_thread () from /lib/libpthread.so.0
#25 0x00951e5e in clone () from /lib/libc.so.6

bzr version-info:

revision-id: <email address hidden>
date: 2010-08-25 01:47:52 +0300
build-date: 2010-08-25 19:15:53 +0300
revno: 2848
branch-nick: maria-5.2



 Comments   
Comment by Philip Stoev (Inactive) [ 2010-08-25 ]

Re: ma_close.c:75: maria_close: Assertion `share->in_trans == 0' failed on UNLOCK TABLES
What seems to be happening is that the script has tried to lock the table before inserting about 1 million rows into it. This causes massive maria log file growth and memory usage. The vardir and the logs are several Gb and therefore only the core and the binary are being uploaded at this time.

Comment by Philip Stoev (Inactive) [ 2010-08-25 ]

What seems to be happening is that the script has tried to lock the table before inserting about 1 million rows into it. This causes massive maria log file growth and memory usage. The vardir and the logs are several Gb and therefore only the core and the binary are being uploaded at this time.
core + binary
LPexportBug624099_var-bug624099.zip

Comment by Philip Stoev (Inactive) [ 2010-08-26 ]

Re: ma_close.c:75: maria_close: Assertion `share->in_trans == 0' failed on UNLOCK TABLES

Comment by Philip Stoev (Inactive) [ 2010-08-26 ]

Database schema
LPexportBug624099_osmdb06-maria.sql

Comment by Philip Stoev (Inactive) [ 2010-08-26 ]

Re: ma_close.c:75: maria_close: Assertion `share->in_trans == 0' failed on UNLOCK TABLES
To reproduce:

1. Create a database named "osm"
2. Create the tables using the provided database schema SQL file
3. Download the andorra.osm.bz2 from http://download.geofabrik.de/osm/europe/ and unbzip2 it
4. Download Osmosis from http://dev.openstreetmap.org/~bretth/osmosis-build/osmosis-latest.tgz
5. Populate the database:

chmod +x osmosis-0.36/bin/osmosis
osmosis-0.36/bin/osmosis --read-xml file=andorra.osm --write-apidb dbType="mysql" host="localhost:9306" validateSchemaVersion=no database="osm" user="root"

The tool will start loading the data and abort with a Java exception when the server has crashed.

Comment by Philip Stoev (Inactive) [ 2010-08-28 ]

Re: ma_close.c:75: maria_close: Assertion `share->in_trans == 0' failed on UNLOCK TABLES
To reproduce without any third-party tools, simply load this SQL dump using -mysqld==-default-storag-engine=Maria.

Comment by Philip Stoev (Inactive) [ 2010-08-28 ]

To reproduce without any third-party tools, simply load this SQL dump using -mysqld==-default-storag-engine=Maria.
bug624099.zip
LPexportBug624099_bug624099.zip

Comment by Michael Widenius [ 2011-02-10 ]

Re: ma_close.c:75: maria_close: Assertion `share->in_trans == 0' failed on UNLOCK TABLES
Problem found; There was a bug in Aria when using LOCK TABLES followed by ALTER TABLE.
Will push shortly.

Comment by Rasmus Johansson (Inactive) [ 2011-03-01 ]

Launchpad bug id: 624099

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