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

mariadb 10.0.20 crashing when data is read by Kodi media center (http://kodi.tv).

Details

    • 10.1.9-1

    Description

      Reported the problem here: http://trac.kodi.tv/ticket/16126 and here: http://forum.kodi.tv/showthread.php?tid=232834

      Mariadb seems to crash when data is read?! by Kodi

      Attached is journalctl output of the crash plus a logfile of Kodi.

      Attachments

        1. kodi.log
          411 kB
        2. mariadb_error.log
          7 kB
        3. mysqld.log
          18 kB

        Issue Links

          Activity

            ... However, both Item_direct_view_ref and Item_singlerow_subselect have result_field=NULL.

            result_field is set in create_tmp_table.
            Looking at that function.
            Note that EXPLAIN shows that table album has type= const.

            create_tmp_table has this code:

              while ((item=li++))
              {
                Item::Type type=item->type();
                if (not_all_columns)
                {
                   ...
                  if (item->const_item() && (int) hidden_field_count <= 0)
                    continue; // We don't have to store this
                }

            We arrive to "We don't have to store this" for all items in albumview.*, including the iTimesPlayed subquery.

            psergei Sergei Petrunia added a comment - ... However, both Item_direct_view_ref and Item_singlerow_subselect have result_field=NULL. result_field is set in create_tmp_table . Looking at that function. Note that EXPLAIN shows that table album has type= const. create_tmp_table has this code: while ((item=li++)) { Item::Type type=item->type(); if (not_all_columns) { ... if (item->const_item() && (int) hidden_field_count <= 0) continue; // We don't have to store this } We arrive to "We don't have to store this" for all items in albumview.* , including the iTimesPlayed subquery.

            Items in the other table are also Item_direct_view objects, and create_tmp_table will call set_result_field for them:

            (gdb) wher 4
              #0  Item_ref::set_result_field (this=0x7fff9c0400b0, field=0x7fff9c06c028) at /home/psergey/dev-git/10.0/sql/item.h:3439
              #1  0x00000000006cb079 in create_tmp_field (thd=0x2ed0960, table=0x7fff9c073bd8, item=0x7fff9c014740, type=Item::FIELD_ITEM, copy_func=0x7ffff7f80d80, from_field=0x7fff9c074d40, default_field=0x7fff9c074c18, group=false, modify_item=false, table_cant_handle_bit_fields=false, make_copy_field=false, convert_blob_length=0) at /home/psergey/dev-git/10.0/sql/sql_select.cc:15656
              #2  0x00000000006cc67d in create_tmp_table (thd=0x2ed0960, param=0x7fff9c03b9b0, fields=..., group=0x0, distinct=false, save_sum_fields=false, select_options=2147748608, rows_limit=18446744073709551615

            psergei Sergei Petrunia added a comment - Items in the other table are also Item_direct_view objects, and create_tmp_table will call set_result_field for them: (gdb) wher 4 #0 Item_ref::set_result_field (this=0x7fff9c0400b0, field=0x7fff9c06c028) at /home/psergey/dev-git/10.0/sql/item.h:3439 #1 0x00000000006cb079 in create_tmp_field (thd=0x2ed0960, table=0x7fff9c073bd8, item=0x7fff9c014740, type=Item::FIELD_ITEM, copy_func=0x7ffff7f80d80, from_field=0x7fff9c074d40, default_field=0x7fff9c074c18, group=false, modify_item=false, table_cant_handle_bit_fields=false, make_copy_field=false, convert_blob_length=0) at /home/psergey/dev-git/10.0/sql/sql_select.cc:15656 #2 0x00000000006cc67d in create_tmp_table (thd=0x2ed0960, param=0x7fff9c03b9b0, fields=..., group=0x0, distinct=false, save_sum_fields=false, select_options=2147748608, rows_limit=18446744073709551615

            .. however, change_refs_to_tmp_fields() seems to ignore the above difference. It has a loop that just goes through all items.

            Need to discuss this with sanja.

            psergei Sergei Petrunia added a comment - .. however, change_refs_to_tmp_fields() seems to ignore the above difference. It has a loop that just goes through all items. Need to discuss this with sanja .

            revision-id: ad9ed479ab2cb711ce2b0de01f91eb03dfd0c4d6 (mariadb-10.0.21-59-gad9ed47)
            parent(s): a9b5a8d5056af6c8f9b98a231ffa2de9ea20f215
            committer: Oleksandr Byelkin
            timestamp: 2015-10-28 08:34:08 +0100
            message:

            MDEV-8525 mariadb 10.0.20 crashing when data is read by Kodi media center (http://kodi.tv).

            Item_direct_view_ref maintains its own item_const() method so should use it when asked of temporary table field to be in sync with it.

            sanja Oleksandr Byelkin added a comment - revision-id: ad9ed479ab2cb711ce2b0de01f91eb03dfd0c4d6 (mariadb-10.0.21-59-gad9ed47) parent(s): a9b5a8d5056af6c8f9b98a231ffa2de9ea20f215 committer: Oleksandr Byelkin timestamp: 2015-10-28 08:34:08 +0100 message: MDEV-8525 mariadb 10.0.20 crashing when data is read by Kodi media center ( http://kodi.tv ). Item_direct_view_ref maintains its own item_const() method so should use it when asked of temporary table field to be in sync with it. —

            Ok to push.

            I think we should ask elenst to make a test pass with RQG and relevant test load: queries with ORDER BY/GROUP BY/DISTINCT .

            psergei Sergei Petrunia added a comment - Ok to push. I think we should ask elenst to make a test pass with RQG and relevant test load: queries with ORDER BY/GROUP BY/DISTINCT .

            People

              sanja Oleksandr Byelkin
              Aqnaris Dave M.
              Votes:
              5 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.