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

LP:884101 - Crash in check_table_is_closed with concurrent workload

    Details

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

      Description

      When executing a concurrent workload involving CREATE and DROP on per-thread tables, the server crashed as follows:

      1. 2011-10-29T06:01:37 #4 0x0000000000971837 in check_table_is_closed (
      2. 2011-10-29T06:01:37 name=0x7f254c0828e0 "./transforms/where_subselect_31133",
      3. 2011-10-29T06:01:37 where=0xe36557 "delete") at mi_dbug.c:179
      4. 2011-10-29T06:01:37 #5 0x000000000098f2e8 in mi_delete_table (
      5. 2011-10-29T06:01:37 name=0x7f254c0828e0 "./transforms/where_subselect_31133")
      6. 2011-10-29T06:01:37 at mi_delete_table.c:66
      7. 2011-10-29T06:01:37 #6 0x000000000093c314 in ha_myisam::delete_table (this=0x7f24c00076f8,
      8. 2011-10-29T06:01:37 name=0x7f254c0828e0 "./transforms/where_subselect_31133")
      9. 2011-10-29T06:01:37 at ha_myisam.cc:2004
      10. 2011-10-29T06:01:37 #7 0x000000000083947e in handler::ha_delete_table (this=0x7f24c00076f8,
      11. 2011-10-29T06:01:37 name=0x7f254c0828e0 "./transforms/where_subselect_31133")
      12. 2011-10-29T06:01:37 at handler.cc:3560
      13. 2011-10-29T06:01:37 #8 0x00000000008363bd in ha_delete_table (thd=0x4927ec8,
      14. 2011-10-29T06:01:37 table_type=0x358d768,
      15. 2011-10-29T06:01:37 path=0x7f254c0828e0 "./transforms/where_subselect_31133",
      16. 2011-10-29T06:01:37 db=0x7f24c00072b8 "transforms",
      17. 2011-10-29T06:01:37 alias=0x7f24c00072c8 "where_subselect_31133", generate_warning=true)
      18. 2011-10-29T06:01:37 at handler.cc:2066
      19. 2011-10-29T06:01:37 #9 0x0000000000859a79 in mysql_rm_table_part2 (thd=0x4927ec8,
      20. 2011-10-29T06:01:37 tables=0x7f24c0007320, if_exists=false, drop_temporary=false,
      21. 2011-10-29T06:01:37 drop_view=false, dont_log_query=false) at sql_table.cc:2067
      22. 2011-10-29T06:01:37 #10 0x000000000085903e in mysql_rm_table (thd=0x4927ec8,
      23. 2011-10-29T06:01:37 tables=0x7f24c0007320, if_exists=0 '\000', drop_temporary=0 '\000')
      24. 2011-10-29T06:01:37 at sql_table.cc:1845
      25. 2011-10-29T06:01:37 #11 0x00000000006c2d6b in mysql_execute_command (thd=0x4927ec8)
      26. 2011-10-29T06:01:37 at sql_parse.cc:3411
      27. 2011-10-29T06:01:37 #12 0x00000000006cb25f in mysql_parse (thd=0x4927ec8,
      28. 2011-10-29T06:01:37 rawbuf=0x7f24c00071f0 "DROP TABLE transforms.where_subselect_31133",
      29. 2011-10-29T06:01:37 length=43, found_semicolon=0x7f254c083c68) at sql_parse.cc:6112
      30. 2011-10-29T06:01:37 #13 0x00000000006bcccb in dispatch_command (command=COM_QUERY, thd=0x4927ec8,
      31. 2011-10-29T06:01:37 packet=0x492bb99 "DROP TABLE transforms.where_subselect_31133",
      32. 2011-10-29T06:01:37 packet_length=43) at sql_parse.cc:1221
      33. 2011-10-29T06:01:37 #14 0x00000000006bc04b in do_command (thd=0x4927ec8) at sql_parse.cc:916
      34. 2011-10-29T06:01:37 #15 0x00000000006b8f27 in handle_one_connection (arg=0x4927ec8)
      35. 2011-10-29T06:01:37 at sql_connect.cc:1191
      36. 2011-10-29T06:01:37 #16 0x00000035a7207761 in start_thread () from /lib64/libpthread.so.0
      37. 2011-10-29T06:01:37 #17 0x00000035a6ee098d in clone () from /lib64/libc.so.6

      Each thread operates on a separate set of tables so there are no concurrent DDL statements that involve the same table.

      RQG command line:

      perl runall.pl -queries=100000000 --debug --mysqld1=sql_mode=ONLY_FULL_GROUP_BY --queries=100M --duration=600 --threads=4 --seed=time --mysqld1=log-output=file --no-mask --reporter=QueryTimeout,Backtrace,ErrorLog,Deadlock --mysqld1=optimizer_switch=derived_merge=ON,derived_with_keys=ON,index_condition_pushdown=ON,mrr=ON,mrr_sort_keys=ON,semijoin=ON,subquery_cache=OFF,join_cache_hashed=ON,materialization=OFF --validator=Transformer --transformers=DisableChosenPlan,ExecuteAsPreparedOnce,ExecuteAsView,ExecuteAsWhereSubquery,ExecuteAsDerived,ConvertTablesToViews,ConvertTablesToDerived --mysqld1=-join_cache_level=1 --views=TEMPTABLE --engine=MyISAM --varchar-length=48 --grammar=conf/optimizer/optimizer_no_subquery_simple.yy --seed=1319856919 --basedir1=/home/philips/bzr/maria-5.3

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            philipstoev Philip Stoev added a comment -

            core + binary + vardir
            LPexportBug884101_var-bug884101.zip

            Show
            philipstoev Philip Stoev added a comment - core + binary + vardir LPexportBug884101_var-bug884101.zip
            Hide
            philipstoev Philip Stoev added a comment -

            Re: Crash in check_table_is_closed with concurrent workload

            Show
            philipstoev Philip Stoev added a comment - Re: Crash in check_table_is_closed with concurrent workload
            Hide
            philipstoev Philip Stoev added a comment -

            Re: Crash in check_table_is_closed with concurrent workload
            revision-id: psergey@askmonty.org-20111028083836-jwh249qb145upw11
            date: 2011-10-28 12:38:36 +0400
            build-date: 2011-10-31 11:26:39 +0200
            revno: 3258
            branch-nick: maria-5.3

            Show
            philipstoev Philip Stoev added a comment - Re: Crash in check_table_is_closed with concurrent workload revision-id: psergey@askmonty.org-20111028083836-jwh249qb145upw11 date: 2011-10-28 12:38:36 +0400 build-date: 2011-10-31 11:26:39 +0200 revno: 3258 branch-nick: maria-5.3
            Hide
            monty Michael Widenius added a comment -

            Re: Crash in check_table_is_closed with concurrent workload
            I have now added a mutex to protect the structure that caused a crash.
            I tried to repeat the original problem for some time, but was not successful with that.
            I also did run the test for couple of hours after adding the patch without any core dumping issues, so I
            assume this should now be fixed.

            Show
            monty Michael Widenius added a comment - Re: Crash in check_table_is_closed with concurrent workload I have now added a mutex to protect the structure that caused a crash. I tried to repeat the original problem for some time, but was not successful with that. I also did run the test for couple of hours after adding the patch without any core dumping issues, so I assume this should now be fixed.
            Hide
            ratzpo Rasmus Johansson added a comment -

            Launchpad bug id: 884101

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

              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: