Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-3571

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

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:

      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

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            philipstoev Philip Stoev added a comment -

            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

            Show
            philipstoev Philip Stoev added a comment - 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
            Hide
            philipstoev Philip Stoev added a comment -

            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.

            Show
            philipstoev Philip Stoev added a comment - 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.
            Hide
            philipstoev Philip Stoev added a comment -

            Database schema
            LPexportBug624099_osmdb06-maria.sql

            Show
            philipstoev Philip Stoev added a comment - Database schema LPexportBug624099_osmdb06-maria.sql
            Hide
            philipstoev Philip Stoev added a comment -

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

            Show
            philipstoev Philip Stoev added a comment - Re: ma_close.c:75: maria_close: Assertion `share->in_trans == 0' failed on UNLOCK TABLES
            Hide
            philipstoev Philip Stoev added a comment -

            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.

            Show
            philipstoev Philip Stoev added a comment - 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.
            Hide
            philipstoev Philip Stoev added a comment -

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

            Show
            philipstoev Philip Stoev added a comment - To reproduce without any third-party tools, simply load this SQL dump using - mysqld== -default-storag-engine=Maria. bug624099.zip LPexportBug624099_bug624099.zip
            Hide
            philipstoev Philip Stoev added a comment -

            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.

            Show
            philipstoev Philip Stoev added a comment - 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.
            Hide
            monty Michael Widenius added a comment -

            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.

            Show
            monty Michael Widenius added a comment - 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.
            Hide
            ratzpo Rasmus Johansson added a comment -

            Launchpad bug id: 624099

            Show
            ratzpo Rasmus Johansson added a comment - Launchpad bug id: 624099

              People

              • Assignee:
                monty Michael Widenius
                Reporter:
                philipstoev Philip Stoev
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: