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

LP:422550 - Crash in PBXT during shutdown

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Resolution: Fixed
    • None
    • None
    • None

    Description

      I have a problem with PBXT crashing sometimes during shutdown.

      To reproduce, run the following command in a build of lp:maria:

      mkdir -p /tmp/x && sql/mysqld --no-defaults --basedir=$(pwd) --character-sets-dir=$(pwd)/sql/share/charsets --language=$(pwd)/sql/share/english --skip-networking --datadir=/tmp/x --skip-grant-tables --nonexistentoption

      This is supposed to complain about bad --nonexistentoption, and exit.

      Instead, in about 75% of cases it crashes during shutdown .

      Basically, it crashes when the thread that calls xt_init_databases() is
      different from the thread that calls xt_stop_database_threads(),
      xt_exit_databases(), and db_finalize(). For some reason, this is usually, but
      not always, done in different threads in this scenario.

      Here is the stack trace:

      ==16085== Invalid read of size 4
      ==16085== at 0x9DFB78: xt_sl_delete(XTThread*, XTSortedList*, void*) (sortedlist_xt.cc:205)
      ==16085== by 0xA14461: db_finalize(XTThread*, void*) (database_xt.cc:323)
      ==16085== by 0x9C340E: xt_heap_release(XTThread*, XTHeap*) (heap_xt.cc:110)
      ==16085== by 0xA133AA: xt_unuse_database(XTThread*, XTThread*) (database_xt.cc:662)
      ==16085== by 0xA1341C: xt_db_exit_thread(XTThread*) (database_xt.cc:682)
      ==16085== by 0x9F6F07: thr_exit(XTThread*) (thread_xt.cc:1051)
      ==16085== by 0x9F711A: xt_free_thread(XTThread*) (thread_xt.cc:1445)
      ==16085== by 0x9F9345: thr_main (thread_xt.cc:1028)
      ==16085== by 0x50463F6: start_thread (pthread_create.c:297)
      ==16085== by 0x6026B3C: clone (in /usr/lib/debug/libc-2.7.so)
      ==16085== Address 0x44 is not stack'd, malloc'd or (recently) free'd

      So, I do not know why the thread is sometimes the same and sometimes not in
      startup and shutdown. I guess it is some kind of race condition?

      Attachments

        Activity

          People

            Unassigned Unassigned
            knielsen Kristian Nielsen
            Votes:
            0 Vote for this issue
            Watchers:
            0 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.