[MDEV-25316] Memory corruption assertion failure for INSERT ... SELECT involving two Spider tables Created: 2021-04-01 Updated: 2021-06-03 Resolved: 2021-05-27 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - Spider |
| Affects Version/s: | 10.4.17 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Valerii Kravchuk | Assignee: | Valerii Kravchuk |
| Resolution: | Cannot Reproduce | Votes: | 0 |
| Labels: | need_feedback | ||
| Environment: |
Docker image from https://hub.docker.com/_/mariadb |
||
| Description |
|
Statement like this:
trying to insert some 20+ rows ends up with the malloc-related assertion failure:
There is no assertion failure if we LIMIT number of rows to, say, 5, or if we use intermediate non-Spider table to store SELECT result. I can not reproduce this locally outside of Docker image. Getting the core dump in a hope to see more details about the place in the code where assertion failure happens is problematic, as usual steps seem not to work for this Docker image (suggestions are appreciated). |
| Comments |
| Comment by Daniel Black [ 2021-04-12 ] | ||
|
valerii I assume this was you where asking about in getting a core dump within a container. It it repeatable outside a container? Do you know where 'corrupted size vs. prev_size' comes from? I can't find it in the server codebase. | ||
| Comment by Valerii Kravchuk [ 2021-04-12 ] | ||
|
Customer uses that Docker image listed in the Environment, crash happened only there (sometimes, depending on numerous conditions), and I was not able to reproduce it with my tests locally. The assertion failure is in glibc I assume, while freeing memory, like in this discussion: https://stackoverflow.com/questions/49628615/understanding-corrupted-size-vs-prev-size-glibc-error At least this is what Google searches gives me. | ||
| Comment by Daniel Black [ 2021-04-13 ] | ||
|
note: the environment variable UBSAN_OPTIONS=print_stacktrace=1 to get strack traces directly from instrumentation. | ||
| Comment by Roel Van de Paar [ 2021-04-13 ] | ||
|
danblack Ah yes, forgot to mention that. valerii I recommend setting all these:
|