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":1249.3000000715256,"ttfb":354.5,"pageVisibility":"visible","entityId":122763,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"270676ef-0a9c-490e-a034-0a582cb15096","navigationType":0,"readyForUser":1362.6000000238419,"redirectCount":0,"resourceLoadedEnd":933.8000000715256,"resourceLoadedStart":362.8000000715256,"resourceTiming":[{"duration":266.89999997615814,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":362.8000000715256,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":362.8000000715256,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":629.7000000476837,"responseStart":0,"secureConnectionStart":0},{"duration":267.3000000715256,"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":363.10000002384186,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":363.10000002384186,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":630.4000000953674,"responseStart":0,"secureConnectionStart":0},{"duration":440,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":363.2000000476837,"connectEnd":363.2000000476837,"connectStart":363.2000000476837,"domainLookupEnd":363.2000000476837,"domainLookupStart":363.2000000476837,"fetchStart":363.2000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":635,"responseEnd":803.2000000476837,"responseStart":651,"secureConnectionStart":363.2000000476837},{"duration":570.3999999761581,"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":363.40000009536743,"connectEnd":363.40000009536743,"connectStart":363.40000009536743,"domainLookupEnd":363.40000009536743,"domainLookupStart":363.40000009536743,"fetchStart":363.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":634.8000000715256,"responseEnd":933.8000000715256,"responseStart":656.9000000953674,"secureConnectionStart":363.40000009536743},{"duration":303.89999997615814,"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":363.60000002384186,"connectEnd":363.60000002384186,"connectStart":363.60000002384186,"domainLookupEnd":363.60000002384186,"domainLookupStart":363.60000002384186,"fetchStart":363.60000002384186,"redirectEnd":0,"redirectStart":0,"requestStart":635.2000000476837,"responseEnd":667.5,"responseStart":665.7000000476837,"secureConnectionStart":363.60000002384186},{"duration":334.60000002384186,"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":363.8000000715256,"connectEnd":363.8000000715256,"connectStart":363.8000000715256,"domainLookupEnd":363.8000000715256,"domainLookupStart":363.8000000715256,"fetchStart":363.8000000715256,"redirectEnd":0,"redirectStart":0,"requestStart":638.8000000715256,"responseEnd":698.4000000953674,"responseStart":696.4000000953674,"secureConnectionStart":363.8000000715256},{"duration":335.3000000715256,"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":364,"connectEnd":364,"connectStart":364,"domainLookupEnd":364,"domainLookupStart":364,"fetchStart":364,"redirectEnd":0,"redirectStart":0,"requestStart":638.9000000953674,"responseEnd":699.3000000715256,"responseStart":697,"secureConnectionStart":364},{"duration":271.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":364.3000000715256,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":364.3000000715256,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":636.1000000238419,"responseStart":0,"secureConnectionStart":0},{"duration":322.59999990463257,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":364.40000009536743,"connectEnd":364.40000009536743,"connectStart":364.40000009536743,"domainLookupEnd":364.40000009536743,"domainLookupStart":364.40000009536743,"fetchStart":364.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":639.9000000953674,"responseEnd":687,"responseStart":685.7000000476837,"secureConnectionStart":364.40000009536743},{"duration":274.60000002384186,"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":364.60000002384186,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":364.60000002384186,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":639.2000000476837,"responseStart":0,"secureConnectionStart":0},{"duration":337.2000000476837,"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":364.7000000476837,"connectEnd":364.7000000476837,"connectStart":364.7000000476837,"domainLookupEnd":364.7000000476837,"domainLookupStart":364.7000000476837,"fetchStart":364.7000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":642.5,"responseEnd":701.9000000953674,"responseStart":689,"secureConnectionStart":364.7000000476837},{"duration":527.5,"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":365.60000002384186,"connectEnd":365.60000002384186,"connectStart":365.60000002384186,"domainLookupEnd":365.60000002384186,"domainLookupStart":365.60000002384186,"fetchStart":365.60000002384186,"redirectEnd":0,"redirectStart":0,"requestStart":731.9000000953674,"responseEnd":893.1000000238419,"responseStart":885.8000000715256,"secureConnectionStart":365.60000002384186},{"duration":528.1999999284744,"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":365.8000000715256,"connectEnd":365.8000000715256,"connectStart":365.8000000715256,"domainLookupEnd":365.8000000715256,"domainLookupStart":365.8000000715256,"fetchStart":365.8000000715256,"redirectEnd":0,"redirectStart":0,"requestStart":829.5,"responseEnd":894,"responseStart":889,"secureConnectionStart":365.8000000715256},{"duration":157.5,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":940.5,"connectEnd":940.5,"connectStart":940.5,"domainLookupEnd":940.5,"domainLookupStart":940.5,"fetchStart":940.5,"redirectEnd":0,"redirectStart":0,"requestStart":1066.8000000715256,"responseEnd":1098,"responseStart":1097.1000000238419,"secureConnectionStart":940.5}],"fetchStart":0,"domainLookupStart":67,"domainLookupEnd":78,"connectStart":78,"connectEnd":97,"secureConnectionStart":86,"requestStart":98,"responseStart":354,"responseEnd":357,"domLoading":358,"domInteractive":1486,"domContentLoadedEventStart":1486,"domContentLoadedEventEnd":1565,"domComplete":2416,"loadEventStart":2416,"loadEventEnd":2417,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1449.4000000953674},{"name":"bigPipe.sidebar-id.end","time":1450.3000000715256},{"name":"bigPipe.activity-panel-pipe-id.start","time":1450.3000000715256},{"name":"bigPipe.activity-panel-pipe-id.end","time":1453.2000000476837},{"name":"activityTabFullyLoaded","time":1587.8000000715256}],"measures":[],"correlationId":"9ce9a2be8f26ec","effectiveType":"4g","downlink":9.1,"rtt":0,"serverDuration":181,"dbReadsTimeInMs":13,"dbConnsTimeInMs":24,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
The original testcase no longer produces a SIGSEGV nor UBSAN issue now.