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

SIGSEGV in flush_tables_with_read_lock on FTWRL or FTFE | SIGSEGV in ha_maria::extra

    XMLWordPrintable

Details

    Description

      Similar to MDEV-25837 but not the same stack. This crashes optimized builds also.

      CREATE VIEW v AS SELECT 1 FROM (SELECT 1) AS d;
      FLUSH TABLE v WITH READ LOCK;
      

      Leads to:

      10.6.2 6c39eaeb126328e7813b146ecf652d51e4508981 (Debug)

      Core was generated by `/test/MD120621-mariadb-10.6.2-linux-x86_64-dbg/bin/mysqld --no-defaults --core-'.
      Program terminated with signal SIGSEGV, Segmentation fault.
      #0  0x0000555e54592a4e in flush_tables_with_read_lock (thd=thd@entry=
          0x152928000db8, all_tables=<optimized out>)
          at /test/10.6_dbg/sql/table.h:2755
      2755	  bool is_view() const { return (derived_type & DTYPE_VIEW); }
      [Current thread is 1 (Thread 0x152964d70700 (LWP 1650774))]
      (gdb) bt
      #0  0x0000555e54592a4e in flush_tables_with_read_lock (thd=thd@entry=0x152928000db8, all_tables=<optimized out>) at /test/10.6_dbg/sql/table.h:2755
      #1  0x0000555e543fe6f3 in mysql_execute_command (thd=thd@entry=0x152928000db8) at /test/10.6_dbg/sql/sql_parse.cc:5397
      #2  0x0000555e543e6890 in mysql_parse (thd=thd@entry=0x152928000db8, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x152964d6f400) at /test/10.6_dbg/sql/sql_parse.cc:8016
      #3  0x0000555e543f53fa in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x152928000db8, packet=packet@entry=0x15292800b769 "FLUSH TABLE v WITH READ LOCK", packet_length=packet_length@entry=28, blocking=blocking@entry=true) at /test/10.6_dbg/sql/sql_class.h:1340
      #4  0x0000555e543f87da in do_command (thd=0x152928000db8, blocking=blocking@entry=true) at /test/10.6_dbg/sql/sql_parse.cc:1406
      #5  0x0000555e5455cc8e in do_handle_one_connection (connect=<optimized out>, connect@entry=0x555e5867f418, put_in_cache=put_in_cache@entry=true) at /test/10.6_dbg/sql/sql_connect.cc:1410
      #6  0x0000555e5455d293 in handle_one_connection (arg=arg@entry=0x555e5867f418) at /test/10.6_dbg/sql/sql_connect.cc:1312
      #7  0x0000555e54a0b166 in pfs_spawn_thread (arg=0x555e58567d08) at /test/10.6_dbg/storage/perfschema/pfs.cc:2201
      #8  0x000015297a0f8609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #9  0x0000152979ce7293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      10.6.2 6c39eaeb126328e7813b146ecf652d51e4508981 (Optimized)

      Core was generated by `/test/MD120621-mariadb-10.6.2-linux-x86_64-opt/bin/mysqld --no-defaults --core-'.
      Program terminated with signal SIGSEGV, Segmentation fault.
      #0  0x00005637f4fe191d in flush_tables_with_read_lock (thd=thd@entry=
          0x1527f0000c58, all_tables=<optimized out>)
          at /test/10.6_opt/sql/table.h:2755
      2755	  bool is_view() const { return (derived_type & DTYPE_VIEW); }
      [Current thread is 1 (Thread 0x152828c84700 (LWP 2224119))]
      (gdb) bt
      #0  0x00005637f4fe191d in flush_tables_with_read_lock (thd=thd@entry=0x1527f0000c58, all_tables=<optimized out>) at /test/10.6_opt/sql/table.h:2755
      #1  0x00005637f4eba49c in mysql_execute_command (thd=0x1527f0000c58) at /test/10.6_opt/sql/sql_parse.cc:5397
      #2  0x00005637f4ea73f4 in mysql_parse (thd=0x1527f0000c58, rawbuf=<optimized out>, length=<optimized out>, parser_state=<optimized out>) at /test/10.6_opt/sql/sql_parse.cc:8016
      #3  0x00005637f4eb3295 in dispatch_command (command=COM_QUERY, thd=0x1527f0000c58, packet=<optimized out>, packet_length=<optimized out>, blocking=<optimized out>) at /test/10.6_opt/sql/sql_class.h:1340
      #4  0x00005637f4eb51f7 in do_command (thd=0x1527f0000c58, blocking=blocking@entry=true) at /test/10.6_opt/sql/sql_parse.cc:1406
      #5  0x00005637f4fc3057 in do_handle_one_connection (connect=<optimized out>, put_in_cache=true) at /test/10.6_opt/sql/sql_connect.cc:1410
      #6  0x00005637f4fc33bd in handle_one_connection (arg=arg@entry=0x5637f7b26f68) at /test/10.6_opt/sql/sql_connect.cc:1312
      #7  0x00005637f534c8f8 in pfs_spawn_thread (arg=0x5637f7ad58c8) at /test/10.6_opt/storage/perfschema/pfs.cc:2201
      #8  0x000015283f039609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #9  0x000015283ec28293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Bug confirmed present in:
      MariaDB: 10.6.2 (dbg), 10.6.2 (opt)

      Bug (or feature/syntax) confirmed not present in:
      MariaDB: 10.2.38 (dbg), 10.2.38 (opt), 10.3.29 (dbg), 10.3.29 (opt), 10.4.19 (dbg), 10.4.19 (opt), 10.5.10 (dbg), 10.5.10 (opt)
      MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.51 (dbg), 5.6.51 (opt), 5.7.34 (dbg), 5.7.34 (opt), 8.0.24 (dbg), 8.0.24 (opt)

      Attachments

        Issue Links

          Activity

            People

              serg Sergei Golubchik
              Roel Roel Van de Paar
              Votes:
              0 Vote for this issue
              Watchers:
              5 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.