[MDEV-29962] SIGSEGV in ha_spider::lock_tables on BEGIN after table lock Created: 2022-11-07 Updated: 2024-01-29 |
|
| Status: | Stalled |
| Project: | MariaDB Server |
| Component/s: | Locking, Storage Engine - Spider |
| Affects Version/s: | 10.5, 10.6, 10.7, 10.8, 10.9, 10.10, 10.11 |
| Fix Version/s: | 10.5, 10.6 |
| Type: | Bug | Priority: | Major |
| Reporter: | Roel Van de Paar | Assignee: | Yuchen Pei |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | locking | ||
| Issue Links: |
|
||||||||||||||||||||||||||||||||||||||||
| Description |
|
Not a new regression. The crash is present in optimized builds only, debug builds seem to work fine.
Leads to:
Bug confirmed present in: Bug (or feature/syntax) confirmed not present in: |
| Comments |
| Comment by Roel Van de Paar [ 2022-11-07 ] | |||||||||||||||||||||||||||||||||
|
I made a matching MTR test as well:
Which crashes in the same way. When ENGINE=InnoDB clause is removed (i.e. MyISAM default for MTR), it produces another outcome:
| |||||||||||||||||||||||||||||||||
| Comment by Roel Van de Paar [ 2022-11-07 ] | |||||||||||||||||||||||||||||||||
|
When trying the alternative MTR-like (i.e. using MYISAM) testcase at the CLI:
We get the same crash, so it is interesting that MTR fails in a different way when using MyISAM. | |||||||||||||||||||||||||||||||||
| Comment by Yuchen Pei [ 2023-10-11 ] | |||||||||||||||||||||||||||||||||
|
Hi holyfoot, ptal thanks
The above is based on 11.0. Also tested on
| |||||||||||||||||||||||||||||||||
| Comment by Yuchen Pei [ 2023-10-11 ] | |||||||||||||||||||||||||||||||||
|
Sorry, I need to re-work this, because the problem in MDEV-27902 Here's the case for 10.4, it is the same as the original case and
We also need to check why the heap-use-after-free happens at We will use this ticket to fix all heap-use-after-free of | |||||||||||||||||||||||||||||||||
| Comment by Yuchen Pei [ 2023-12-07 ] | |||||||||||||||||||||||||||||||||
|
I think we should just take the simple approach, like in I'll take a look at the problem similar to MDEV-26540 when running the | |||||||||||||||||||||||||||||||||
| Comment by Yuchen Pei [ 2023-12-07 ] | |||||||||||||||||||||||||||||||||
|
Hi holyfoot, ptal thanks
for a 10.5 patch, see d1110a81484 upstream/bb-10.5-mdev-29962 MDEV-29962 Spider: creates connections if needed before lock_tables() | |||||||||||||||||||||||||||||||||
| Comment by Alexey Botchkov [ 2023-12-20 ] | |||||||||||||||||||||||||||||||||
|
please check if the spider_check_trx_and_get_conn() can only be called | |||||||||||||||||||||||||||||||||
| Comment by Yuchen Pei [ 2023-12-21 ] | |||||||||||||||||||||||||||||||||
|
holyfoot, if I do that (i.e. apply the following diff on top, see commit 1b8db551a7d5dba054e80e74682c47899ac1b2af) I get heap-use-after-free when testing spider/bugfix.mdev_29962, so I think the function should be called regardless.
|