Type:
Bug
Priority:
Blocker
Resolution:
Fixed
Affects Version/s:
10.6
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)
{"report":{"fcp":816,"ttfb":275.7000000476837,"pageVisibility":"visible","entityId":100445,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"713fe633-5c58-4b5c-8fd2-ebe0194cbbd3","navigationType":0,"readyForUser":921.8000001907349,"redirectCount":0,"resourceLoadedEnd":1094.2000000476837,"resourceLoadedStart":281.2000000476837,"resourceTiming":[{"duration":67,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":281.2000000476837,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":281.2000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":348.2000000476837,"responseStart":0,"secureConnectionStart":0},{"duration":66.80000019073486,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2bu7/820016/12ta74/8679b4946efa1a0bb029a3a22206fb5d/_/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","startTime":281.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":281.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":348.30000019073486,"responseStart":0,"secureConnectionStart":0},{"duration":116.30000019073486,"initiatorType":"script","name":"https://jira.mariadb.org/s/fbf975c0cce4b1abf04784eeae9ba1f4-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":281.5,"connectEnd":281.5,"connectStart":281.5,"domainLookupEnd":281.5,"domainLookupStart":281.5,"fetchStart":281.5,"redirectEnd":0,"redirectStart":0,"requestStart":281.5,"responseEnd":397.80000019073486,"responseStart":397.80000019073486,"secureConnectionStart":281.5},{"duration":169.60000014305115,"initiatorType":"script","name":"https://jira.mariadb.org/s/099b33461394b8015fc36c0a4b96e19f-CDN/lu2bu7/820016/12ta74/8679b4946efa1a0bb029a3a22206fb5d/_/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","startTime":281.7000000476837,"connectEnd":281.7000000476837,"connectStart":281.7000000476837,"domainLookupEnd":281.7000000476837,"domainLookupStart":281.7000000476837,"fetchStart":281.7000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":281.7000000476837,"responseEnd":451.30000019073486,"responseStart":451.30000019073486,"secureConnectionStart":281.7000000476837},{"duration":173.29999995231628,"initiatorType":"script","name":"https://jira.mariadb.org/s/94c15bff32baef80f4096a08aceae8bc-CDN/lu2bu7/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":281.80000019073486,"connectEnd":281.80000019073486,"connectStart":281.80000019073486,"domainLookupEnd":281.80000019073486,"domainLookupStart":281.80000019073486,"fetchStart":281.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":281.80000019073486,"responseEnd":455.10000014305115,"responseStart":455.10000014305115,"secureConnectionStart":281.80000019073486},{"duration":174.09999990463257,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":281.80000019073486,"connectEnd":281.80000019073486,"connectStart":281.80000019073486,"domainLookupEnd":281.80000019073486,"domainLookupStart":281.80000019073486,"fetchStart":281.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":281.80000019073486,"responseEnd":455.90000009536743,"responseStart":455.90000009536743,"secureConnectionStart":281.80000019073486},{"duration":174.40000009536743,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":281.90000009536743,"connectEnd":281.90000009536743,"connectStart":281.90000009536743,"domainLookupEnd":281.90000009536743,"domainLookupStart":281.90000009536743,"fetchStart":281.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":281.90000009536743,"responseEnd":456.30000019073486,"responseStart":456.30000019073486,"secureConnectionStart":281.90000009536743},{"duration":175,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2bu7/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":282.10000014305115,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":282.10000014305115,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":457.10000014305115,"responseStart":0,"secureConnectionStart":0},{"duration":174.70000004768372,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":282.2000000476837,"connectEnd":282.2000000476837,"connectStart":282.2000000476837,"domainLookupEnd":282.2000000476837,"domainLookupStart":282.2000000476837,"fetchStart":282.2000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":282.2000000476837,"responseEnd":456.90000009536743,"responseStart":456.90000009536743,"secureConnectionStart":282.2000000476837},{"duration":175.09999990463257,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2bu7/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":282.30000019073486,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":282.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":457.40000009536743,"responseStart":0,"secureConnectionStart":0},{"duration":175.09999990463257,"initiatorType":"script","name":"https://jira.mariadb.org/s/3339d87fa2538a859872f2df449bf8d0-CDN/lu2bu7/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":282.40000009536743,"connectEnd":282.40000009536743,"connectStart":282.40000009536743,"domainLookupEnd":282.40000009536743,"domainLookupStart":282.40000009536743,"fetchStart":282.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":282.40000009536743,"responseEnd":457.5,"responseStart":457.5,"secureConnectionStart":282.40000009536743},{"duration":340,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":288.2000000476837,"connectEnd":288.2000000476837,"connectStart":288.2000000476837,"domainLookupEnd":288.2000000476837,"domainLookupStart":288.2000000476837,"fetchStart":288.2000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":288.2000000476837,"responseEnd":628.2000000476837,"responseStart":628.2000000476837,"secureConnectionStart":288.2000000476837},{"duration":805.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":288.7000000476837,"connectEnd":288.7000000476837,"connectStart":288.7000000476837,"domainLookupEnd":288.7000000476837,"domainLookupStart":288.7000000476837,"fetchStart":288.7000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":288.7000000476837,"responseEnd":1094.2000000476837,"responseStart":1094.2000000476837,"secureConnectionStart":288.7000000476837},{"duration":360.40000009536743,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":609.5,"connectEnd":609.5,"connectStart":609.5,"domainLookupEnd":609.5,"domainLookupStart":609.5,"fetchStart":609.5,"redirectEnd":0,"redirectStart":0,"requestStart":609.5,"responseEnd":969.9000000953674,"responseStart":969.9000000953674,"secureConnectionStart":609.5}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":147,"responseStart":276,"responseEnd":288,"domLoading":279,"domInteractive":1115,"domContentLoadedEventStart":1115,"domContentLoadedEventEnd":1150,"domComplete":1840,"loadEventStart":1840,"loadEventEnd":1842,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1098.9000000953674},{"name":"bigPipe.sidebar-id.end","time":1099.8000001907349},{"name":"bigPipe.activity-panel-pipe-id.start","time":1100},{"name":"bigPipe.activity-panel-pipe-id.end","time":1102.3000001907349},{"name":"activityTabFullyLoaded","time":1158.2000000476837}],"measures":[],"correlationId":"9382ffbfa9e7c4","effectiveType":"4g","downlink":9.7,"rtt":0,"serverDuration":72,"dbReadsTimeInMs":13,"dbConnsTimeInMs":20,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}