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":3860.100000143051,"ttfb":1556.4000000953674,"pageVisibility":"visible","entityId":100445,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":32,"apdex":0.5,"journeyId":"6fb28e05-47c6-4de4-a241-1c0f3308bd6d","navigationType":0,"readyForUser":3959.2000000476837,"redirectCount":0,"resourceLoadedEnd":4875.900000095367,"resourceLoadedStart":1562.9000000953674,"resourceTiming":[{"duration":1615,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":1562.9000000953674,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1562.9000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":3177.9000000953674,"responseStart":0,"secureConnectionStart":0},{"duration":1769.1999998092651,"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":1563.1000001430511,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1563.1000001430511,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":3332.2999999523163,"responseStart":0,"secureConnectionStart":0},{"duration":1777.9000000953674,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":1563.2999999523163,"connectEnd":1563.2999999523163,"connectStart":1563.2999999523163,"domainLookupEnd":1563.2999999523163,"domainLookupStart":1563.2999999523163,"fetchStart":1563.2999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":1563.2999999523163,"responseEnd":3341.2000000476837,"responseStart":3341.2000000476837,"secureConnectionStart":1563.2999999523163},{"duration":1872.7000000476837,"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":1563.4000000953674,"connectEnd":1563.4000000953674,"connectStart":1563.4000000953674,"domainLookupEnd":1563.4000000953674,"domainLookupStart":1563.4000000953674,"fetchStart":1563.4000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":1563.4000000953674,"responseEnd":3436.100000143051,"responseStart":3436.100000143051,"secureConnectionStart":1563.4000000953674},{"duration":1875.9000000953674,"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":1563.5,"connectEnd":1563.5,"connectStart":1563.5,"domainLookupEnd":1563.5,"domainLookupStart":1563.5,"fetchStart":1563.5,"redirectEnd":0,"redirectStart":0,"requestStart":1563.5,"responseEnd":3439.4000000953674,"responseStart":3439.4000000953674,"secureConnectionStart":1563.5},{"duration":1876,"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":1563.7999999523163,"connectEnd":1563.7999999523163,"connectStart":1563.7999999523163,"domainLookupEnd":1563.7999999523163,"domainLookupStart":1563.7999999523163,"fetchStart":1563.7999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":1563.7999999523163,"responseEnd":3439.7999999523163,"responseStart":3439.7999999523163,"secureConnectionStart":1563.7999999523163},{"duration":1876.1000001430511,"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":1564,"connectEnd":1564,"connectStart":1564,"domainLookupEnd":1564,"domainLookupStart":1564,"fetchStart":1564,"redirectEnd":0,"redirectStart":0,"requestStart":1564,"responseEnd":3440.100000143051,"responseStart":3440.100000143051,"secureConnectionStart":1564},{"duration":1921.7999999523163,"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":1564.1000001430511,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1564.1000001430511,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":3485.9000000953674,"responseStart":0,"secureConnectionStart":0},{"duration":1876.3000001907349,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":1564.2999999523163,"connectEnd":1564.2999999523163,"connectStart":1564.2999999523163,"domainLookupEnd":1564.2999999523163,"domainLookupStart":1564.2999999523163,"fetchStart":1564.2999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":1564.2999999523163,"responseEnd":3440.600000143051,"responseStart":3440.600000143051,"secureConnectionStart":1564.2999999523163},{"duration":1921.5,"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":1564.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1564.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":3486,"responseStart":0,"secureConnectionStart":0},{"duration":1876.5999999046326,"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":1564.6000001430511,"connectEnd":1564.6000001430511,"connectStart":1564.6000001430511,"domainLookupEnd":1564.6000001430511,"domainLookupStart":1564.6000001430511,"fetchStart":1564.6000001430511,"redirectEnd":0,"redirectStart":0,"requestStart":1564.6000001430511,"responseEnd":3441.2000000476837,"responseStart":3441.2000000476837,"secureConnectionStart":1564.6000001430511},{"duration":3147.4000000953674,"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":1565.7000000476837,"connectEnd":1565.7000000476837,"connectStart":1565.7000000476837,"domainLookupEnd":1565.7000000476837,"domainLookupStart":1565.7000000476837,"fetchStart":1565.7000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":1565.7000000476837,"responseEnd":4713.100000143051,"responseStart":4713.100000143051,"secureConnectionStart":1565.7000000476837},{"duration":3310.2000000476837,"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":1565.7000000476837,"connectEnd":1565.7000000476837,"connectStart":1565.7000000476837,"domainLookupEnd":1565.7000000476837,"domainLookupStart":1565.7000000476837,"fetchStart":1565.7000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":1565.7000000476837,"responseEnd":4875.900000095367,"responseStart":4875.900000095367,"secureConnectionStart":1565.7000000476837},{"duration":1252.3999998569489,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":3499.100000143051,"connectEnd":3499.100000143051,"connectStart":3499.100000143051,"domainLookupEnd":3499.100000143051,"domainLookupStart":3499.100000143051,"fetchStart":3499.100000143051,"redirectEnd":0,"redirectStart":0,"requestStart":3499.100000143051,"responseEnd":4751.5,"responseStart":4751.5,"secureConnectionStart":3499.100000143051}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":1390,"responseStart":1556,"responseEnd":1558,"domLoading":1560,"domInteractive":4907,"domContentLoadedEventStart":4907,"domContentLoadedEventEnd":4956,"domComplete":6904,"loadEventStart":6904,"loadEventEnd":6906,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":4882.600000143051},{"name":"bigPipe.sidebar-id.end","time":4883.299999952316},{"name":"bigPipe.activity-panel-pipe-id.start","time":4883.5},{"name":"bigPipe.activity-panel-pipe-id.end","time":4886.100000143051},{"name":"activityTabFullyLoaded","time":4964.700000047684}],"measures":[],"correlationId":"c2ded1cc8a6ba2","effectiveType":"4g","downlink":9.6,"rtt":0,"serverDuration":97,"dbReadsTimeInMs":14,"dbConnsTimeInMs":24,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}