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

SIGSEGV in mach_read_from_n_little_endian

Details

    Description

      CREATE TABLE t (a INT,b INT,c INT,d INT,e INT,f INT GENERATED ALWAYS AS (a+b)VIRTUAL,g INT,h BLOB,i INT,UNIQUE KEY(d,h));
      INSERT INTO t (a,b)VALUES(0,0), (0,0), (0,0), (0,0), (0,0);
      

      Leads to:

      10.6.0 74281fe1fb0faf444aec3744b90995156f9f58f9 (Optimized)

      Core was generated by `/test/GAL_MD240221-mariadb-10.6.0-linux-x86_64-opt/bin/mysqld --defaults-file=/'.
      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:56
      [Current thread is 1 (Thread 0x14ef68a6d700 (LWP 4112753))]
      (gdb) bt
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=11) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      #1  0x0000562f7c00a67f in my_write_core (sig=sig@entry=11) at /test/10.6_opt/mysys/stacktrace.c:424
      #2  0x0000562f7ba7c510 in handle_fatal_signal (sig=11) at /test/10.6_opt/sql/signal_handler.cc:331
      #3  <signal handler called>
      #4  mach_read_from_n_little_endian (buf_size=<optimized out>, buf=0x14ef0c01bfae "") at /test/10.6_opt/storage/innobase/include/mach0data.ic:666
      #5  row_mysql_read_blob_ref (len=len@entry=0x14ef68a69ca0, ref=ref@entry=0x14ef0c01bfae "", col_len=<optimized out>) at /test/10.6_opt/storage/innobase/row/row0mysql.cc:269
      #6  0x0000562f7bd9689f in wsrep_calc_row_hash (digest=digest@entry=0x14ef68a6aaf0 "", row=row@entry=0x14ef0c01bf98 "\334\377", table=0x14ef0c01aec8, prebuilt=<optimized out>) at /test/10.6_opt/storage/innobase/handler/ha_innodb.cc:8035
      #7  0x0000562f7bda2e75 in ha_innobase::wsrep_append_keys (this=0x14ef0c025ce0, thd=0x14ef0c000c58, key_type=<optimized out>, record0=0x14ef0c01bf98 "\334\377", record1=0x0) at /test/10.6_opt/storage/innobase/handler/ha_innodb.cc:9852
      #8  0x0000562f7bdadcc9 in ha_innobase::write_row (this=0x14ef0c025ce0, record=0x14ef0c01bf98 "\334\377") at /test/10.6_opt/storage/innobase/handler/ha_innodb.cc:7534
      #9  0x0000562f7ba8b358 in handler::ha_write_row (this=0x14ef0c025ce0, buf=0x14ef0c01bf98 "\334\377") at /test/10.6_opt/sql/handler.cc:7153
      #10 0x0000562f7b830c8d in write_record (thd=thd@entry=0x14ef0c000c58, table=table@entry=0x14ef0c01aec8, info=info@entry=0x14ef68a6bb80, sink=sink@entry=0x0) at /test/10.6_opt/sql/sql_insert.cc:2106
      #11 0x0000562f7b837767 in mysql_insert (thd=thd@entry=0x14ef0c000c58, table_list=<optimized out>, fields=@0x14ef0c005b10: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x14ef0c010db0, last = 0x14ef0c010f08, elements = 2}, <No data fields>}, values_list=@0x14ef0c005b58: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x14ef0c0114f8, last = 0x14ef0c011b18, elements = 5}, <No data fields>}, update_fields=@0x14ef0c005b40: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x562f7c96af50 <end_of_list>, last = 0x14ef0c005b40, elements = 0}, <No data fields>}, update_values=@0x14ef0c005b28: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x562f7c96af50 <end_of_list>, last = 0x14ef0c005b28, elements = 0}, <No data fields>}, duplic=<optimized out>, ignore=<optimized out>, result=<optimized out>) at /test/10.6_opt/sql/sql_insert.cc:1099
      #12 0x0000562f7b870c92 in mysql_execute_command (thd=0x14ef0c000c58) at /test/10.6_opt/sql/sql_parse.cc:4519
      #13 0x0000562f7b86083f in mysql_parse (thd=thd@entry=0x14ef0c000c58, rawbuf=rawbuf@entry=0x14ef0c010470 "INSERT INTO t (a,b)VALUES(0,0), (0,0), (0,0), (0,0), (0,0)", length=length@entry=58, parser_state=parser_state@entry=0x14ef68a6c400) at /test/10.6_opt/sql/sql_parse.cc:7972
      #14 0x0000562f7b8602b6 in wsrep_mysql_parse (thd=0x14ef0c000c58, rawbuf=0x14ef0c010470 "INSERT INTO t (a,b)VALUES(0,0), (0,0), (0,0), (0,0), (0,0)", length=58, parser_state=0x14ef68a6c400) at /test/10.6_opt/sql/sql_parse.cc:7786
      #15 0x0000562f7b86d6ee in dispatch_command (command=COM_QUERY, thd=0x14ef0c000c58, packet=0x14ef0c0080d9 "INSERT INTO t (a,b)VALUES(0,0), (0,0), (0,0), (0,0), (0,0)", packet_length=<optimized out>, blocking=<optimized out>) at /test/10.6_opt/sql/sql_class.h:1295
      #16 0x0000562f7b86e136 in do_command (thd=0x14ef0c000c58, blocking=blocking@entry=true) at /test/10.6_opt/sql/sql_parse.cc:1397
      #17 0x0000562f7b9741dd in do_handle_one_connection (connect=<optimized out>, connect@entry=0x562f7dac28a8, put_in_cache=put_in_cache@entry=true) at /test/10.6_opt/sql/sql_connect.cc:1410
      #18 0x0000562f7b97468d in handle_one_connection (arg=arg@entry=0x562f7dac28a8) at /test/10.6_opt/sql/sql_connect.cc:1312
      #19 0x0000562f7bcfb846 in pfs_spawn_thread (arg=0x562f7dac5678) at /test/10.6_opt/storage/perfschema/pfs.cc:2201
      #20 0x000014ef7a428609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #21 0x000014ef7a017293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      10.6.0 208233be5af55072d7ef80c37ddbc664bc51f342 (Debug)

      Core was generated by `/test/GAL_MD230221-mariadb-10.6.0-linux-x86_64-dbg/bin/mysqld --defaults-file=/'.
      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:56
      [Current thread is 1 (Thread 0x153fb00fb700 (LWP 4107995))]
      (gdb) bt
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=11) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      #1  0x000055abea8984db in my_write_core (sig=sig@entry=11) at /test/10.6_dbg/mysys/stacktrace.c:424
      #2  0x000055abea0282df in handle_fatal_signal (sig=11) at /test/10.6_dbg/sql/signal_handler.cc:330
      #3  <signal handler called>
      #4  mach_read_from_n_little_endian (buf_size=18446744073709551612, buf=0x153f3802bf5e "") at /test/10.6_dbg/storage/innobase/include/mach0data.ic:670
      #5  row_mysql_read_blob_ref (len=len@entry=0x153fb00f7c10, ref=ref@entry=0x153f3802bf5e "", col_len=4) at /test/10.6_dbg/storage/innobase/row/row0mysql.cc:269
      #6  0x000055abea418e78 in wsrep_calc_row_hash (digest=digest@entry=0x153fb00f8a70 "", row=row@entry=0x153f3802bf48 "\334\377", table=0x153f38034168, prebuilt=0x153f38039058) at /test/10.6_dbg/storage/innobase/handler/ha_innodb.cc:8035
      #7  0x000055abea4255d5 in ha_innobase::wsrep_append_keys (this=this@entry=0x153f3802c3b0, thd=0x153f38000db8, key_type=key_type@entry=WSREP_SERVICE_KEY_EXCLUSIVE, record0=record0@entry=0x153f3802bf48 "\334\377", record1=record1@entry=0x0) at /test/10.6_dbg/storage/innobase/handler/ha_innodb.cc:9852
      #8  0x000055abea43935f in ha_innobase::write_row (this=0x153f3802c3b0, record=0x153f3802bf48 "\334\377") at /test/10.6_dbg/storage/innobase/handler/ha_innodb.cc:7534
      #9  0x000055abea03c76f in handler::ha_write_row (this=0x153f3802c3b0, buf=0x153f3802bf48 "\334\377") at /test/10.6_dbg/sql/handler.cc:7153
      #10 0x000055abe9d10621 in write_record (thd=thd@entry=0x153f38000db8, table=table@entry=0x153f38034168, info=info@entry=0x153fb00f9b90, sink=sink@entry=0x0) at /test/10.6_dbg/sql/sql_insert.cc:2106
      #11 0x000055abe9d1cb8f in mysql_insert (thd=thd@entry=0x153f38000db8, table_list=0x153f38013c80, fields=@0x153f38005e30: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x153f380144a0, last = 0x153f380145f8, elements = 2}, <No data fields>}, values_list=@0x153f38005e78: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x153f38014be8, last = 0x153f38015208, elements = 5}, <No data fields>}, update_fields=@0x153f38005e60: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x55abeb33c240 <end_of_list>, last = 0x153f38005e60, elements = 0}, <No data fields>}, update_values=@0x153f38005e48: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x55abeb33c240 <end_of_list>, last = 0x153f38005e48, elements = 0}, <No data fields>}, duplic=DUP_ERROR, ignore=false, result=0x0) at /test/10.6_dbg/sql/sql_insert.cc:1099
      #12 0x000055abe9d63893 in mysql_execute_command (thd=thd@entry=0x153f38000db8) at /test/10.6_dbg/sql/sql_parse.cc:4519
      #13 0x000055abe9d4e360 in mysql_parse (thd=thd@entry=0x153f38000db8, rawbuf=rawbuf@entry=0x153f38013b60 "INSERT INTO t (a,b)VALUES(0,0), (0,0), (0,0), (0,0), (0,0)", length=length@entry=58, parser_state=parser_state@entry=0x153fb00fa3d0) at /test/10.6_dbg/sql/sql_parse.cc:7972
      #14 0x000055abe9d4dcbc in wsrep_mysql_parse (thd=thd@entry=0x153f38000db8, rawbuf=0x153f38013b60 "INSERT INTO t (a,b)VALUES(0,0), (0,0), (0,0), (0,0), (0,0)", length=58, parser_state=parser_state@entry=0x153fb00fa3d0) at /test/10.6_dbg/sql/sql_parse.cc:7786
      #15 0x000055abe9d5c2a0 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x153f38000db8, packet=packet@entry=0x153f3800b319 "INSERT INTO t (a,b)VALUES(0,0), (0,0), (0,0), (0,0), (0,0)", packet_length=packet_length@entry=58, blocking=blocking@entry=true) at /test/10.6_dbg/sql/sql_class.h:1295
      #16 0x000055abe9d5f70c in do_command (thd=0x153f38000db8, blocking=blocking@entry=true) at /test/10.6_dbg/sql/sql_parse.cc:1397
      #17 0x000055abe9ebcbf5 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x55abecea2a78, put_in_cache=put_in_cache@entry=true) at /test/10.6_dbg/sql/sql_connect.cc:1410
      #18 0x000055abe9ebd2fb in handle_one_connection (arg=arg@entry=0x55abecea2a78) at /test/10.6_dbg/sql/sql_connect.cc:1312
      #19 0x000055abea3745cd in pfs_spawn_thread (arg=0x55abecf1a308) at /test/10.6_dbg/storage/perfschema/pfs.cc:2201
      #20 0x0000153fb3150609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #21 0x0000153fb2d3f293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      10.5.10 85bec9d691bb69ed20beb565b03d5585b94624fe (Optimized)

      Core was generated by `/test/GAL_MD240221-mariadb-10.5.10-linux-x86_64-opt/bin/mysqld --defaults-file='.
      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:56
      [Current thread is 1 (Thread 0x149a50c4b700 (LWP 4113084))]
      (gdb) bt
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=11) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      #1  0x0000564586ce82ef in my_write_core (sig=sig@entry=11) at /test/10.5_opt/mysys/stacktrace.c:424
      #2  0x0000564586713b80 in handle_fatal_signal (sig=11) at /test/10.5_opt/sql/signal_handler.cc:330
      #3  <signal handler called>
      #4  mach_read_from_n_little_endian (buf_size=<optimized out>, buf=0x1499f401bebe "") at /test/10.5_opt/storage/innobase/include/mach0data.ic:665
      #5  row_mysql_read_blob_ref (len=len@entry=0x149a50c47c60, ref=ref@entry=0x1499f401bebe "", col_len=<optimized out>) at /test/10.5_opt/storage/innobase/row/row0mysql.cc:270
      #6  0x0000564586a2ec7f in wsrep_calc_row_hash (digest=digest@entry=0x149a50c48ab0 "", row=row@entry=0x1499f401bea8 "\334\377", table=0x1499f401add8, prebuilt=<optimized out>) at /test/10.5_opt/storage/innobase/handler/ha_innodb.cc:8213
      #7  0x0000564586a3c665 in ha_innobase::wsrep_append_keys (this=0x1499f40259e0, thd=0x1499f4000c58, key_type=<optimized out>, record0=0x1499f401bea8 "\334\377", record1=0x0) at /test/10.5_opt/storage/innobase/handler/ha_innodb.cc:10036
      #8  0x0000564586a48244 in ha_innobase::write_row (this=0x1499f40259e0, record=0x1499f401bea8 "\334\377") at /test/10.5_opt/storage/innobase/handler/ha_innodb.cc:7712
      #9  0x00005645867229c8 in handler::ha_write_row (this=0x1499f40259e0, buf=0x1499f401bea8 "\334\377") at /test/10.5_opt/sql/handler.cc:7153
      #10 0x00005645864c837d in write_record (thd=thd@entry=0x1499f4000c58, table=table@entry=0x1499f401add8, info=info@entry=0x149a50c49b40, sink=sink@entry=0x0) at /test/10.5_opt/sql/sql_insert.cc:2106
      #11 0x00005645864cedd7 in mysql_insert (thd=thd@entry=0x1499f4000c58, table_list=<optimized out>, fields=@0x1499f4005ae8: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x1499f4010d00, last = 0x1499f4010e58, elements = 2}, <No data fields>}, values_list=@0x1499f4005b30: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x1499f4011448, last = 0x1499f4011a68, elements = 5}, <No data fields>}, update_fields=@0x1499f4005b18: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x56458764ee30 <end_of_list>, last = 0x1499f4005b18, elements = 0}, <No data fields>}, update_values=@0x1499f4005b00: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x56458764ee30 <end_of_list>, last = 0x1499f4005b00, elements = 0}, <No data fields>}, duplic=<optimized out>, ignore=<optimized out>, result=<optimized out>) at /test/10.5_opt/sql/sql_insert.cc:1099
      #12 0x0000564586508992 in mysql_execute_command (thd=0x1499f4000c58) at /test/10.5_opt/sql/sql_parse.cc:4597
      #13 0x00005645864f7f0f in mysql_parse (thd=thd@entry=0x1499f4000c58, rawbuf=rawbuf@entry=0x1499f40103c0 "INSERT INTO t (a,b)VALUES(0,0), (0,0), (0,0), (0,0), (0,0)", length=length@entry=58, parser_state=parser_state@entry=0x149a50c4a400, 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:8063
      #14 0x00005645864f794c in wsrep_mysql_parse (thd=0x1499f4000c58, rawbuf=0x1499f40103c0 "INSERT INTO t (a,b)VALUES(0,0), (0,0), (0,0), (0,0), (0,0)", length=58, parser_state=0x149a50c4a400, is_com_multi=<optimized out>, is_next_command=<optimized out>) at /test/10.5_opt/sql/sql_parse.cc:7866
      #15 0x0000564586505607 in dispatch_command (command=COM_QUERY, thd=0x1499f4000c58, packet=<optimized out>, packet_length=<optimized out>, is_com_multi=<optimized out>, is_next_command=<optimized out>) at /test/10.5_opt/sql/sql_class.h:1257
      #16 0x0000564586505ea7 in do_command (thd=0x1499f4000c58) at /test/10.5_opt/sql/sql_parse.cc:1370
      #17 0x000056458660b781 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x5645890fb378, put_in_cache=put_in_cache@entry=true) at /test/10.5_opt/sql/sql_connect.cc:1410
      #18 0x000056458660bbfd in handle_one_connection (arg=arg@entry=0x5645890fb378) at /test/10.5_opt/sql/sql_connect.cc:1312
      #19 0x00005645869944b6 in pfs_spawn_thread (arg=0x564589122b98) at /test/10.5_opt/storage/perfschema/pfs.cc:2201
      #20 0x0000149a63629609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #21 0x0000149a63218293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      10.4.19 245d33db4e0586df4fe28362fb002cef0151a1c9 (Optimized)

      Core was generated by `/test/GAL_MD240221-mariadb-10.4.19-linux-x86_64-opt/bin/mysqld --defaults-file='.
      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:56
      [Current thread is 1 (Thread 0x1505cc06d700 (LWP 4114875))]
      (gdb) bt
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=11) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      #1  0x000055708c60620f in my_write_core (sig=sig@entry=11) at /test/10.4_opt/mysys/stacktrace.c:386
      #2  0x000055708c012df8 in handle_fatal_signal (sig=11) at /test/10.4_opt/sql/signal_handler.cc:344
      #3  <signal handler called>
      #4  mach_read_from_n_little_endian (buf_size=<optimized out>, buf=0x15056001a60e "") at /test/10.4_opt/storage/innobase/include/mach0data.ic:697
      #5  row_mysql_read_blob_ref (len=len@entry=0x1505cc068a00, ref=ref@entry=0x15056001a60e "", col_len=<optimized out>) at /test/10.4_opt/storage/innobase/row/row0mysql.cc:271
      #6  0x000055708c1c9d3f in wsrep_calc_row_hash (digest=digest@entry=0x1505cc069860 "", row=row@entry=0x15056001a5f8 "\334\377", table=0x15056001c4d8, prebuilt=<optimized out>) at /test/10.4_opt/storage/innobase/handler/ha_innodb.cc:8652
      #7  0x000055708c1d9275 in ha_innobase::wsrep_append_keys (this=0x15056001b590, thd=0x150560000c48, key_type=<optimized out>, record0=0x15056001a5f8 "\334\377", record1=0x0) at /test/10.4_opt/storage/innobase/handler/ha_innodb.cc:10532
      #8  0x000055708c1e50d8 in ha_innobase::write_row (this=0x15056001b590, record=0x15056001a5f8 "\334\377") at /test/10.4_opt/storage/innobase/handler/ha_innodb.cc:8151
      #9  0x000055708c020aba in handler::ha_write_row (this=0x15056001b590, buf=0x15056001a5f8 "\334\377") at /test/10.4_opt/sql/handler.cc:6755
      #10 0x000055708bdb5bdd in write_record (thd=thd@entry=0x150560000c48, table=table@entry=0x15056001c4d8, info=info@entry=0x1505cc06a8c0) at /test/10.4_opt/sql/sql_insert.cc:2060
      #11 0x000055708bdc07d1 in mysql_insert (thd=thd@entry=0x150560000c48, table_list=<optimized out>, fields=@0x150560005868: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x1505600108c0, last = 0x1505600109e8, elements = 2}, <No data fields>}, values_list=@0x1505600058b0: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x150560010fc8, last = 0x1505600115a8, elements = 5}, <No data fields>}, update_fields=@0x150560005898: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x55708ce6f3f0 <end_of_list>, last = 0x150560005898, elements = 0}, <No data fields>}, update_values=@0x150560005880: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x55708ce6f3f0 <end_of_list>, last = 0x150560005880, elements = 0}, <No data fields>}, duplic=DUP_ERROR, ignore=false) at /test/10.4_opt/sql/sql_insert.cc:1078
      #12 0x000055708bdf1006 in mysql_execute_command (thd=0x150560000c48) at /test/10.4_opt/sql/sql_parse.cc:4572
      #13 0x000055708bdf3853 in mysql_parse (thd=thd@entry=0x150560000c48, rawbuf=rawbuf@entry=0x15056000ffc0 "INSERT INTO t (a,b)VALUES(0,0), (0,0), (0,0), (0,0), (0,0)", length=length@entry=58, parser_state=parser_state@entry=0x1505cc06c4c0, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.4_opt/sql/sql_parse.cc:7959
      #14 0x000055708bdf41f8 in wsrep_mysql_parse (thd=0x150560000c48, rawbuf=0x15056000ffc0 "INSERT INTO t (a,b)VALUES(0,0), (0,0), (0,0), (0,0), (0,0)", length=58, parser_state=0x1505cc06c4c0, is_com_multi=<optimized out>, is_next_command=<optimized out>) at /test/10.4_opt/sql/sql_parse.cc:7763
      #15 0x000055708bdf79b8 in dispatch_command (command=COM_QUERY, thd=0x150560000c48, packet=<optimized out>, packet_length=<optimized out>, is_com_multi=<optimized out>, is_next_command=<optimized out>) at /test/10.4_opt/sql/sql_class.h:1170
      #16 0x000055708bdf801a in do_command (thd=0x150560000c48) at /test/10.4_opt/sql/sql_parse.cc:1373
      #17 0x000055708beeb3fe in do_handle_one_connection (connect=connect@entry=0x55708f4406d8) at /test/10.4_opt/sql/sql_connect.cc:1412
      #18 0x000055708beeb51f in handle_one_connection (arg=0x55708f4406d8) at /test/10.4_opt/sql/sql_connect.cc:1316
      #19 0x00001505dd405609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #20 0x00001505dcf45293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Bug confirmed present in:
      MariaDB: 10.4.19 (dbg), 10.4.19 (opt), 10.5.10 (dbg), 10.5.10 (opt), 10.6.0 (dbg), 10.6.0 (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)

      Attachments

        Issue Links

          Activity

            Thank you marko for helping reduce the testcase further

            CREATE TABLE t (f INT GENERATED ALWAYS AS (a+b)VIRTUAL,a INT,b INT,h BLOB);
            INSERT INTO t (a,b)VALUES(0,0), (0,0), (0,0), (0,0), (0,0);
            

            ramesh Ramesh Sivaraman added a comment - Thank you marko for helping reduce the testcase further CREATE TABLE t (f INT GENERATED ALWAYS AS (a+b)VIRTUAL,a INT,b INT,h BLOB); INSERT INTO t (a,b)VALUES(0,0), (0,0), (0,0), (0,0), (0,0);
            ramesh Ramesh Sivaraman added a comment - - edited

            Reproduced the crash on 10.2 after making small modification in the testcase

            CREATE TABLE t (a INT,b INT,c INT,d INT,e INT,f INT GENERATED ALWAYS AS (a+b)VIRTUAL,g INT,h BLOB,i INT,UNIQUE KEY(d,h(10)));
            INSERT INTO t (a,b)VALUES(0,0), (0,0), (0,0), (0,0), (0,0);
            

            10.2.38 (Debug)

            Core was generated by `/test/GAL_MD150321-mariadb-10.2.38-linux-x86_64-dbg/bin/mysqld --defaults-file='.
            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:56
            [Current thread is 1 (Thread 0x14fbc80fd700 (LWP 899985))]
            (gdb) bt
            #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=11) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
            #1  0x000055f7a6503828 in my_write_core (sig=sig@entry=11) at /test/10.2_dbg/mysys/stacktrace.c:382
            #2  0x000055f7a5df5bb9 in handle_fatal_signal (sig=11) at /test/10.2_dbg/sql/signal_handler.cc:343
            #3  <signal handler called>
            #4  mach_read_from_n_little_endian (buf_size=<optimized out>, buf=0x14fb58021f36 "") at /test/10.2_dbg/storage/innobase/include/mach0data.ic:701
            #5  row_mysql_read_blob_ref (len=len@entry=0x14fbc80f8b30, ref=ref@entry=0x14fb58021f36 "", col_len=<optimized out>) at /test/10.2_dbg/storage/innobase/row/row0mysql.cc:273
            #6  0x000055f7a5fde6cb in wsrep_calc_row_hash (digest=digest@entry=0x14fbc80f9990 "", row=row@entry=0x14fb58021f20 "\334\377", table=0x14fb58026d20, prebuilt=0x14fb58033d70, thd=thd@entry=0x14fb58000d90) at /test/10.2_dbg/storage/innobase/handler/ha_innodb.cc:8899
            #7  0x000055f7a5fe9a8d in ha_innobase::wsrep_append_keys (this=this@entry=0x14fb58032948, thd=0x14fb58000d90, key_type=key_type@entry=WSREP_KEY_EXCLUSIVE, record0=record0@entry=0x14fb58021f20 "\334\377", record1=record1@entry=0x0) at /test/10.2_dbg/storage/innobase/handler/ha_innodb.cc:10720
            #8  0x000055f7a5ff9ab8 in ha_innobase::write_row (this=0x14fb58032948, record=0x14fb58021f20 "\334\377") at /test/10.2_dbg/storage/innobase/handler/ha_innodb.cc:8396
            #9  0x000055f7a5e03fc0 in handler::ha_write_row (this=0x14fb58032948, buf=0x14fb58021f20 "\334\377") at /test/10.2_dbg/sql/handler.cc:6118
            #10 0x000055f7a5bcb603 in write_record (thd=thd@entry=0x14fb58000d90, table=table@entry=0x14fb58026d20, info=info@entry=0x14fbc80fabf0) at /test/10.2_dbg/sql/sql_insert.cc:1939
            #11 0x000055f7a5bd6baa in mysql_insert (thd=thd@entry=0x14fb58000d90, table_list=0x14fb580112b8, fields=@0x14fb580056b8: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x14fb580119e0, last = 0x14fb58011af8, elements = 2}, <No data fields>}, values_list=@0x14fb58005700: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x14fb58011c70, last = 0x14fb58012250, elements = 5}, <No data fields>}, update_fields=@0x14fb580056e8: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x55f7a6cff960 <end_of_list>, last = 0x14fb580056e8, elements = 0}, <No data fields>}, update_values=@0x14fb580056d0: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x55f7a6cff960 <end_of_list>, last = 0x14fb580056d0, elements = 0}, <No data fields>}, duplic=DUP_ERROR, ignore=false) at /test/10.2_dbg/sql/sql_insert.cc:1066
            #12 0x000055f7a5bef70c in mysql_execute_command (thd=thd@entry=0x14fb58000d90) at /test/10.2_dbg/sql/sql_parse.cc:4221
            #13 0x000055f7a5bf6082 in mysql_parse (thd=thd@entry=0x14fb58000d90, rawbuf=rawbuf@entry=0x14fb58011198 "INSERT INTO t (a,b)VALUES(0,0), (0,0), (0,0), (0,0), (0,0)", length=length@entry=58, parser_state=parser_state@entry=0x14fbc80fc550, 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:7790
            #14 0x000055f7a5bf768b in wsrep_mysql_parse (thd=thd@entry=0x14fb58000d90, rawbuf=0x14fb58011198 "INSERT INTO t (a,b)VALUES(0,0), (0,0), (0,0), (0,0), (0,0)", length=58, parser_state=parser_state@entry=0x14fbc80fc550, 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:7582
            #15 0x000055f7a5bf8be4 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x14fb58000d90, packet=packet@entry=0x14fb580195d1 "INSERT INTO t (a,b)VALUES(0,0), (0,0), (0,0), (0,0), (0,0)", packet_length=packet_length@entry=58, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.2_dbg/sql/sql_class.h:1109
            #16 0x000055f7a5bfb9d5 in do_command (thd=0x14fb58000d90) at /test/10.2_dbg/sql/sql_parse.cc:1381
            #17 0x000055f7a5d00c5f in do_handle_one_connection (connect=connect@entry=0x55f7a9a66460) at /test/10.2_dbg/sql/sql_connect.cc:1336
            #18 0x000055f7a5d00e8a in handle_one_connection (arg=0x55f7a9a66460) at /test/10.2_dbg/sql/sql_connect.cc:1241
            #19 0x000014fbdaf91609 in start_thread (arg=<optimized out>) at pthread_create.c:477
            #20 0x000014fbdab88293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
            

            ramesh Ramesh Sivaraman added a comment - - edited Reproduced the crash on 10.2 after making small modification in the testcase CREATE TABLE t (a INT,b INT,c INT,d INT,e INT,f INT GENERATED ALWAYS AS (a+b)VIRTUAL,g INT,h BLOB,i INT,UNIQUE KEY(d,h(10))); INSERT INTO t (a,b)VALUES(0,0), (0,0), (0,0), (0,0), (0,0); 10.2.38 (Debug) Core was generated by `/test/GAL_MD150321-mariadb-10.2.38-linux-x86_64-dbg/bin/mysqld --defaults-file='. 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:56 [Current thread is 1 (Thread 0x14fbc80fd700 (LWP 899985))] (gdb) bt #0 __pthread_kill (threadid=<optimized out>, signo=signo@entry=11) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56 #1 0x000055f7a6503828 in my_write_core (sig=sig@entry=11) at /test/10.2_dbg/mysys/stacktrace.c:382 #2 0x000055f7a5df5bb9 in handle_fatal_signal (sig=11) at /test/10.2_dbg/sql/signal_handler.cc:343 #3 <signal handler called> #4 mach_read_from_n_little_endian (buf_size=<optimized out>, buf=0x14fb58021f36 "") at /test/10.2_dbg/storage/innobase/include/mach0data.ic:701 #5 row_mysql_read_blob_ref (len=len@entry=0x14fbc80f8b30, ref=ref@entry=0x14fb58021f36 "", col_len=<optimized out>) at /test/10.2_dbg/storage/innobase/row/row0mysql.cc:273 #6 0x000055f7a5fde6cb in wsrep_calc_row_hash (digest=digest@entry=0x14fbc80f9990 "", row=row@entry=0x14fb58021f20 "\334\377", table=0x14fb58026d20, prebuilt=0x14fb58033d70, thd=thd@entry=0x14fb58000d90) at /test/10.2_dbg/storage/innobase/handler/ha_innodb.cc:8899 #7 0x000055f7a5fe9a8d in ha_innobase::wsrep_append_keys (this=this@entry=0x14fb58032948, thd=0x14fb58000d90, key_type=key_type@entry=WSREP_KEY_EXCLUSIVE, record0=record0@entry=0x14fb58021f20 "\334\377", record1=record1@entry=0x0) at /test/10.2_dbg/storage/innobase/handler/ha_innodb.cc:10720 #8 0x000055f7a5ff9ab8 in ha_innobase::write_row (this=0x14fb58032948, record=0x14fb58021f20 "\334\377") at /test/10.2_dbg/storage/innobase/handler/ha_innodb.cc:8396 #9 0x000055f7a5e03fc0 in handler::ha_write_row (this=0x14fb58032948, buf=0x14fb58021f20 "\334\377") at /test/10.2_dbg/sql/handler.cc:6118 #10 0x000055f7a5bcb603 in write_record (thd=thd@entry=0x14fb58000d90, table=table@entry=0x14fb58026d20, info=info@entry=0x14fbc80fabf0) at /test/10.2_dbg/sql/sql_insert.cc:1939 #11 0x000055f7a5bd6baa in mysql_insert (thd=thd@entry=0x14fb58000d90, table_list=0x14fb580112b8, fields=@0x14fb580056b8: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x14fb580119e0, last = 0x14fb58011af8, elements = 2}, <No data fields>}, values_list=@0x14fb58005700: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x14fb58011c70, last = 0x14fb58012250, elements = 5}, <No data fields>}, update_fields=@0x14fb580056e8: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x55f7a6cff960 <end_of_list>, last = 0x14fb580056e8, elements = 0}, <No data fields>}, update_values=@0x14fb580056d0: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x55f7a6cff960 <end_of_list>, last = 0x14fb580056d0, elements = 0}, <No data fields>}, duplic=DUP_ERROR, ignore=false) at /test/10.2_dbg/sql/sql_insert.cc:1066 #12 0x000055f7a5bef70c in mysql_execute_command (thd=thd@entry=0x14fb58000d90) at /test/10.2_dbg/sql/sql_parse.cc:4221 #13 0x000055f7a5bf6082 in mysql_parse (thd=thd@entry=0x14fb58000d90, rawbuf=rawbuf@entry=0x14fb58011198 "INSERT INTO t (a,b)VALUES(0,0), (0,0), (0,0), (0,0), (0,0)", length=length@entry=58, parser_state=parser_state@entry=0x14fbc80fc550, 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:7790 #14 0x000055f7a5bf768b in wsrep_mysql_parse (thd=thd@entry=0x14fb58000d90, rawbuf=0x14fb58011198 "INSERT INTO t (a,b)VALUES(0,0), (0,0), (0,0), (0,0), (0,0)", length=58, parser_state=parser_state@entry=0x14fbc80fc550, 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:7582 #15 0x000055f7a5bf8be4 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x14fb58000d90, packet=packet@entry=0x14fb580195d1 "INSERT INTO t (a,b)VALUES(0,0), (0,0), (0,0), (0,0), (0,0)", packet_length=packet_length@entry=58, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.2_dbg/sql/sql_class.h:1109 #16 0x000055f7a5bfb9d5 in do_command (thd=0x14fb58000d90) at /test/10.2_dbg/sql/sql_parse.cc:1381 #17 0x000055f7a5d00c5f in do_handle_one_connection (connect=connect@entry=0x55f7a9a66460) at /test/10.2_dbg/sql/sql_connect.cc:1336 #18 0x000055f7a5d00e8a in handle_one_connection (arg=0x55f7a9a66460) at /test/10.2_dbg/sql/sql_connect.cc:1241 #19 0x000014fbdaf91609 in start_thread (arg=<optimized out>) at pthread_create.c:477 #20 0x000014fbdab88293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

            I tried following in 10.2 but it works fine:

            CREATE TABLE t (a INT not null primary key,b INT, d int,
            h BLOB, db_row_hash_1 bigint as (BIN(SHA1(h))) PERSISTENT,
            UNIQUE KEY(d,db_row_hash_1));
             
            INSERT INTO t(a,b,h,d) values (0,0,"abcde",0);
            SELECT * from t;
            DROP TABLE t;
             
            CREATE TABLE t (a INT not null primary key,b INT, d int,
            h BLOB, db_row_hash_1 bigint as (BIN(SHA1(h))) VIRTUAL,
            UNIQUE KEY(d,db_row_hash_1));
             
            INSERT INTO t(a,b,h,d) values (0,0,"abcde",0);
            SELECT * from t;
            DROP TABLE t;
            

            jplindst Jan Lindström (Inactive) added a comment - I tried following in 10.2 but it works fine: CREATE TABLE t (a INT not null primary key,b INT, d int, h BLOB, db_row_hash_1 bigint as (BIN(SHA1(h))) PERSISTENT, UNIQUE KEY(d,db_row_hash_1));   INSERT INTO t(a,b,h,d) values (0,0,"abcde",0); SELECT * from t; DROP TABLE t;   CREATE TABLE t (a INT not null primary key,b INT, d int, h BLOB, db_row_hash_1 bigint as (BIN(SHA1(h))) VIRTUAL, UNIQUE KEY(d,db_row_hash_1));   INSERT INTO t(a,b,h,d) values (0,0,"abcde",0); SELECT * from t; DROP TABLE t;

            jplindst, please try to convert the test case from 10.4 to 10.2 to repeat this bug on 10.2 and 10.3.

            The submitted test case depends on MDEV-371, which will create a virtual column DB_ROW_HASH_1 that calculates something on the column h BLOB and then create something like UNIQUE INDEX(d, DB_ROW_HASH_1).

            marko Marko Mäkelä added a comment - jplindst , please try to convert the test case from 10.4 to 10.2 to repeat this bug on 10.2 and 10.3. The submitted test case depends on MDEV-371 , which will create a virtual column DB_ROW_HASH_1 that calculates something on the column h BLOB and then create something like UNIQUE INDEX(d, DB_ROW_HASH_1) .

            People

              jplindst Jan Lindström (Inactive)
              ramesh Ramesh Sivaraman
              Votes:
              0 Vote for this issue
              Watchers:
              4 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.