Details
-
Task
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
Description
As the size of core dump files by default mostly equals the process size producing core dumps can become an issue on systems with memory buffers, esp. large innodb_buffer_pool_size.
There needs to be enough file system space to store such large core dumps, and with multi gigabyte files it also takes a non-trivial amount of time to write these, so delaying process restart quite a bit.
And then there's also a security aspect to it: as the core dump contains the complete innodb buffer pool it contains a substantial amount, or even all, of the actual user data in the database.
At the same time actual buffer contents are rarely needed when doing a post mortem analysis (usually we only need stack frames and a few pieces of local data).
So I'm proposing a server option to exclude certain buffers from core dumps by marking them as DONOTDUMP with the madvise() system call.
Attachments
Issue Links
- causes
-
MDEV-18946 munmap of 1 byte during shutdown is EINVAL
-
- Closed
-
- relates to
-
MDEV-17159 Document what is included in core dumps
-
- Closed
-
-
MDEV-16605 Always include buf_madvise_do_dump in binaries.
-
- Closed
-
-
MDEV-20684 innodb: use madvise CORE/NOCORE on FreeBSD for selective large allocations
-
- Closed
-
-
MDEV-21741 [Warning] InnoDB: Failed to set memory to MADV_DONTDUMP: Function not implemented
-
- Closed
-
-
MDEV-22186 Please add innodb_buffer_pool_in_core_file option (Facebook/MySQL 8 cherry pick patch)
-
- Closed
-
Activity
Field | Original Value | New Value |
---|---|---|
Environment | Linux | |
Issue Type | Bug [ 1 ] | Task [ 3 ] |
Priority | Trivial [ 5 ] | Minor [ 4 ] |
Labels | patch |
Labels | patch | contribution patch |
Summary | Feature requst: Optionally exclude large buffers from core dumps | Feature request: Optionally exclude large buffers from core dumps |
Fix Version/s | 10.1 [ 16100 ] | |
Assignee | Vladislav Vaintroub [ wlad ] | |
Description |
As the size of core dump files by default mostly equals the process size producing core dumps can become an issue on systems with memory buffers, esp. large innodb_buffer_pool_size. There needs to be enough file system space to store such large core dumps, and with multi gigabyte files it also takes a non-trivial amount of time to write these, so delaying process restart quite a bit. And then there's also a security aspect to it: as the core dump contains the complete innodb buffer pool it contains a substantial amount, or even all, of the actual user data in the database. At the same time actual buffer contents are rarely needed when doing a post mortem analysis (usually we only need stack frames and a few pieces of local data). So I'm proposing a server option to exclude certain buffers from core dumps by marking them as {{DONOTDUMP}} with the {{madvise()}} system call. |
As the size of core dump files by default mostly equals the process size producing core dumps can become an issue on systems with memory buffers, esp. large innodb_buffer_pool_size. There needs to be enough file system space to store such large core dumps, and with multi gigabyte files it also takes a non-trivial amount of time to write these, so delaying process restart quite a bit. And then there's also a security aspect to it: as the core dump contains the complete innodb buffer pool it contains a substantial amount, or even all, of the actual user data in the database. At the same time actual buffer contents are rarely needed when doing a post mortem analysis (usually we only need stack frames and a few pieces of local data). So I'm proposing a server option to exclude certain buffers from core dumps by marking them as {{DONOTDUMP}} with the {{madvise()}} system call. |
Due Date | 2017-05-05 | |
Labels | contribution patch | contribution foundation patch |
Priority | Minor [ 4 ] | Major [ 3 ] |
Assignee | Vladislav Vaintroub [ wlad ] | Marko Mäkelä [ marko ] |
Component/s | Storage Engine - InnoDB [ 10129 ] | |
Fix Version/s | 10.3.5 [ 22905 ] | |
Fix Version/s | 10.1 [ 16100 ] | |
Resolution | Fixed [ 1 ] | |
Status | Open [ 1 ] | Closed [ 6 ] |
Resolution | Fixed [ 1 ] | |
Status | Closed [ 6 ] | Stalled [ 10000 ] |
Fix Version/s | 10.3 [ 22126 ] | |
Fix Version/s | 10.3.5 [ 22905 ] |
Assignee | Marko Mäkelä [ marko ] | Oleksandr Byelkin [ sanja ] |
Component/s | Query Cache [ 10120 ] |
Fix Version/s | 10.3.7 [ 23005 ] | |
Fix Version/s | 10.3 [ 22126 ] | |
Resolution | Fixed [ 1 ] | |
Status | Stalled [ 10000 ] | Closed [ 6 ] |
Link |
This issue relates to |
Link |
This issue relates to |
Link |
This issue causes |
Link |
This issue relates to |
Link | This issue relates to MENT-582 [ MENT-582 ] |
Link |
This issue relates to |
Workflow | MariaDB v3 [ 77108 ] | MariaDB v4 [ 132947 ] |
Link |
This issue relates to |
I had a proof of concept for this lying around for quite a while, it's a bit outdated by now though as I last touched it almost a year ago, then somehow got carried away with other things. The github branch for this is
https://github.com/hholzgra/mariadb-server/tree/hartmut-coredump-exclusions
which also contains some usage and implementation documentation:
https://raw.githubusercontent.com/hholzgra/mariadb-server/c7d32f8265183a7f32b8c4a2f59bf39a54aa7c22/Docs/README-core-dump-exclusion