Type:
Bug
Priority:
Critical
Resolution:
Fixed
Affects Version/s:
10.6 , 10.7(EOL) , 10.8(EOL) , 10.9(EOL) , 10.10(EOL)
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)
relates to
MDEV-25906
SIGSEGV in flush_tables_with_read_lock on FTWRL or FTFE | SIGSEGV in ha_maria::extra
Closed
{"report":{"fcp":2538.5,"ttfb":1097.6999998092651,"pageVisibility":"visible","entityId":102157,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":32,"apdex":0.5,"journeyId":"0c7986b8-1688-4929-a9a0-f24aef720c5f","navigationType":0,"readyForUser":2766.7999997138977,"redirectCount":0,"resourceLoadedEnd":3106.0999999046326,"resourceLoadedStart":1102.5999999046326,"resourceTiming":[{"duration":719.4000000953674,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":1102.5999999046326,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1102.5999999046326,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1822,"responseStart":0,"secureConnectionStart":0},{"duration":721.8000001907349,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2cib/820016/12ta74/494e4c556ecbb29f90a3d3b4f09cb99c/_/download/contextbatch/css/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true&whisper-enabled=true","startTime":1102.8999996185303,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1102.8999996185303,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1824.6999998092651,"responseStart":0,"secureConnectionStart":0},{"duration":885.7999997138977,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":1103.0999999046326,"connectEnd":1103.0999999046326,"connectStart":1103.0999999046326,"domainLookupEnd":1103.0999999046326,"domainLookupStart":1103.0999999046326,"fetchStart":1103.0999999046326,"redirectEnd":0,"redirectStart":0,"requestStart":1103.0999999046326,"responseEnd":1988.8999996185303,"responseStart":1988.8999996185303,"secureConnectionStart":1103.0999999046326},{"duration":915.1999998092651,"initiatorType":"script","name":"https://jira.mariadb.org/s/2d8175ec2fa4c816e8023260bd8c1786-CDN/lu2cib/820016/12ta74/494e4c556ecbb29f90a3d3b4f09cb99c/_/download/contextbatch/js/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&locale=en&slack-enabled=true&whisper-enabled=true","startTime":1103.1999998092651,"connectEnd":1103.1999998092651,"connectStart":1103.1999998092651,"domainLookupEnd":1103.1999998092651,"domainLookupStart":1103.1999998092651,"fetchStart":1103.1999998092651,"redirectEnd":0,"redirectStart":0,"requestStart":1103.1999998092651,"responseEnd":2018.3999996185303,"responseStart":2018.3999996185303,"secureConnectionStart":1103.1999998092651},{"duration":918.6000003814697,"initiatorType":"script","name":"https://jira.mariadb.org/s/a9324d6758d385eb45c462685ad88f1d-CDN/lu2cib/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":1103.3999996185303,"connectEnd":1103.3999996185303,"connectStart":1103.3999996185303,"domainLookupEnd":1103.3999996185303,"domainLookupStart":1103.3999996185303,"fetchStart":1103.3999996185303,"redirectEnd":0,"redirectStart":0,"requestStart":1103.3999996185303,"responseEnd":2022,"responseStart":2022,"secureConnectionStart":1103.3999996185303},{"duration":918.9000000953674,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":1103.5999999046326,"connectEnd":1103.5999999046326,"connectStart":1103.5999999046326,"domainLookupEnd":1103.5999999046326,"domainLookupStart":1103.5999999046326,"fetchStart":1103.5999999046326,"redirectEnd":0,"redirectStart":0,"requestStart":1103.5999999046326,"responseEnd":2022.5,"responseStart":2022.5,"secureConnectionStart":1103.5999999046326},{"duration":919.0999999046326,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":1103.7999997138977,"connectEnd":1103.7999997138977,"connectStart":1103.7999997138977,"domainLookupEnd":1103.7999997138977,"domainLookupStart":1103.7999997138977,"fetchStart":1103.7999997138977,"redirectEnd":0,"redirectStart":0,"requestStart":1103.7999997138977,"responseEnd":2022.8999996185303,"responseStart":2022.8999996185303,"secureConnectionStart":1103.7999997138977},{"duration":921.5,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2cib/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":1103.8999996185303,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1103.8999996185303,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":2025.3999996185303,"responseStart":0,"secureConnectionStart":0},{"duration":919.1999998092651,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":1104.0999999046326,"connectEnd":1104.0999999046326,"connectStart":1104.0999999046326,"domainLookupEnd":1104.0999999046326,"domainLookupStart":1104.0999999046326,"fetchStart":1104.0999999046326,"redirectEnd":0,"redirectStart":0,"requestStart":1104.0999999046326,"responseEnd":2023.2999997138977,"responseStart":2023.2999997138977,"secureConnectionStart":1104.0999999046326},{"duration":921.3000001907349,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2cib/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/css/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.css?jira.create.linked.issue=true","startTime":1104.2999997138977,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1104.2999997138977,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":2025.5999999046326,"responseStart":0,"secureConnectionStart":0},{"duration":919.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/5d5e8fe91fbc506585e83ea3b62ccc4b-CDN/lu2cib/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/js/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.js?jira.create.linked.issue=true&locale=en","startTime":1104.3999996185303,"connectEnd":1104.3999996185303,"connectStart":1104.3999996185303,"domainLookupEnd":1104.3999996185303,"domainLookupStart":1104.3999996185303,"fetchStart":1104.3999996185303,"redirectEnd":0,"redirectStart":0,"requestStart":1104.3999996185303,"responseEnd":2023.8999996185303,"responseStart":2023.8999996185303,"secureConnectionStart":1104.3999996185303},{"duration":1669.2999997138977,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":1113.5999999046326,"connectEnd":1113.5999999046326,"connectStart":1113.5999999046326,"domainLookupEnd":1113.5999999046326,"domainLookupStart":1113.5999999046326,"fetchStart":1113.5999999046326,"redirectEnd":0,"redirectStart":0,"requestStart":1113.5999999046326,"responseEnd":2782.8999996185303,"responseStart":2782.8999996185303,"secureConnectionStart":1113.5999999046326},{"duration":1992.4000000953674,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":1113.6999998092651,"connectEnd":1113.6999998092651,"connectStart":1113.6999998092651,"domainLookupEnd":1113.6999998092651,"domainLookupStart":1113.6999998092651,"fetchStart":1113.6999998092651,"redirectEnd":0,"redirectStart":0,"requestStart":1113.6999998092651,"responseEnd":3106.0999999046326,"responseStart":3106.0999999046326,"secureConnectionStart":1113.6999998092651},{"duration":849,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":2256.699999809265,"connectEnd":2256.699999809265,"connectStart":2256.699999809265,"domainLookupEnd":2256.699999809265,"domainLookupStart":2256.699999809265,"fetchStart":2256.699999809265,"redirectEnd":0,"redirectStart":0,"requestStart":2256.699999809265,"responseEnd":3105.699999809265,"responseStart":3105.699999809265,"secureConnectionStart":2256.699999809265},{"duration":651.1000003814697,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":2509.8999996185303,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":2509.8999996185303,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":3161,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":928,"responseStart":1098,"responseEnd":1111,"domLoading":1101,"domInteractive":3164,"domContentLoadedEventStart":3164,"domContentLoadedEventEnd":3246,"domComplete":5827,"loadEventStart":5827,"loadEventEnd":5829,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":3124.0999999046326},{"name":"bigPipe.sidebar-id.end","time":3125.199999809265},{"name":"bigPipe.activity-panel-pipe-id.start","time":3125.3999996185303},{"name":"bigPipe.activity-panel-pipe-id.end","time":3134.5999999046326},{"name":"activityTabFullyLoaded","time":3267.199999809265}],"measures":[],"correlationId":"7f622f2263f303","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":105,"dbReadsTimeInMs":14,"dbConnsTimeInMs":24,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}