[MDEV-28589] Mariadb signal11 crash and restart after select Created: 2022-05-17 Updated: 2022-06-20 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - Aria |
| Affects Version/s: | 10.4.18 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | yongjian.wu | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 1 |
| Labels: | crash, signal | ||
| Environment: |
MariaDB single |
||
| Attachments: |
|
| Description |
|
Hi, I might an issue with my PROD database. the SQL statement below is not a one time query, it will take exec lots of times per hour
|
| Comments |
| Comment by Daniel Black [ 2022-05-18 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Thank you for the bug report. Is the query crashing on every occurrence? Thanks for providing the gdb backtrace. Unfortunately the crash is in a different thread. If you still have a core file, please use thread apply all bt -frame-arguments all full. If you are on an older RHEL7 version of gdb:
The crash is in the temporary table creation. Altering your query to:
With an OP_SESSION_JOB_LIST index on (TR_ID, EXECT_ORDER might be sufficient to avoid the temporary table creation, avoid the crash, and might even be quicker. I haven't seen anything in later versions that may fix this. f24038b8515864e496dd2c55d973a0227b3698df changes allocations, but it shouldn't materially affect this bug report. Note: changed to Aria, because even though the tables might be innodb, Aria is used as the temporary table and its in here that the crash occurs. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by yongjian.wu [ 2022-05-18 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Hi Daniel | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Black [ 2022-05-18 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Glad to know its not a frequent occurrence. It could be starting to happen now as the nature of the data changes a new query plan happens. "Perfect" crash gdb report, thanks. Extracting for read/search-ability: memcpy code location ma_blockrec.c#L3453
Not sure yet. When I look closer something may relieve itself. Is the normally query execution plan for this query to create a temp table? Based of the backtrace length could this be a fully populated blob column of this particular TR_ID? A gdb p *column as this thread 5 location using up to get to the right function might be insightful. And at least a partial table definition around this column. Sorry adding the index didn't help. You did change A.TR_ID = X to B.TR_ID = X in the query? Either way thanks for the feedback. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by yongjian.wu [ 2022-05-18 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
thanks for your quick response could you let me know how can you analyze that this case crash point is temporary table creation, which part error message can get this or ..... ? and is there a newer version that can fix this issue? | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Black [ 2022-05-18 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
The blob/text field could be any of the result columns.
I don't think a newer version would fix this, there just hasn't been much changes in code in this area recently. There maybe other fixes elsewhere that I haven't seen that affect this. If you had a repeatable crash, it would be appreciated a test on a latest 10.4 to confirm. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by yongjian.wu [ 2022-05-18 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
thanks, buddy | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by yongjian.wu [ 2022-05-19 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Hi Daniel if we change the tmp engine to myisam by "aria_used_for_temp_tables" "OFF" , if this issue can be avoided? | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Black [ 2022-05-19 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
A tmp engine to myisam is possible, however the code base is rather stagnant and you could run into more issues rather than less (especially as its a non-default setting). I haven't looked how different the myisam implementation of write_block_record is. Changing column definitions to varchar rather than text will certainly avoid this bit of code. Is your text type a LONGTEXT by chance? From the backtrace length=4294967288 is 2^32 - 8(size of a pointer), if correct, implies longtext which certainly won't fit in a varchar. Are any of your text fields particularly large that could make length a miscalculation? | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by yongjian.wu [ 2022-05-19 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Unfortunately for the application side, it is a vendor Product and only provides to us as a package.it is difficult for us to make change. that's why we are thinking temporary solution from the db side. And for this application their original environment is using amazon aurora but never faced the issue like this time we met, we are trying to migrate it to MariaDB. All of the columns defined with text is "text COLLATE utf8mb4_unicode_ci DEFAULT NULL",is it safe to transfer to varchar? | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Black [ 2022-05-23 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
safety depends on ensuring that the data in those columns can fit inside the varchar. Aside from that I can't think of any functional differences. |