at /test/11.1_dbg/storage/spider/spd_malloc.cc:180
[Current thread is 1 (Thread 0x14e9e48dd640 (LWP 3317775))]
(gdb) bt
#0 spider_free_mem (trx=0x14e9800545b8, ptr=ptr@entry=0x0, my_flags=my_flags@entry=0) at /test/11.1_dbg/storage/spider/spd_malloc.cc:180
#1 0x000014e9e48132ac in ha_spider::~ha_spider (this=0x14e98008f6d0, __in_chrg=<optimized out>) at /test/11.1_dbg/storage/spider/ha_spider.cc:182
#2 0x000014e9e481338b in ha_spider::~ha_spider (this=0x14e98008f6d0, __in_chrg=<optimized out>) at /test/11.1_dbg/storage/spider/ha_spider.cc:187
#3 0x0000558f35f884ec in ha_partition::~ha_partition (this=0x14e98008e560, __in_chrg=<optimized out>) at /test/11.1_dbg/sql/ha_partition.cc:487
#4 0x0000558f35f88613 in ha_partition::~ha_partition (this=0x14e98008e560, __in_chrg=<optimized out>) at /test/11.1_dbg/sql/ha_partition.cc:501
#5 0x0000558f35b4189e in open_table_from_share (thd=thd@entry=0x14e980000d58, share=share@entry=0x14e980030f20, alias=alias@entry=0x14e980013860, db_stat=db_stat@entry=33, prgflag=prgflag@entry=8, ha_open_flags=<optimized out>, outparam=0x14e980032768, is_create_table=false, partitions_to_open=0x0) at /test/11.1_dbg/sql/table.cc:4643
#6 0x0000558f359a6e0d in open_table (thd=thd@entry=0x14e980000d58, table_list=table_list@entry=0x14e980013818, ot_ctx=ot_ctx@entry=0x14e9e48db7b0) at /test/11.1_dbg/sql/sql_base.cc:2210
#7 0x0000558f359aa86d in open_and_process_table (ot_ctx=0x14e9e48db7b0, has_prelocking_list=false, prelocking_strategy=0x14e9e48db8a0, flags=0, counter=0x14e9e48db84c, tables=0x14e980013818, thd=0x14e980000d58) at /test/11.1_dbg/sql/sql_base.cc:4140
#9 0x0000558f359ab70e in open_and_lock_tables (thd=thd@entry=0x14e980000d58, options=<optimized out>, tables=<optimized out>, tables@entry=0x14e980013818, derived=derived@entry=true, flags=flags@entry=0, prelocking_strategy=prelocking_strategy@entry=0x14e9e48db8a0) at /test/11.1_dbg/sql/sql_base.cc:5601
#10 0x0000558f35a19f7d in open_and_lock_tables (flags=0, derived=true, tables=0x14e980013818, thd=0x14e980000d58) at /test/11.1_dbg/sql/sql_base.h:525
#11 execute_sqlcom_select (thd=thd@entry=0x14e980000d58, all_tables=0x14e980013818) at /test/11.1_dbg/sql/sql_parse.cc:5944
#12 0x0000558f35a25a1c in mysql_execute_command (thd=thd@entry=0x14e980000d58, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /test/11.1_dbg/sql/sql_parse.cc:3944
#13 0x0000558f35a2bfad in mysql_parse (thd=thd@entry=0x14e980000d58, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x14e9e48dc230) at /test/11.1_dbg/sql/sql_parse.cc:7760
#14 0x0000558f35a2e141 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x14e980000d58, packet=packet@entry=0x14e98000ae49 "SELECT * FROM t", packet_length=packet_length@entry=15, blocking=blocking@entry=true) at /test/11.1_dbg/sql/sql_class.h:242
#15 0x0000558f35a2ff9d in do_command (thd=0x14e980000d58, blocking=blocking@entry=true) at /test/11.1_dbg/sql/sql_parse.cc:1405
#16 0x0000558f35b81e5a in do_handle_one_connection (connect=<optimized out>, connect@entry=0x558f397cd4c8, put_in_cache=put_in_cache@entry=true) at /test/11.1_dbg/sql/sql_connect.cc:1416
#17 0x0000558f35b820b9 in handle_one_connection (arg=0x558f397cd4c8) at /test/11.1_dbg/sql/sql_connect.cc:1318
#18 0x000014ea03094b43 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#19 0x000014ea03126a00 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
81760603246 upstream/bb-10.5-mdev-31475 MDEV-31475 Spider: only reset wide_handler when owning it
70ed223a7f3 MDEV-31475 remove unnecessary assignment to spider share init_error
A note on testcases: as Roel mentioned, the test case in the description no longer reproduces. The first and the second testcases are equivalent, so in the patch I include the first and the third testcases.
Yuchen Pei
added a comment - - edited Hi holyfoot , ptal thanks
81760603246 upstream/bb-10.5-mdev-31475 MDEV-31475 Spider: only reset wide_handler when owning it
70ed223a7f3 MDEV-31475 remove unnecessary assignment to spider share init_error
A note on testcases: as Roel mentioned, the test case in the description no longer reproduces. The first and the second testcases are equivalent, so in the patch I include the first and the third testcases.
Thanks for the review, pushed the following to 10.5
698dae54eff upstream/bb-10.5-mdev-31475 upstream/10.5 MDEV-31475 Spider: only reset wide_handler when owning it
86adee38067 MDEV-31475 remove unnecessary assignment to spider share init_error
Yuchen Pei
added a comment - Thanks for the review, pushed the following to 10.5
698dae54eff upstream/bb-10.5-mdev-31475 upstream/10.5 MDEV-31475 Spider: only reset wide_handler when owning it
86adee38067 MDEV-31475 remove unnecessary assignment to spider share init_error
Alas, there was a bad typo in the commit message. It should be the following (note the added NOT)
MDEV-31475 Spider: only reset wide_handler when NOT owning it
A wide_handler is shared among ha_spider of partitions of the same
spider table, where the last partition is designated the owner of the
wide_handler, and is responsible for its deallocation. Therefore in
case of failure, we only reset wide_handler in error handling if the
current ha_spider is the NOT owner of the wide_handler, otherwise it will
result in segv in the destructor of ha_spider, or during
ha_spider::close().
Yuchen Pei
added a comment - Alas, there was a bad typo in the commit message. It should be the following (note the added NOT)
MDEV-31475 Spider: only reset wide_handler when NOT owning it
A wide_handler is shared among ha_spider of partitions of the same
spider table, where the last partition is designated the owner of the
wide_handler, and is responsible for its deallocation. Therefore in
case of failure, we only reset wide_handler in error handling if the
current ha_spider is the NOT owner of the wide_handler, otherwise it will
result in segv in the destructor of ha_spider, or during
ha_spider::close().
People
Yuchen Pei
Roel Van de Paar
Votes:
0Vote for this issue
Watchers:
3Start watching this issue
Dates
Created:
Updated:
Resolved:
Git Integration
Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.
{"report":{"fcp":1855,"ttfb":826.0999999046326,"pageVisibility":"visible","entityId":122763,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"bcb314fb-ca2a-41aa-be3a-bc350aa0369b","navigationType":0,"readyForUser":1971,"redirectCount":0,"resourceLoadedEnd":1588.5,"resourceLoadedStart":834.5999999046326,"resourceTiming":[{"duration":413.5,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":834.5999999046326,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":834.5999999046326,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1248.0999999046326,"responseStart":0,"secureConnectionStart":0},{"duration":413.80000019073486,"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":834.7999997138977,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":834.7999997138977,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1248.5999999046326,"responseStart":0,"secureConnectionStart":0},{"duration":637.5999999046326,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":835,"connectEnd":835,"connectStart":835,"domainLookupEnd":835,"domainLookupStart":835,"fetchStart":835,"redirectEnd":0,"redirectStart":0,"requestStart":1260.2999997138977,"responseEnd":1472.5999999046326,"responseStart":1305.1999998092651,"secureConnectionStart":835},{"duration":747.5,"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":835.1999998092651,"connectEnd":835.1999998092651,"connectStart":835.1999998092651,"domainLookupEnd":835.1999998092651,"domainLookupStart":835.1999998092651,"fetchStart":835.1999998092651,"redirectEnd":0,"redirectStart":0,"requestStart":1259.5,"responseEnd":1582.6999998092651,"responseStart":1292.0999999046326,"secureConnectionStart":835.1999998092651},{"duration":458.2999997138977,"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":835.5,"connectEnd":835.5,"connectStart":835.5,"domainLookupEnd":835.5,"domainLookupStart":835.5,"fetchStart":835.5,"redirectEnd":0,"redirectStart":0,"requestStart":1259.5999999046326,"responseEnd":1293.7999997138977,"responseStart":1280.1999998092651,"secureConnectionStart":835.5},{"duration":454,"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":835.5999999046326,"connectEnd":835.5999999046326,"connectStart":835.5999999046326,"domainLookupEnd":835.5999999046326,"domainLookupStart":835.5999999046326,"fetchStart":835.5999999046326,"redirectEnd":0,"redirectStart":0,"requestStart":1259.8999996185303,"responseEnd":1289.5999999046326,"responseStart":1278,"secureConnectionStart":835.5999999046326},{"duration":467.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":835.7999997138977,"connectEnd":835.7999997138977,"connectStart":835.7999997138977,"domainLookupEnd":835.7999997138977,"domainLookupStart":835.7999997138977,"fetchStart":835.7999997138977,"redirectEnd":0,"redirectStart":0,"requestStart":1262.2999997138977,"responseEnd":1303,"responseStart":1290.0999999046326,"secureConnectionStart":835.7999997138977},{"duration":425.8999996185303,"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":836,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":836,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1261.8999996185303,"responseStart":0,"secureConnectionStart":0},{"duration":471.09999990463257,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":836.1999998092651,"connectEnd":836.1999998092651,"connectStart":836.1999998092651,"domainLookupEnd":836.1999998092651,"domainLookupStart":836.1999998092651,"fetchStart":836.1999998092651,"redirectEnd":0,"redirectStart":0,"requestStart":1266.7999997138977,"responseEnd":1307.2999997138977,"responseStart":1295.3999996185303,"secureConnectionStart":836.1999998092651},{"duration":429.80000019073486,"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":836.3999996185303,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":836.3999996185303,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1266.1999998092651,"responseStart":0,"secureConnectionStart":0},{"duration":474.8999996185303,"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":836.5,"connectEnd":836.5,"connectStart":836.5,"domainLookupEnd":836.5,"domainLookupStart":836.5,"fetchStart":836.5,"redirectEnd":0,"redirectStart":0,"requestStart":1272.1999998092651,"responseEnd":1311.3999996185303,"responseStart":1303.5,"secureConnectionStart":836.5},{"duration":742.9000000953674,"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":840.3999996185303,"connectEnd":840.3999996185303,"connectStart":840.3999996185303,"domainLookupEnd":840.3999996185303,"domainLookupStart":840.3999996185303,"fetchStart":840.3999996185303,"redirectEnd":0,"redirectStart":0,"requestStart":1396.5999999046326,"responseEnd":1583.2999997138977,"responseStart":1577.3999996185303,"secureConnectionStart":840.3999996185303},{"duration":748,"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":840.5,"connectEnd":840.5,"connectStart":840.5,"domainLookupEnd":840.5,"domainLookupStart":840.5,"fetchStart":840.5,"redirectEnd":0,"redirectStart":0,"requestStart":1570.7999997138977,"responseEnd":1588.5,"responseStart":1585.3999996185303,"secureConnectionStart":840.5},{"duration":208.5,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":1603.6999998092651,"connectEnd":1603.6999998092651,"connectStart":1603.6999998092651,"domainLookupEnd":1603.6999998092651,"domainLookupStart":1603.6999998092651,"fetchStart":1603.6999998092651,"redirectEnd":0,"redirectStart":0,"requestStart":1777,"responseEnd":1812.1999998092651,"responseStart":1811,"secureConnectionStart":1603.6999998092651},{"duration":228.09999990463257,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":1844.7999997138977,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1844.7999997138977,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":2072.8999996185303,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":224,"responseStart":826,"responseEnd":837,"domLoading":831,"domInteractive":2080,"domContentLoadedEventStart":2080,"domContentLoadedEventEnd":2131,"domComplete":2874,"loadEventStart":2874,"loadEventEnd":2875,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":2054.8999996185303},{"name":"bigPipe.sidebar-id.end","time":2055.699999809265},{"name":"bigPipe.activity-panel-pipe-id.start","time":2055.8999996185303},{"name":"bigPipe.activity-panel-pipe-id.end","time":2057.8999996185303},{"name":"activityTabFullyLoaded","time":2152.0999999046326}],"measures":[],"correlationId":"f315e7fdb60f81","effectiveType":"4g","downlink":9,"rtt":0,"serverDuration":108,"dbReadsTimeInMs":12,"dbConnsTimeInMs":21,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
The original testcase no longer produces a SIGSEGV nor UBSAN issue now.