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

Bug #624099 reported by Philip Stoev
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MariaDB
Fix Released
High
Michael Widenius

Bug 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

Related branches

Revision history for this message
Philip Stoev (pstoev-askmonty) wrote :

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.

Revision history for this message
Philip Stoev (pstoev-askmonty) wrote :
Revision history for this message
Philip Stoev (pstoev-askmonty) wrote :

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.

Changed in maria:
importance: Undecided → High
assignee: nobody → Michael Widenius (monty)
Revision history for this message
Philip Stoev (pstoev-askmonty) wrote :

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

Changed in maria:
milestone: none → 5.2
milestone: 5.2 → 5.1
Michael Widenius (monty)
Changed in maria:
status: New → In Progress
Revision history for this message
Michael Widenius (monty) wrote :

Problem found; There was a bug in Aria when using LOCK TABLES followed by ALTER TABLE.
Will push shortly.

Michael Widenius (monty)
Changed in maria:
status: In Progress → Fix Committed
Michael Widenius (monty)
Changed in maria:
status: Fix Committed → Fix Released
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.