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

LP:888165 - crash when updating tables with foreign keys

    Details

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

      Description

      Because it is a crash I'll use this bug to get a bug id, to use in the file name I send to the FTP site mentioned in:
      http://kb.askmonty.org/en/reporting-bugs#what-to-do-when-you-get-a-crash-after-installing-a-debug-binary

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            peterstigedwards Peter (Stig) Edwards added a comment -

            Re: crash when updating tables with foreign keys
            I uploaded the file bug_888165.test via FTP to ftp.askmonty.org/private/.
            It's a small test that crashes when run with lp:maria (series 5.3). It also crashed using MariaDB 5.3.2 and MariaDB 5.3.0 built from src. It also crashed Oracle/MySQL's 5.1.48, I've not tested any other versions of yet. I will file a bug with mysql.com once I've confirmed it crashes the latest 5.1.X

            The reproducer originates from a real application, the tables and query were produced by an ORM.

            Sorry I didn't FTP a core or use the bug report tool, this is what the stack trace looks like for lp:maria (series 5.3)

            stack_bottom = 0x7fcfb4575e58 thread_stack 0x48000
            ./mysqld(my_print_stacktrace+0x2e) [0xa566de]
            ./mysqld(handle_segfault+0x4fb) [0x62d0eb]
            /lib64/libpthread.so.0() [0x3e1220f520]
            ./mysqld(key_unpack(String*, st_table*, unsigned int)+0x80) [0x610ef0]
            ./mysqld(handler::print_error(int, int)+0x252) [0x74c442]
            ./mysqld(mysql_update(THD*, TABLE_LIST*, List<Item>&, List<Item>&, Item*, unsigned int, st_order*, unsigned long long, enum_duplicates, bool)+0x10d7) [0x6d81c7]
            ./mysqld(mysql_execute_command(THD*)+0xac4) [0x63c0d4]
            ./mysqld(mysql_parse(THD*, char*, unsigned int, char const**)+0x2c9) [0x640f99]
            ./mysqld(dispatch_command(enum_server_command, THD*, char*, unsigned int)+0x949) [0x6418f9]
            ./mysqld(do_command(THD*)+0xf2) [0x642542]
            ./mysqld(handle_one_connection+0x2e8) [0x633438]
            /lib64/libpthread.so.0() [0x3e122077e1]
            /lib64/libc.so.6(clone+0x6d) [0x35b2ae68ed]

            Thanks.

            Show
            peterstigedwards Peter (Stig) Edwards added a comment - Re: crash when updating tables with foreign keys I uploaded the file bug_888165.test via FTP to ftp.askmonty.org/private/. It's a small test that crashes when run with lp:maria (series 5.3). It also crashed using MariaDB 5.3.2 and MariaDB 5.3.0 built from src. It also crashed Oracle/MySQL's 5.1.48, I've not tested any other versions of yet. I will file a bug with mysql.com once I've confirmed it crashes the latest 5.1.X The reproducer originates from a real application, the tables and query were produced by an ORM. Sorry I didn't FTP a core or use the bug report tool, this is what the stack trace looks like for lp:maria (series 5.3) stack_bottom = 0x7fcfb4575e58 thread_stack 0x48000 ./mysqld(my_print_stacktrace+0x2e) [0xa566de] ./mysqld(handle_segfault+0x4fb) [0x62d0eb] /lib64/libpthread.so.0() [0x3e1220f520] ./mysqld(key_unpack(String*, st_table*, unsigned int)+0x80) [0x610ef0] ./mysqld(handler::print_error(int, int)+0x252) [0x74c442] ./mysqld(mysql_update(THD*, TABLE_LIST*, List<Item>&, List<Item>&, Item*, unsigned int, st_order*, unsigned long long, enum_duplicates, bool)+0x10d7) [0x6d81c7] ./mysqld(mysql_execute_command(THD*)+0xac4) [0x63c0d4] ./mysqld(mysql_parse(THD*, char*, unsigned int, char const**)+0x2c9) [0x640f99] ./mysqld(dispatch_command(enum_server_command, THD*, char*, unsigned int)+0x949) [0x6418f9] ./mysqld(do_command(THD*)+0xf2) [0x642542] ./mysqld(handle_one_connection+0x2e8) [0x633438] /lib64/libpthread.so.0() [0x3e122077e1] /lib64/libc.so.6(clone+0x6d) [0x35b2ae68ed] Thanks.
            Hide
            peterstigedwards Peter (Stig) Edwards added a comment -

            Re: crash when updating tables with foreign keys
            Here is the Oracle/MySQL.com bug:

            http://bugs.mysql.com/bug.php?id=63166

            It also crashed:

            Server version: 5.5.17 MySQL Community Server (GPL) from mysql-5.5.17-linux2.6-x86_64.tar.gz

            Show
            peterstigedwards Peter (Stig) Edwards added a comment - Re: crash when updating tables with foreign keys Here is the Oracle/MySQL.com bug: http://bugs.mysql.com/bug.php?id=63166 It also crashed: Server version: 5.5.17 MySQL Community Server (GPL) from mysql-5.5.17-linux2.6-x86_64.tar.gz
            Hide
            peterstigedwards Peter (Stig) Edwards added a comment -

            Re: crash when updating tables with foreign keys
            It does not crash when run with --debug after having been rebuilt using BUILD/compile-pentium64-debug-max. It outputs:

            ERROR 1217 (23000) at line 7: Cannot delete or update a parent row: a foreign key constraint fails

            Show
            peterstigedwards Peter (Stig) Edwards added a comment - Re: crash when updating tables with foreign keys It does not crash when run with --debug after having been rebuilt using BUILD/compile-pentium64-debug-max. It outputs: ERROR 1217 (23000) at line 7: Cannot delete or update a parent row: a foreign key constraint fails
            Hide
            peterstigedwards Peter (Stig) Edwards added a comment -

            Re: crash when updating tables with foreign keys
            If run twice when run with --debug after having been rebuilt using BUILD/compile-pentium64-debug-max, it crashes on the 2nd run.

            Show
            peterstigedwards Peter (Stig) Edwards added a comment - Re: crash when updating tables with foreign keys If run twice when run with --debug after having been rebuilt using BUILD/compile-pentium64-debug-max, it crashes on the 2nd run.
            Hide
            peterstigedwards Peter (Stig) Edwards added a comment -

            Re: crash when updating tables with foreign keys
            From comments in:
            http://bugs.mysql.com/bug.php?id=63166
            and
            https://bugs.launchpad.net/percona-server/+bug/888446
            it looks like this is fixed in MariaDB 5.2.10 and 5.3.3, from the changelogs:
            Cherrypick into XtraDB: Bug#13002783 PARTIALLY UNINITIALIZED CASCADE UPDATE VECTOR
            Thank you.

            Show
            peterstigedwards Peter (Stig) Edwards added a comment - Re: crash when updating tables with foreign keys From comments in: http://bugs.mysql.com/bug.php?id=63166 and https://bugs.launchpad.net/percona-server/+bug/888446 it looks like this is fixed in MariaDB 5.2.10 and 5.3.3, from the changelogs: Cherrypick into XtraDB: Bug#13002783 PARTIALLY UNINITIALIZED CASCADE UPDATE VECTOR Thank you.
            Hide
            ratzpo Rasmus Johansson added a comment -

            Launchpad bug id: 888165

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

              People

              • Assignee:
                Unassigned
                Reporter:
                peterstigedwards Peter (Stig) Edwards
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: