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

SIGSEGV in free () from _dl_close_worker | SIGSEGV in __GI___pthread_mutex_lock from dl-init

    XMLWordPrintable

    Details

      Description

      These queries sporadically (it needs about 100 repeats to reproduce) leads to:

      10.2.34 (Debug)

      Core was generated by `/test/MD110920-mariadb-10.2.34-linux-x86_64-dbg/bin/mysqld --no-defaults --core'.
      Program terminated with signal SIGSEGV, Segmentation fault.
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=11)
          at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
      [Current thread is 1 (Thread 0x14c24b6da700 (LWP 873653))]
      (gdb) bt
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=11) at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
      #1  0x0000563052347677 in my_write_core (sig=sig@entry=11) at /test/10.2_dbg/mysys/stacktrace.c:382
      #2  0x0000563051c7db4c in handle_fatal_signal (sig=11) at /test/10.2_dbg/sql/signal_handler.cc:343
      #3  <signal handler called>
      #4  0x000014c24b361fac in free () from /usr/lib/x86_64-linux-gnu/libjemalloc.so.1
      #5  0x000014c1c96290fd in ?? () from /usr/lib/x86_64-linux-gnu/libp11-kit.so.0
      #6  0x000014c24b5a9ccc in _dl_close_worker (map=map@entry=0x14c22393c600, force=force@entry=false) at dl-close.c:288
      #7  0x000014c24b5aaafa in _dl_close_worker (force=false, map=0x14c22393c600) at dl-close.c:125
      #8  _dl_close (_map=0x14c22393c600) at dl-close.c:842
      #9  0x000014c249aa051f in __GI__dl_catch_exception (exception=exception@entry=0x14c24b6d6490, operate=operate@entry=0x14c24a671070 <dlclose_doit>, args=args@entry=0x14c
      22393c600) at dl-error-skeleton.c:196
      #10 0x000014c249aa05af in __GI__dl_catch_error (objname=objname@entry=0x14c223051250, errstring=errstring@entry=0x14c223051258, mallocedp=mallocedp@entry=0x14c223051248
      , operate=operate@entry=0x14c24a671070 <dlclose_doit>, args=args@entry=0x14c22393c600) at dl-error-skeleton.c:215
      #11 0x000014c24a671745 in _dlerror_run (operate=operate@entry=0x14c24a671070 <dlclose_doit>, args=0x14c22393c600) at dlerror.c:162
      #12 0x000014c24a6710b3 in __dlclose (handle=<optimized out>) at dlclose.c:46
      #13 0x0000563051a8bf23 in free_plugin_mem (p=p@entry=0x14c24b6d65c0) at /test/10.2_dbg/sql/sql_plugin.cc:511
      #14 0x0000563051a8da2f in plugin_dl_add (dl=dl@entry=0x14c24b6d6c50, report=report@entry=2) at /test/10.2_dbg/sql/sql_plugin.cc:859
      #15 0x0000563051a8f18b in plugin_dl_foreach (thd=thd@entry=0x14c223015070, dl=dl@entry=0x14c24b6d6c50, func=func@entry=0x563051af90d1 <show_plugins(THD*, plugin_ref, vo
      id*)>, arg=arg@entry=0x14c223a2f088) at /test/10.2_dbg/sql/sql_plugin.cc:2464
      #16 0x0000563051b0008c in fill_all_plugins (thd=0x14c223015070, tables=<optimized out>, cond=<optimized out>) at /test/10.2_dbg/sql/sql_show.cc:344
      #17 0x0000563051b07902 in get_schema_tables_result (join=join@entry=0x14c223060a00, executed_place=executed_place@entry=PROCESSED_BY_JOIN_EXEC) at /test/10.2_dbg/sql/sql_show.cc:8467
      #18 0x0000563051ae99a4 in JOIN::exec_inner (this=this@entry=0x14c223060a00) at /test/10.2_dbg/sql/sql_select.cc:3602
      #19 0x0000563051ae99f7 in JOIN::exec (this=this@entry=0x14c223060a00) at /test/10.2_dbg/sql/sql_select.cc:3433
      #20 0x0000563051aea40d in mysql_select (thd=thd@entry=0x14c223015070, tables=0x14c22305f3a8, wild_num=0, fields=@0x14c2230194d0: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x14c22305f328, last = 0x14c22305f328, elements = 1}, <No data fields>}, conds=0x0, og_num=<optimized out>, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2684619520, result=0x14c2230609e0, unit=0x14c223018c68, select_lex=0x14c2230193a8) at /test/10.2_dbg/sql/sql_select.cc:3833
      #21 0x0000563051aea654 in handle_select (thd=thd@entry=0x14c223015070, lex=lex@entry=0x14c223018ba8, result=result@entry=0x14c2230609e0, setup_tables_done_option=setup_tables_done_option@entry=0) at /test/10.2_dbg/sql/sql_select.cc:361
      #22 0x0000563051a71882 in execute_sqlcom_select (thd=thd@entry=0x14c223015070, all_tables=0x14c22305f3a8) at /test/10.2_dbg/sql/sql_parse.cc:6218
      #23 0x0000563051a7b804 in mysql_execute_command (thd=thd@entry=0x14c223015070) at /test/10.2_dbg/sql/sql_parse.cc:3524
      #24 0x0000563051a84bc8 in mysql_parse (thd=thd@entry=0x14c223015070, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x14c24b6d8fd0, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.2_dbg/sql/sql_parse.cc:7733
      #25 0x0000563051a87843 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x14c223015070, packet=packet@entry=0x14c223053071 "SELECT COUNT(*) FROM INFORMATION_SCHEMA.ALL_PLUGINS", packet_length=packet_length@entry=51, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.2_dbg/sql/sql_parse.cc:1823
      #26 0x0000563051a8a75e in do_command (thd=0x14c223015070) at /test/10.2_dbg/sql/sql_parse.cc:1377
      #27 0x0000563051b8aa1f in do_handle_one_connection (connect=connect@entry=0x14c248465a30) at /test/10.2_dbg/sql/sql_connect.cc:1336
      #28 0x0000563051b8ac4c in handle_one_connection (arg=0x14c248465a30) at /test/10.2_dbg/sql/sql_connect.cc:1241
      #29 0x000014c24a4586db in start_thread (arg=0x14c24b6da700) at pthread_create.c:463
      #30 0x000014c249a5aa3f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Bug confirmed present in:
      MariaDB: 10.2.34 (dbg), 10.2.34 (opt), 10.3.25 (dbg), 10.3.25 (opt), 10.4.15 (dbg), 10.4.15 (opt)

      Bug confirmed not present in:
      MariaDB: 10.1.47 (dbg), 10.1.47 (opt), 10.5.6 (dbg), 10.5.6 (opt), 10.6.0 (dbg), 10.6.0 (opt)

      Server log.
      Core files.

        Attachments

        1. master.err
          180 kB
          Stepan Patryshev
        2. queries.sql
          3.98 MB
          Stepan Patryshev

          Activity

            People

            Assignee:
            serg Sergei Golubchik
            Reporter:
            stepan.patryshev Stepan Patryshev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:

                Git Integration