- MariaDB\ 71.8%
- C++ 16.4%
- C 10.4%
- Shell 0.5%
- Perl 0.4%
- Other 0.3%
Problem: There is no control to include or exclude large InnoDB memory regions such as the buffer pool and log buffer from core files, which can lead to unnecessarily large core dumps or prevent capturing useful memory state. Solution: Introduce a new global dynamic system variable innodb_trim_core_dump that allows excluding large InnoDB memory regions (buffer pool and log buffer) from core dumps using MADV_DONTDUMP where supported. When enabled the server marks relevant memory regions to be omitted from core files. The madvise state is dynamically updated when the variable changes. Additionally, a test helper script is introduced to inspect /proc/<pid>/smaps and verify whether large memory regions are marked for trimming. - innodb_trim_core_dump Global boolean system variable controlling whether InnoDB memory regions should be excluded from core dumps. Default: ON on non-debug builds with MADV_DONTDUMP support, OFF otherwise. - innodb_srv_trim_core_dump_update() Update hook that sets srv_trim_core_dump and triggers runtime updates of madvise state for both the buffer pool and log buffers. - srv_trim_core_dump Global variable backing @@innodb_trim_core_dump. - buf_pool_t::buf_pool_should_madvise_dont_dump Tracks the current madvise state for the buffer pool memory. - buf_pool_t::madvise_update_dump() Re-evaluates whether the buffer pool should be excluded from core dumps and applies ut_dontdump() or ut_dodump() accordingly. - buf_pool_t::create() Initializes madvise state based on srv_trim_core_dump and conditionally applies MADV_DONTDUMP to the buffer pool memory. - buf_pool_t::resize() Reapplies MADV_DONTDUMP to newly allocated memory regions when resizing if innodb_trim_core_dump=ON - log_t::log_buf_should_madvise_dont_dump Tracks the madvise state for the InnoDB log buffers. - log_t::madvise_dontdump() Marks log buffers and resize buffers with MADV_DONTDUMP. - log_t::madvise_dodump() Restores inclusion of log buffers in core dumps using MADV_DODUMP. - log_t::madvise_update_dump() Updates the madvise state for log buffers when @@innodb_trim_core_dump changes. - log_t::attach() Call ut_dodump() for log_t::buf & log_t::flush_buf on successful allocation and innodb_trim_core_dump=OFF - log_t::resize_start() Call ut_dodump() for log_t::resize_buf & log_t::resize_flush_buf on successful allocation and innodb_trim_core_dump=OFF - check_core_dump_trim.inc Test helper that inspects /proc/<pid>/smaps to detect memory regions with the dd VmFlag and determine whether the core file is expected to be trimmed based on buffer pool and log buffer sizes. |
||
|---|---|---|
| .github | ||
| BUILD | ||
| client | ||
| cmake | ||
| dbug | ||
| debian | ||
| Docs | ||
| extra | ||
| include | ||
| libmariadb@7a5c80e85e | ||
| libmysqld | ||
| libservices | ||
| man | ||
| mysql-test | ||
| mysys | ||
| mysys_ssl | ||
| plugin | ||
| randgen/conf | ||
| scripts | ||
| sql | ||
| sql-bench | ||
| sql-common | ||
| storage | ||
| strings | ||
| support-files | ||
| tests | ||
| tpool | ||
| unittest | ||
| vio | ||
| win | ||
| wsrep-lib@7010f0ab58 | ||
| zlib | ||
| .clang-format | ||
| .gitattributes | ||
| .gitignore | ||
| .gitlab-ci.yml | ||
| .gitmodules | ||
| appveyor.yml | ||
| BUILD-CMAKE | ||
| CMakeLists.txt | ||
| config.h.cmake | ||
| configure.cmake | ||
| CONTRIBUTING.md | ||
| COPYING | ||
| CREDITS | ||
| INSTALL-SOURCE | ||
| INSTALL-WIN-SOURCE | ||
| KNOWN_BUGS.txt | ||
| README.md | ||
| THIRDPARTY | ||
| VERSION | ||
Code status:
MariaDB: The innovative open source database
MariaDB was designed as a drop-in replacement of MySQL(R) with more features, new storage engines, fewer bugs, and better performance.
MariaDB is brought to you by the MariaDB Foundation and the MariaDB Corporation. Please read the CREDITS file for details about the MariaDB Foundation, and who is developing MariaDB.
MariaDB is developed by many of the original developers of MySQL who now work for the MariaDB Corporation, the MariaDB Foundation and by many people in the community.
MySQL, which is the base of MariaDB, is a product and trademark of Oracle Corporation, Inc. For a list of developers and other contributors, see the Credits appendix. You can also run 'SHOW authors' to get a list of active contributors.
A description of the MariaDB project and a manual can be found at:
https://mariadb.com/kb/en/mariadb-vs-mysql-features/
https://mariadb.com/kb/en/mariadb-versus-mysql-compatibility/
https://mariadb.com/kb/en/new-and-old-releases/
Getting the code, building it and testing it
Refer to the following guide: https://mariadb.org/get-involved/getting-started-for-developers/get-code-build-test/ which outlines how to build the source code correctly and run the MariaDB testing framework, as well as which branch to target for your contributions.
Help
More help is available from the Maria Discuss mailing list https://lists.mariadb.org/postorius/lists/discuss.lists.mariadb.org/ and MariaDB's Zulip instance, https://mariadb.zulipchat.com/
Licensing
MariaDB is specifically available only under version 2 of the GNU General Public License (GPLv2). (I.e. Without the "any later version" clause.) This is inherited from MySQL. Please see the README file in the MySQL distribution for more information.
License information can be found in the COPYING file. Third party license information can be found in the THIRDPARTY file.
Bug Reports
Bug and/or error reports regarding MariaDB should be submitted at: https://jira.mariadb.org
For reporting security vulnerabilities see: https://mariadb.org/about/security-policy/
The code for MariaDB, including all revision history, can be found at: https://github.com/MariaDB/server