CREATE TABLE t (a INT, b INT, c INT);
|
INSERT INTO t VALUES (1,2,3),(4,5,6);
|
CREATE ALGORITHM=TEMPTABLE VIEW v1 AS SELECT * FROM t;
|
CREATE VIEW v2 AS SELECT * FROM v1;
|
PREPARE stmt FROM 'UPDATE t SET a = 0 WHERE b IN (SELECT c FROM v2)';
|
EXECUTE stmt;
|
EXECUTE stmt;
|
|
# Cleanup
|
DROP VIEW v2;
|
DROP VIEW v1;
|
DROP TABLE t;
|
10.5 3cd706b107d3a0ada15aa8728ba876fc161ac0d5
|
mariadbd: /data/bld/10.5-asan/mysys/my_alloc.c:212: alloc_root: Assertion `(mem_root->flags & 4) == 0' failed.
|
241024 18:33:46 [ERROR] mysqld got signal 6 ;
|
|
#9 0x00007f9d03e53e32 in __GI___assert_fail (assertion=0x563bc8917960 "(mem_root->flags & 4) == 0", file=0x563bc8917660 "/data/bld/10.5-asan/mysys/my_alloc.c", line=212, function=0x563bc8917c80 <__PRETTY_FUNCTION__.0> "alloc_root") at ./assert/assert.c:101
|
#10 0x0000563bc754843b in alloc_root (mem_root=0x61900009f518, length=20) at /data/bld/10.5-asan/mysys/my_alloc.c:212
|
#11 0x0000563bc5460a56 in Query_arena::calloc (this=0x62b000069230, size=20) at /data/bld/10.5-asan/sql/sql_class.h:1218
|
#12 0x0000563bc5c52379 in convert_subq_to_jtbm (parent_join=0x62b000039058, subq_pred=0x62b00009e090, remove_item=0x7f9cfa974700) at /data/bld/10.5-asan/sql/opt_subselect.cc:2073
|
#13 0x0000563bc5c4c9a5 in convert_join_subqueries_to_semijoins (join=0x62b000039058) at /data/bld/10.5-asan/sql/opt_subselect.cc:1330
|
#14 0x0000563bc57d01f1 in JOIN::optimize_inner (this=0x62b000039058) at /data/bld/10.5-asan/sql/sql_select.cc:1994
|
#15 0x0000563bc57cdfc1 in JOIN::optimize (this=0x62b000039058) at /data/bld/10.5-asan/sql/sql_select.cc:1765
|
#16 0x0000563bc57ef188 in mysql_select (thd=0x62b000069218, tables=0x62b00009bfa8, fields=..., conds=0x629000255668, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2200096997504, result=0x62b000038f30, unit=0x62b00009a310, select_lex=0x62b00009ab48) at /data/bld/10.5-asan/sql/sql_select.cc:4904
|
#17 0x0000563bc5a34e7f in mysql_multi_update (thd=0x62b000069218, table_list=0x62b00009bfa8, fields=0x62b00009acb0, values=0x62b00009b270, conds=0x629000255668, options=0, handle_duplicates=DUP_ERROR, ignore=false, unit=0x62b00009a310, select_lex=0x62b00009ab48, result=0x7f9cfa9752c0) at /data/bld/10.5-asan/sql/sql_update.cc:2003
|
#18 0x0000563bc5717cf2 in mysql_execute_command (thd=0x62b000069218) at /data/bld/10.5-asan/sql/sql_parse.cc:4574
|
#19 0x0000563bc57872c6 in Prepared_statement::execute (this=0x61900009f198, expanded_query=0x7f9cfa975d70, open_cursor=false) at /data/bld/10.5-asan/sql/sql_prepare.cc:5131
|
#20 0x0000563bc578240d in Prepared_statement::execute_loop (this=0x61900009f198, expanded_query=0x7f9cfa975d70, open_cursor=false, packet=0x0, packet_end=0x0) at /data/bld/10.5-asan/sql/sql_prepare.cc:4553
|
#21 0x0000563bc577be47 in mysql_sql_stmt_execute (thd=0x62b000069218) at /data/bld/10.5-asan/sql/sql_prepare.cc:3594
|
#22 0x0000563bc5714624 in mysql_execute_command (thd=0x62b000069218) at /data/bld/10.5-asan/sql/sql_parse.cc:4045
|
#23 0x0000563bc5730fab in mysql_parse (thd=0x62b000069218, rawbuf=0x62b000038238 "EXECUTE stmt", length=12, parser_state=0x7f9cfa976c70, is_com_multi=false, is_next_command=false) at /data/bld/10.5-asan/sql/sql_parse.cc:8237
|
#24 0x0000563bc5706291 in dispatch_command (command=COM_QUERY, thd=0x62b000069218, packet=0x629000235219 "EXECUTE stmt", packet_length=12, is_com_multi=false, is_next_command=false) at /data/bld/10.5-asan/sql/sql_parse.cc:1891
|
#25 0x0000563bc5702c24 in do_command (thd=0x62b000069218) at /data/bld/10.5-asan/sql/sql_parse.cc:1375
|
#26 0x0000563bc5b5c643 in do_handle_one_connection (connect=0x608000002ab8, put_in_cache=true) at /data/bld/10.5-asan/sql/sql_connect.cc:1407
|
#27 0x0000563bc5b5c1a9 in handle_one_connection (arg=0x608000002a38) at /data/bld/10.5-asan/sql/sql_connect.cc:1319
|
#28 0x0000563bc67b963a in pfs_spawn_thread (arg=0x615000006c18) at /data/bld/10.5-asan/storage/perfschema/pfs.cc:2201
|
#29 0x00007f9d03ea8044 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
|
#30 0x00007f9d03f2861c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
|
The failure started happening after this commit in 10.5:
commit 2c3e07df473e26807f097e7a5905f004ef53e890
|
Author: Yuchen Pei
|
Date: Fri Sep 6 11:34:31 2024 +1000
|
|
MDEV-34447: Memory leakage is detected on running the test main.ps against the server 11.1
|
- is caused by
-
MDEV-34447
Memory leakage is detected on running the test main.ps against the server 11.1
-
-
Closed
{"report":{"fcp":1509.2000002861023,"ttfb":773,"pageVisibility":"visible","entityId":131340,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"3626b5f5-66db-4e99-9cd2-74085624dda0","navigationType":0,"readyForUser":1606.4000000953674,"redirectCount":0,"resourceLoadedEnd":1774.9000000953674,"resourceLoadedStart":778.2000002861023,"resourceTiming":[{"duration":184.19999980926514,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":778.2000002861023,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":778.2000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":962.4000000953674,"responseStart":0,"secureConnectionStart":0},{"duration":184.40000009536743,"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":778.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":778.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":962.9000000953674,"responseStart":0,"secureConnectionStart":0},{"duration":240.19999980926514,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":778.7000002861023,"connectEnd":778.7000002861023,"connectStart":778.7000002861023,"domainLookupEnd":778.7000002861023,"domainLookupStart":778.7000002861023,"fetchStart":778.7000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":778.7000002861023,"responseEnd":1018.9000000953674,"responseStart":1018.9000000953674,"secureConnectionStart":778.7000002861023},{"duration":316.59999990463257,"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":778.9000000953674,"connectEnd":778.9000000953674,"connectStart":778.9000000953674,"domainLookupEnd":778.9000000953674,"domainLookupStart":778.9000000953674,"fetchStart":778.9000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":778.9000000953674,"responseEnd":1095.5,"responseStart":1095.5,"secureConnectionStart":778.9000000953674},{"duration":319.7999997138977,"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":779.1000003814697,"connectEnd":779.1000003814697,"connectStart":779.1000003814697,"domainLookupEnd":779.1000003814697,"domainLookupStart":779.1000003814697,"fetchStart":779.1000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":779.1000003814697,"responseEnd":1098.9000000953674,"responseStart":1098.9000000953674,"secureConnectionStart":779.1000003814697},{"duration":320,"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":779.3000001907349,"connectEnd":779.3000001907349,"connectStart":779.3000001907349,"domainLookupEnd":779.3000001907349,"domainLookupStart":779.3000001907349,"fetchStart":779.3000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":779.3000001907349,"responseEnd":1099.3000001907349,"responseStart":1099.3000001907349,"secureConnectionStart":779.3000001907349},{"duration":320.2000002861023,"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":779.5,"connectEnd":779.5,"connectStart":779.5,"domainLookupEnd":779.5,"domainLookupStart":779.5,"fetchStart":779.5,"redirectEnd":0,"redirectStart":0,"requestStart":779.5,"responseEnd":1099.7000002861023,"responseStart":1099.7000002861023,"secureConnectionStart":779.5},{"duration":384.3999996185303,"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":779.6000003814697,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":779.6000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1164,"responseStart":0,"secureConnectionStart":0},{"duration":320.40000009536743,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":779.7000002861023,"connectEnd":779.7000002861023,"connectStart":779.7000002861023,"domainLookupEnd":779.7000002861023,"domainLookupStart":779.7000002861023,"fetchStart":779.7000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":779.7000002861023,"responseEnd":1100.1000003814697,"responseStart":1100.1000003814697,"secureConnectionStart":779.7000002861023},{"duration":384.1000003814697,"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":780,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":780,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1164.1000003814697,"responseStart":0,"secureConnectionStart":0},{"duration":320.6000003814697,"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":780,"connectEnd":780,"connectStart":780,"domainLookupEnd":780,"domainLookupStart":780,"fetchStart":780,"redirectEnd":0,"redirectStart":0,"requestStart":780,"responseEnd":1100.6000003814697,"responseStart":1100.6000003814697,"secureConnectionStart":780},{"duration":532.7999997138977,"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":785.7000002861023,"connectEnd":785.7000002861023,"connectStart":785.7000002861023,"domainLookupEnd":785.7000002861023,"domainLookupStart":785.7000002861023,"fetchStart":785.7000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":785.7000002861023,"responseEnd":1318.5,"responseStart":1318.5,"secureConnectionStart":785.7000002861023},{"duration":983.5,"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":785.8000001907349,"connectEnd":785.8000001907349,"connectStart":785.8000001907349,"domainLookupEnd":785.8000001907349,"domainLookupStart":785.8000001907349,"fetchStart":785.8000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":785.8000001907349,"responseEnd":1769.3000001907349,"responseStart":1769.3000001907349,"secureConnectionStart":785.8000001907349},{"duration":174.30000019073486,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":1176.3000001907349,"connectEnd":1176.3000001907349,"connectStart":1176.3000001907349,"domainLookupEnd":1176.3000001907349,"domainLookupStart":1176.3000001907349,"fetchStart":1176.3000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":1176.3000001907349,"responseEnd":1350.6000003814697,"responseStart":1350.6000003814697,"secureConnectionStart":1176.3000001907349},{"duration":313,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/e65b778d185daf5aee24936755b43da6/_/download/contextbatch/js/browser-metrics-plugin.contrib,-_super,-jira.view.issue,-jira.navigator.kickass,-viewissue.standalone,-atl.general/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true&whisper-enabled=true","startTime":1461.9000000953674,"connectEnd":1461.9000000953674,"connectStart":1461.9000000953674,"domainLookupEnd":1461.9000000953674,"domainLookupStart":1461.9000000953674,"fetchStart":1461.9000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":1461.9000000953674,"responseEnd":1774.9000000953674,"responseStart":1774.9000000953674,"secureConnectionStart":1461.9000000953674}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":592,"responseStart":773,"responseEnd":780,"domLoading":776,"domInteractive":1795,"domContentLoadedEventStart":1795,"domContentLoadedEventEnd":1842,"domComplete":2070,"loadEventStart":2070,"loadEventEnd":2070,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1770.9000000953674},{"name":"bigPipe.sidebar-id.end","time":1771.9000000953674},{"name":"bigPipe.activity-panel-pipe-id.start","time":1772},{"name":"bigPipe.activity-panel-pipe-id.end","time":1774.2000002861023},{"name":"activityTabFullyLoaded","time":1863.3000001907349}],"measures":[],"correlationId":"8014e5a8e4b979","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":118,"dbReadsTimeInMs":16,"dbConnsTimeInMs":26,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
I can confirm that this bug does not reproduce at the original
MDEV-34447commit at 11.1 e012407397c65df62f9d62577849a80959962fa9, so it looks like purely a problem caused by the backport