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

SIGSEGV in __memmove_avx_unaligned_erms/memcpy from _my_b_write on CREATE after RESET MASTER

    XMLWordPrintable

    Details

      Description

      # mysqld options required for replay: --log-bin 
      RESET MASTER TO 5000000000;
      CREATE DATABASE a;
      

      Leads to:

      10.5.3 f544a712c8a2ef3f3ecba80cb2782b1839fb36ab

      Core was generated by `/test/MD010520-mariadb-10.5.3-linux-x86_64-opt/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 0x7f5590352700 (LWP 1193316))]
      (gdb) bt
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=11) at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
      #1  0x0000556d52e73ac7 in my_write_core (sig=sig@entry=11) at /test/10.5_opt/mysys/stacktrace.c:518
      #2  0x0000556d528357ca in handle_fatal_signal (sig=11) at /test/10.5_opt/sql/signal_handler.cc:329
      #3  <signal handler called>
      #4  __memmove_avx_unaligned_erms () at ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:371
      #5  0x0000556d52e531c1 in memcpy (__len=18446604068837093352, __src=0x7f55903503b0, __dest=<optimized out>) at /usr/include/x86_64-linux-gnu/bits/string_fortified.h:34
      #6  _my_b_write (info=0x556d53a002e0 <mysql_bin_log+800>, Buffer=0x7f55903503b0 "\246ۯ^\242d", Count=Count@entry=19) at /test/10.5_opt/mysys/mf_iocache.c:607
      #7  0x0000556d52e53a7c in my_b_write (Count=19, Buffer=<optimized out>, info=<optimized out>) at /test/10.5_opt/include/my_sys.h:537
      #8  my_b_safe_write (info=<optimized out>, Buffer=<optimized out>, Count=Count@entry=19) at /test/10.5_opt/mysys/mf_iocache.c:1860
      #9  0x0000556d5292ef56 in Log_event_writer::write_internal (this=0x7f55903504e0, pos=<optimized out>, len=19) at /test/10.5_opt/sql/log_event_server.cc:802
      #10 0x0000556d52935a98 in Log_event_writer::write_header (this=0x7f55903504e0, pos=pos@entry=0x7f55903503b0 "\246ۯ^\242d", len=len@entry=19) at /test/10.5_opt/sql/log_event_server.cc:896
      #11 0x0000556d52936095 in Log_event::write_header (this=this@entry=0x7f55903505a0, event_data_length=event_data_length@entry=19) at /test/10.5_opt/sql/log_event_server.cc:989
      #12 0x0000556d52936cfc in Gtid_log_event::write (this=0x7f55903505a0) at /test/10.5_opt/sql/log_event_server.cc:3340
      #13 0x0000556d529123f9 in Log_event_writer::write (ev=0x7f55903505a0, this=0x7f55903504e0) at /test/10.5_opt/sql/log_event.h:5736
      #14 MYSQL_BIN_LOG::write_event (this=this@entry=0x556d539fffc0 <mysql_bin_log>, ev=ev@entry=0x7f55903505a0, cache_data=cache_data@entry=0x0, file=file@entry=0x556d53a002e0 <mysql_bin_log+800>) at /test/10.5_opt/sql/log.cc:5447
      #15 0x0000556d5291340b in MYSQL_BIN_LOG::write_event (ev=0x7f55903505a0, this=0x556d539fffc0 <mysql_bin_log>) at /test/10.5_opt/sql/log.h:821
      #16 MYSQL_BIN_LOG::write_gtid_event (this=this@entry=0x556d539fffc0 <mysql_bin_log>, thd=thd@entry=0x7f5556812018, standalone=standalone@entry=true, is_transactional=is_transactional@entry=false, commit_id=commit_id@entry=0) at /test/10.5_opt/sql/log.cc:6279
      #17 0x0000556d52922ea8 in MYSQL_BIN_LOG::write (this=0x556d539fffc0 <mysql_bin_log>, event_info=event_info@entry=0x7f5590350ba0, with_annotate=with_annotate@entry=0x0) at /test/10.5_opt/sql/log.cc:6585
      #18 0x0000556d52601236 in mysql_create_db_internal (thd=0x7f5556812018, db=0x7f5556816b18, options=..., create_info=create_info@entry=0x7f5590350f30, silent=silent@entry=false) at /test/10.5_opt/sql/sql_db.cc:745
      #19 0x0000556d52601529 in mysql_create_db (thd=thd@entry=0x7f5556812018, db=db@entry=0x7f5556816b18, options=..., create_info=create_info@entry=0x7f5556817310) at /test/10.5_opt/sql/sql_db.cc:826
      #20 0x0000556d52640358 in mysql_execute_command (thd=thd@entry=0x7f5556812018) at /test/10.5_opt/sql/sql_parse.cc:5093
      #21 0x0000556d5264722c in mysql_parse (thd=0x7f5556812018, rawbuf=<optimized out>, length=17, parser_state=0x7f55903514d0, is_com_multi=<optimized out>, is_next_command=<optimized out>) at /test/10.5_opt/sql/sql_parse.cc:7957
      #22 0x0000556d5263c855 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x7f5556812018, packet=packet@entry=0x7f555683a019 "CREATE DATABASE a", packet_length=packet_length@entry=17, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.5_opt/sql/sql_parse.cc:1839
      #23 0x0000556d5263aae6 in do_command (thd=0x7f5556812018) at /test/10.5_opt/sql/sql_parse.cc:1358
      #24 0x0000556d5272f29e in do_handle_one_connection (connect=<optimized out>, connect@entry=0x7f558e032ad8, put_in_cache=put_in_cache@entry=true) at /test/10.5_opt/sql/sql_connect.cc:1422
      #25 0x0000556d5272f444 in handle_one_connection (arg=arg@entry=0x7f558e032ad8) at /test/10.5_opt/sql/sql_connect.cc:1319
      #26 0x0000556d52a9b53a in pfs_spawn_thread (arg=0x7f558e04b018) at /test/10.5_opt/storage/perfschema/pfs.cc:2201
      #27 0x00007f558f7c46db in start_thread (arg=0x7f5590352700) at pthread_create.c:463
      #28 0x00007f558ebc288f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Bug confirmed present in:
      MariaDB: 10.1.45 (dbg), 10.1.45 (opt), 10.2.32 (dbg), 10.2.32 (opt), 10.3.23 (dbg), 10.3.23 (opt), 10.4.13 (dbg), 10.4.13 (opt), 10.5.2 (dbg), 10.5.2 (opt), 10.5.3 (dbg), 10.5.3 (opt)

      Bug confirmed not present in:

      MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.47 (dbg), 5.6.47 (opt), 5.7.29 (dbg), 5.7.29 (opt), 8.0.19 (dbg), 8.0.19 (opt)

      Looks a lot like MDEV-17977, though that testcase seems to not crash 10.5.3.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              sujatha.sivakumar Sujatha Sivakumar
              Reporter:
              Roel Roel Van de Paar
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: