Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
10.6, 10.7(EOL), 10.8(EOL), 10.9(EOL), 10.10(EOL)
Description
The testcases in bug MDEV-25906 now pass after the patch. However,
SET GLOBAL log_bin_trust_function_creators=ON; |
CREATE FUNCTION f() RETURNS INT RETURN (SELECT 1 FROM t); |
CREATE VIEW v AS SELECT f(); |
FLUSH TABLE v WITH READ LOCK; |
Leads to:
10.7.0 52505bf20de0ce77a5c0b0a74af021051987bb0d (Debug) |
Core was generated by `/test/MD160821-mariadb-10.7.0-linux-x86_64-dbg/bin/mysqld --no-defaults --core-'.
|
Program terminated with signal SIGSEGV, Segmentation fault.
|
#0 0x000055b31847b58d in flush_tables_with_read_lock (thd=thd@entry=
|
0x150a94000db8, all_tables=<optimized out>)
|
at /test/10.7_dbg/sql/sql_reload.cc:610
|
[Current thread is 1 (Thread 0x150ad8504700 (LWP 3707074))]
|
(gdb) bt
|
#0 0x000055b31847b58d in flush_tables_with_read_lock (thd=thd@entry=0x150a94000db8, all_tables=<optimized out>) at /test/10.7_dbg/sql/sql_reload.cc:610
|
#1 0x000055b3182d5606 in mysql_execute_command (thd=thd@entry=0x150a94000db8, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /test/10.7_dbg/sql/sql_parse.cc:5406
|
#2 0x000055b3182bdac3 in mysql_parse (thd=thd@entry=0x150a94000db8, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x150ad8503400) at /test/10.7_dbg/sql/sql_parse.cc:8030
|
#3 0x000055b3182cc6c8 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x150a94000db8, packet=packet@entry=0x150a9400b739 "FLUSH TABLE v WITH READ LOCK", packet_length=packet_length@entry=28, blocking=blocking@entry=true) at /test/10.7_dbg/sql/sql_class.h:1357
|
#4 0x000055b3182cfae9 in do_command (thd=0x150a94000db8, blocking=blocking@entry=true) at /test/10.7_dbg/sql/sql_parse.cc:1404
|
#5 0x000055b318445dd6 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x55b31b9243f8, put_in_cache=put_in_cache@entry=true) at /test/10.7_dbg/sql/sql_connect.cc:1418
|
#6 0x000055b3184463db in handle_one_connection (arg=arg@entry=0x55b31b9243f8) at /test/10.7_dbg/sql/sql_connect.cc:1312
|
#7 0x000055b3188aece4 in pfs_spawn_thread (arg=0x55b31b84d048) at /test/10.7_dbg/storage/perfschema/pfs.cc:2201
|
#8 0x0000150adc5d1609 in start_thread (arg=<optimized out>) at pthread_create.c:477
|
#9 0x0000150adc1bf293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
|
10.7.0 52505bf20de0ce77a5c0b0a74af021051987bb0d (Optimized) |
Core was generated by `/test/MD160821-mariadb-10.7.0-linux-x86_64-opt/bin/mysqld --no-defaults --core-'.
|
Program terminated with signal SIGSEGV, Segmentation fault.
|
#0 0x0000556609ebbe9b in flush_tables_with_read_lock (thd=thd@entry=
|
0x149c84000c58, all_tables=<optimized out>)
|
at /test/10.7_opt/sql/sql_reload.cc:610
|
[Current thread is 1 (Thread 0x149cd0483700 (LWP 3745301))]
|
(gdb) bt
|
#0 0x0000556609ebbe9b in flush_tables_with_read_lock (thd=thd@entry=0x149c84000c58, all_tables=<optimized out>) at /test/10.7_opt/sql/sql_reload.cc:610
|
#1 0x0000556609d87418 in mysql_execute_command (thd=0x149c84000c58, is_called_from_prepared_stmt=<optimized out>) at /test/10.7_opt/sql/sql_parse.cc:5406
|
#2 0x0000556609d74336 in mysql_parse (thd=0x149c84000c58, rawbuf=<optimized out>, length=<optimized out>, parser_state=<optimized out>) at /test/10.7_opt/sql/sql_parse.cc:8030
|
#3 0x0000556609d80225 in dispatch_command (command=COM_QUERY, thd=0x149c84000c58, packet=<optimized out>, packet_length=<optimized out>, blocking=<optimized out>) at /test/10.7_opt/sql/sql_class.h:1357
|
#4 0x0000556609d82147 in do_command (thd=0x149c84000c58, blocking=blocking@entry=true) at /test/10.7_opt/sql/sql_parse.cc:1404
|
#5 0x0000556609e9d967 in do_handle_one_connection (connect=<optimized out>, put_in_cache=true) at /test/10.7_opt/sql/sql_connect.cc:1418
|
#6 0x0000556609e9dcad in handle_one_connection (arg=arg@entry=0x55660d3d6dd8) at /test/10.7_opt/sql/sql_connect.cc:1312
|
#7 0x000055660a1f0648 in pfs_spawn_thread (arg=0x55660d002c88) at /test/10.7_opt/storage/perfschema/pfs.cc:2201
|
#8 0x0000149cd1dbc609 in start_thread (arg=<optimized out>) at pthread_create.c:477
|
#9 0x0000149cd19aa293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
|
Bug confirmed present in:
MariaDB: 10.6.5 (dbg), 10.6.5 (opt), 10.7.0 (dbg), 10.7.0 (opt)
Bug (or feature/syntax) confirmed not present in:
MariaDB: 10.2.41 (dbg), 10.2.41 (opt), 10.3.32 (dbg), 10.3.32 (opt), 10.4.22 (dbg), 10.4.22 (opt), 10.5.13 (dbg), 10.5.13 (opt)
MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.51 (dbg), 5.6.51 (opt), 5.7.35 (dbg), 5.7.35 (opt), 8.0.26 (dbg), 8.0.26 (opt)
Attachments
Issue Links
- relates to
-
MDEV-25906 SIGSEGV in flush_tables_with_read_lock on FTWRL or FTFE | SIGSEGV in ha_maria::extra
-
- Closed
-
Activity
Field | Original Value | New Value |
---|---|---|
Link |
This issue relates to |
Component/s | Stored routines [ 13905 ] |
Assignee | Sergei Golubchik [ serg ] | Oleksandr Byelkin [ sanja ] |
Description |
The testcases in bug {code:sql} SET GLOBAL log_bin_trust_function_creators=ON; CREATE FUNCTION f() RETURNS INT RETURN (SELECT 1 FROM t); CREATE VIEW v AS SELECT f(); FLUSH TABLE v WITH READ LOCK; {code} Leads to: {noformat:title=10.7.0 52505bf20de0ce77a5c0b0a74af021051987bb0d (Debug)} Core was generated by `/test/MD160821-mariadb-10.7.0-linux-x86_64-dbg/bin/mysqld --no-defaults --core-'. Program terminated with signal SIGSEGV, Segmentation fault. #0 0x000055b31847b58d in flush_tables_with_read_lock (thd=thd@entry= 0x150a94000db8, all_tables=<optimized out>) at /test/10.7_dbg/sql/sql_reload.cc:610 [Current thread is 1 (Thread 0x150ad8504700 (LWP 3707074))] (gdb) bt #0 0x000055b31847b58d in flush_tables_with_read_lock (thd=thd@entry=0x150a94000db8, all_tables=<optimized out>) at /test/10.7_dbg/sql/sql_reload.cc:610 #1 0x000055b3182d5606 in mysql_execute_command (thd=thd@entry=0x150a94000db8, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /test/10.7_dbg/sql/sql_parse.cc:5406 #2 0x000055b3182bdac3 in mysql_parse (thd=thd@entry=0x150a94000db8, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x150ad8503400) at /test/10.7_dbg/sql/sql_parse.cc:8030 #3 0x000055b3182cc6c8 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x150a94000db8, packet=packet@entry=0x150a9400b739 "FLUSH TABLE v WITH READ LOCK", packet_length=packet_length@entry=28, blocking=blocking@entry=true) at /test/10.7_dbg/sql/sql_class.h:1357 #4 0x000055b3182cfae9 in do_command (thd=0x150a94000db8, blocking=blocking@entry=true) at /test/10.7_dbg/sql/sql_parse.cc:1404 #5 0x000055b318445dd6 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x55b31b9243f8, put_in_cache=put_in_cache@entry=true) at /test/10.7_dbg/sql/sql_connect.cc:1418 #6 0x000055b3184463db in handle_one_connection (arg=arg@entry=0x55b31b9243f8) at /test/10.7_dbg/sql/sql_connect.cc:1312 #7 0x000055b3188aece4 in pfs_spawn_thread (arg=0x55b31b84d048) at /test/10.7_dbg/storage/perfschema/pfs.cc:2201 #8 0x0000150adc5d1609 in start_thread (arg=<optimized out>) at pthread_create.c:477 #9 0x0000150adc1bf293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95 {noformat} Bug confirmed present in: MariaDB: 10.6.5 (dbg), 10.6.5 (opt), 10.7.0 (dbg), 10.7.0 (opt) Bug (or feature/syntax) confirmed not present in: MariaDB: 10.2.41 (dbg), 10.2.41 (opt), 10.3.32 (dbg), 10.3.32 (opt), 10.4.22 (dbg), 10.4.22 (opt), 10.5.13 (dbg), 10.5.13 (opt) MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.51 (dbg), 5.6.51 (opt), 5.7.35 (dbg), 5.7.35 (opt), 8.0.26 (dbg), 8.0.26 (opt) |
The testcases in bug {code:sql} SET GLOBAL log_bin_trust_function_creators=ON; CREATE FUNCTION f() RETURNS INT RETURN (SELECT 1 FROM t); CREATE VIEW v AS SELECT f(); FLUSH TABLE v WITH READ LOCK; {code} Leads to: {noformat:title=10.7.0 52505bf20de0ce77a5c0b0a74af021051987bb0d (Debug)} Core was generated by `/test/MD160821-mariadb-10.7.0-linux-x86_64-dbg/bin/mysqld --no-defaults --core-'. Program terminated with signal SIGSEGV, Segmentation fault. #0 0x000055b31847b58d in flush_tables_with_read_lock (thd=thd@entry= 0x150a94000db8, all_tables=<optimized out>) at /test/10.7_dbg/sql/sql_reload.cc:610 [Current thread is 1 (Thread 0x150ad8504700 (LWP 3707074))] (gdb) bt #0 0x000055b31847b58d in flush_tables_with_read_lock (thd=thd@entry=0x150a94000db8, all_tables=<optimized out>) at /test/10.7_dbg/sql/sql_reload.cc:610 #1 0x000055b3182d5606 in mysql_execute_command (thd=thd@entry=0x150a94000db8, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /test/10.7_dbg/sql/sql_parse.cc:5406 #2 0x000055b3182bdac3 in mysql_parse (thd=thd@entry=0x150a94000db8, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x150ad8503400) at /test/10.7_dbg/sql/sql_parse.cc:8030 #3 0x000055b3182cc6c8 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x150a94000db8, packet=packet@entry=0x150a9400b739 "FLUSH TABLE v WITH READ LOCK", packet_length=packet_length@entry=28, blocking=blocking@entry=true) at /test/10.7_dbg/sql/sql_class.h:1357 #4 0x000055b3182cfae9 in do_command (thd=0x150a94000db8, blocking=blocking@entry=true) at /test/10.7_dbg/sql/sql_parse.cc:1404 #5 0x000055b318445dd6 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x55b31b9243f8, put_in_cache=put_in_cache@entry=true) at /test/10.7_dbg/sql/sql_connect.cc:1418 #6 0x000055b3184463db in handle_one_connection (arg=arg@entry=0x55b31b9243f8) at /test/10.7_dbg/sql/sql_connect.cc:1312 #7 0x000055b3188aece4 in pfs_spawn_thread (arg=0x55b31b84d048) at /test/10.7_dbg/storage/perfschema/pfs.cc:2201 #8 0x0000150adc5d1609 in start_thread (arg=<optimized out>) at pthread_create.c:477 #9 0x0000150adc1bf293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95 {noformat} {noformat:title=10.7.0 52505bf20de0ce77a5c0b0a74af021051987bb0d (Optimized)} Core was generated by `/test/MD160821-mariadb-10.7.0-linux-x86_64-opt/bin/mysqld --no-defaults --core-'. Program terminated with signal SIGSEGV, Segmentation fault. #0 0x0000556609ebbe9b in flush_tables_with_read_lock (thd=thd@entry= 0x149c84000c58, all_tables=<optimized out>) at /test/10.7_opt/sql/sql_reload.cc:610 [Current thread is 1 (Thread 0x149cd0483700 (LWP 3745301))] (gdb) bt #0 0x0000556609ebbe9b in flush_tables_with_read_lock (thd=thd@entry=0x149c84000c58, all_tables=<optimized out>) at /test/10.7_opt/sql/sql_reload.cc:610 #1 0x0000556609d87418 in mysql_execute_command (thd=0x149c84000c58, is_called_from_prepared_stmt=<optimized out>) at /test/10.7_opt/sql/sql_parse.cc:5406 #2 0x0000556609d74336 in mysql_parse (thd=0x149c84000c58, rawbuf=<optimized out>, length=<optimized out>, parser_state=<optimized out>) at /test/10.7_opt/sql/sql_parse.cc:8030 #3 0x0000556609d80225 in dispatch_command (command=COM_QUERY, thd=0x149c84000c58, packet=<optimized out>, packet_length=<optimized out>, blocking=<optimized out>) at /test/10.7_opt/sql/sql_class.h:1357 #4 0x0000556609d82147 in do_command (thd=0x149c84000c58, blocking=blocking@entry=true) at /test/10.7_opt/sql/sql_parse.cc:1404 #5 0x0000556609e9d967 in do_handle_one_connection (connect=<optimized out>, put_in_cache=true) at /test/10.7_opt/sql/sql_connect.cc:1418 #6 0x0000556609e9dcad in handle_one_connection (arg=arg@entry=0x55660d3d6dd8) at /test/10.7_opt/sql/sql_connect.cc:1312 #7 0x000055660a1f0648 in pfs_spawn_thread (arg=0x55660d002c88) at /test/10.7_opt/storage/perfschema/pfs.cc:2201 #8 0x0000149cd1dbc609 in start_thread (arg=<optimized out>) at pthread_create.c:477 #9 0x0000149cd19aa293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95 {noformat} Bug confirmed present in: MariaDB: 10.6.5 (dbg), 10.6.5 (opt), 10.7.0 (dbg), 10.7.0 (opt) Bug (or feature/syntax) confirmed not present in: MariaDB: 10.2.41 (dbg), 10.2.41 (opt), 10.3.32 (dbg), 10.3.32 (opt), 10.4.22 (dbg), 10.4.22 (opt), 10.5.13 (dbg), 10.5.13 (opt) MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.51 (dbg), 5.6.51 (opt), 5.7.35 (dbg), 5.7.35 (opt), 8.0.26 (dbg), 8.0.26 (opt) |
Status | Open [ 1 ] | In Progress [ 3 ] |
Priority | Blocker [ 1 ] | Major [ 3 ] |
Priority | Major [ 3 ] | Critical [ 2 ] |
Workflow | MariaDB v3 [ 124502 ] | MariaDB v4 [ 144609 ] |
Fix Version/s | 10.7 [ 24805 ] |
Affects Version/s | 10.8 [ 26121 ] | |
Affects Version/s | 10.9 [ 26905 ] | |
Affects Version/s | 10.10 [ 27530 ] |
Fix Version/s | 10.8 [ 26121 ] |
Link |
This issue relates to |
Comment |
[ I got other trace:
{code} #1 __pthread_kill_internal (signo=6, threadid=140737228879424) at pthread_kill.c:80 #2 __GI___pthread_kill (threadid=140737228879424, signo=signo@entry=6) at pthread_kill.c:91 #3 0x00007ffff76c7476 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26 #4 0x00007ffff76ad7b7 in __GI_abort () at abort.c:79 #5 0x00005555566a4775 in ut_dbg_assertion_failed (expr=0x555556e4f6e8 "!cursor->index->is_committed()", file=0x555556e4f550 "storage/innobase/row/row0ins.cc", line=218) at storage/innobase/ut/ut0dbg.cc:60 #6 0x0000555556585b26 in row_ins_sec_index_entry_by_modify (flags=0, mode=2, cursor=0x7ffff08877f0, offsets=0x7ffff0887798, offsets_heap=0x7fff88075100, heap=0x7fff88075590, entry=0x7fff88070450, thr=0x7fff8806e480, mtr=0x7ffff0887af0) at storage/innobase/row/row0ins.cc:218 #7 0x000055555658e9f1 in row_ins_sec_index_entry_low (flags=0, mode=2, index=0x7fff880439c0, offsets_heap=0x7fff88075100, heap=0x7fff88075590, entry=0x7fff88070450, trx_id=0, thr=0x7fff8806e480) at storage/innobase/row/row0ins.cc:3086 #8 0x000055555658f41a in row_ins_sec_index_entry (index=0x7fff880439c0, entry=0x7fff88070450, thr=0x7fff8806e480, check_foreign=true) at storage/innobase/row/row0ins.cc:3298 #9 0x000055555661fe9f in row_upd_sec_index_entry (node=0x7fff8817a2e0, thr=0x7fff8806e480) at storage/innobase/row/row0upd.cc:2537 #10 0x00005555566200f7 in row_upd_sec_step (node=0x7fff8817a2e0, thr=0x7fff8806e480) at storage/innobase/row/row0upd.cc:2564 #11 0x00005555566231ae in row_upd (node=0x7fff8817a2e0, thr=0x7fff8806e480) at storage/innobase/row/row0upd.cc:3327 #12 0x0000555556623661 in row_upd_step (thr=0x7fff8806e480) at storage/innobase/row/row0upd.cc:3442 #13 0x00005555565ba96b in row_update_for_mysql (prebuilt=0x7fff88179740) at storage/innobase/row/row0mysql.cc:1809 #14 0x00005555563ed400 in ha_innobase::update_row (this=0x7fff88046768, old_row=0x7fff88044c20 "\377", new_row=0x7fff88044bf0 "\371") at storage/innobase/handler/ha_innodb.cc:8933 #15 0x00005555561787ef in handler::ha_update_row (this=0x7fff88046768, old_data=0x7fff88044c20 "\377", new_data=0x7fff88044bf0 "\371") at sql/handler.cc:7209 #16 0x0000555555ee9728 in multi_update::send_data (this=0x7fff88016110, not_used_values=...) at sql/sql_update.cc:2590 #17 0x0000555555e47c84 in end_send (join=0x7fff88016758, join_tab=0x7fff88019780, end_of_records=false) at sql/sql_select.cc:21832 #18 0x0000555555e450f9 in evaluate_join_record (join=0x7fff88016758, join_tab=0x7fff880193d8, error=0) at sql/sql_select.cc:20864 #19 0x0000555555e44a80 in sub_select (join=0x7fff88016758, join_tab=0x7fff880193d8, end_of_records=false) at sql/sql_select.cc:20676 #20 0x0000555555e450f9 in evaluate_join_record (join=0x7fff88016758, join_tab=0x7fff88019030, error=0) at sql/sql_select.cc:20864 #21 0x0000555555e448a9 in sub_select (join=0x7fff88016758, join_tab=0x7fff88019030, end_of_records=false) at sql/sql_select.cc:20637 #22 0x0000555555e43ba0 in do_select (join=0x7fff88016758, procedure=0x0) at sql/sql_select.cc:20173 #23 0x0000555555e166c9 in JOIN::exec_inner (this=0x7fff88016758) at sql/sql_select.cc:4545 #24 0x0000555555e15784 in JOIN::exec (this=0x7fff88016758) at sql/sql_select.cc:4327 #25 0x0000555555e170bb in mysql_select (thd=0x7fff88000da0, tables=0x7fff880148f0, wild_num=0, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2200096997504, result=0x7fff88016110, unit=0x7fff88004ce0, select_lex=0x7fff880054e8) at sql/sql_select.cc:4766 #26 0x0000555555ee7343 in mysql_multi_update (thd=0x7fff88000da0, table_list=0x7fff880148f0, fields=0x7fff88005630, values=0x7fff88005bd8, conds=0x0, options=0, handle_duplicates=DUP_ERROR, ignore=false, unit=0x7fff88004ce0, select_lex=0x7fff880054e8, result=0x7ffff0889d70) at sql/sql_update.cc:1962 #27 0x0000555555dbcbcc in mysql_execute_command (thd=0x7fff88000da0) at sql/sql_parse.cc:4522 #28 0x0000555555dc8fbe in mysql_parse (thd=0x7fff88000da0, rawbuf=0x7fff88014808 "UPDATE t1 JOIN t2 SET t1.f = t2.a", length=33, parser_state=0x7ffff088a4f0, is_com_multi=false, is_next_command=false) at sql/sql_parse.cc:8024 #29 0x0000555555db45db in dispatch_command (command=COM_QUERY, thd=0x7fff88000da0, packet=0x7fff8800ac61 "UPDATE t1 JOIN t2 SET t1.f = t2.a", packet_length=33, is_com_multi=false, is_next_command=false) at sql/sql_parse.cc:1857 #30 0x0000555555db2d95 in do_command (thd=0x7fff88000da0) at sql/sql_parse.cc:1378 #31 0x0000555555f5cc5d in do_handle_one_connection (connect=0x5555585083b0) at sql/sql_connect.cc:1420 #32 0x0000555555f5c8ea in handle_one_connection (arg=0x5555585083b0) at sql/sql_connect.cc:1316 #33 0x0000555556a35c95 in pfs_spawn_thread (arg=0x55555845bd60) at storage/perfschema/pfs.cc:1869 #34 0x00007ffff7719947 in start_thread (arg=<optimized out>) at pthread_create.c:435 #35 0x00007ffff77a9a44 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:100 {code} which is very looks like https://jira.mariadb.org/browse/MDEV-22759 ] |
Link |
This issue relates to |
issue.field.resolutiondate | 2022-07-21 07:56:28.0 | 2022-07-21 07:56:28.802 |
Fix Version/s | 10.6.9 [ 27507 ] | |
Fix Version/s | 10.7.5 [ 27505 ] | |
Fix Version/s | 10.8.4 [ 27503 ] | |
Fix Version/s | 10.9.2 [ 27115 ] | |
Fix Version/s | 10.6 [ 24028 ] | |
Fix Version/s | 10.7 [ 24805 ] | |
Fix Version/s | 10.8 [ 26121 ] | |
Resolution | Fixed [ 1 ] | |
Status | In Progress [ 3 ] | Closed [ 6 ] |