Skip to content
/ server Public

MDEV-39113 addr2line stack resolver deterimental#4822

Open
grooverdan wants to merge 1 commit intoMariaDB:10.11from
grooverdan:MDEV-39113
Open

MDEV-39113 addr2line stack resolver deterimental#4822
grooverdan wants to merge 1 commit intoMariaDB:10.11from
grooverdan:MDEV-39113

Conversation

@grooverdan
Copy link
Member

MSAN/ASAN test environment, the addr2line was so high in memory utilization that it was the pick of the OOM killer to resolve the OOM situation.

In addition to this harmful effect, its resolution is of such a poor quality compared to a) the implementation of the sanitizers themselves, and b) the core dump and gdb resolution that is most common for these environments that use these instrumented builds.

To resolve this, under MSAN and ASAN builds the stack-trace defaults to 0 (off).

MariaDB-backup also forces the enabling of stack-trace. Disabling this unconditionally reduces the risk of a user operational impact if a lengthly stacktrace starting in a mariabackup critical locked period.

MSAN/ASAN test environment, the addr2line was so high in memory
utilization that it was the pick of the OOM killer to resolve the
OOM situation.

In addition to this harmful effect, its resolution is of such a poor
quality compared to a) the implementation of the sanitizers themselves,
and b) the core dump and gdb resolution that is most common for these
environments that use these instrumented builds.

To resolve this, under MSAN and ASAN builds the stack-trace defaults to
0 (off).

MariaDB-backup also forces the enabling of stack-trace. Disabling this
unconditionally reduces the risk of a user operational impact if a
lengthly stacktrace starting in a mariabackup critical locked period.
Copy link
Contributor

@dr-m dr-m left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks reasonable to me. I think that we should ask @vuvova as well.

Personally, I would disable opt_stack_trace by default everywhere, because based on MDEV-21010 we know that it can cause the server process to hang when malloc() or free() crashes because of heap memory corruption.

@vaintroub
Copy link
Member

vaintroub commented Mar 19, 2026

This looks reasonable to me. I think that we should ask @vuvova as well.

Personally, I would disable opt_stack_trace by default everywhere, because based on MDEV-21010 we know that it can cause the server process to hang when malloc() or free() crashes because of heap memory corruption.

You can maybe disable it on Linux everywhere, because it does not really work. But we do not know of process hangs anywhere else.

@grooverdan
Copy link
Member Author

I'm very much in favour of total disable by default too. The OS is better at capturing stacks and with instruction can result in something actually usable in a bug report.

@vaintroub
Copy link
Member

vaintroub commented Mar 20, 2026

I'm very much in favour of total disable by default too. The OS is better at capturing stacks and with instruction can result in something actually usable in a bug report.

We absolutely agree that on Linux, the crash stacktrace is unusable. If you mean Linux by The OS, ok. You can totally disable it there.

But if you show me a bug report on Windows, where it is not usable, I'd agree in general. Until then, I propose you disable it, only where it does not really work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

MariaDB Foundation Pull requests created by MariaDB Foundation

Development

Successfully merging this pull request may close these issues.

4 participants