summary |
shortlog | log |
commit |
commitdiff |
tree
first ⋅ prev ⋅ next
Hugo Wen [Sat, 11 Mar 2023 00:27:42 +0000 (00:27 +0000)]
[PATCH] Fix a stack overflow in pinbox allocator
MariaDB supports a "wait-free concurrent allocator based on pinning addresses".
In `lf_pinbox_real_free()` it tries to sort the pinned addresses for better
performance to use binary search during "real free". `alloca()` was used to
allocate stack memory and copy addresses.
To prevent a stack overflow when allocating the stack memory the function checks
if there's enough stack space. However, the available stack size was calculated
inaccurately which eventually caused database crash due to stack overflow.
The crash was seen on MariaDB 10.6.11 but the same code defect exists on all
MariaDB versions.
A similar issue happened previously and the fix in
fc2c1e43 was to add a
`ALLOCA_SAFETY_MARGIN` which is 8192 bytes. However, that safety margin is not
enough during high connection workloads.
MySQL also had a similar issue and the fix
https://github.com/mysql/mysql-server/commit/
b086fda was to remove the use of
`alloca` and replace qsort approach by a linear scan through all pointers (pins)
owned by each thread.
This commit is mostly the same as it is the only way to solve this issue as:
1. Frame sizes in different architecture can be different.
2. Number of active (non-null) pinned addresses varies, so the frame
size for the recursive sorting function `msort_with_tmp` is also hard
to predict.
3. Allocating big memory blocks in stack doesn't seem to be a very good
practice.
For further details see the mentioned commit in MySQL and the inline comments.
All new code of the whole pull request, including one or several files
that are either new files or modified ones, are contributed under the
BSD-new license. I am contributing on behalf of my employer Amazon Web
Services, Inc.
Gbp-Pq: Name 2541-fix-stack-overflow-in-pinbox-allocator.patch
Otto Kekäläinen [Sun, 22 May 2022 17:13:33 +0000 (10:13 -0700)]
[PATCH] Properly introduce wsrep_sst_backup script in project packaging
The script wsrep_sst_backup was introduced on MariaDB 10.3 in commit
9b2fa2a. The new script was automatically included in RPM packages but not
in Debian packages (which started to fail on waring about stray file).
Include wsrep_sst_backup in the mariadb-server-10.{3..8} package, and
also include a stub man page so that packaging of a new script is complete.
Gbp-Pq: Name 2129-new-script-wsrep-sst-backup-fixes.patch
Sutou Kouhei [Sat, 5 Feb 2022 02:05:39 +0000 (11:05 +0900)]
[PATCH] cmake: add support for reproducible buildS . We should use relative path not absolute path. We can use target without breaking reproducibility.
Gbp-Pq: Name mroonga-mrn-lib-dirs-path-reproducible-build.patch
Debian MySQL Maintainers [Sun, 28 May 2023 06:16:42 +0000 (23:16 -0700)]
fix-reproducible-builds-rocksdb
Origin: https://github.com/facebook/rocksdb/commit/
0a9a05ae12943b1529ef1eabbca5ce5a71c986bf
# Merged in RocksDB 6.19.3, but not updated into MariaDB yet
Bug: https://github.com/facebook/rocksdb/issues/7035
Author: Otto Kekäläinen <otto@kekalainen.net>
Subject: Make RocksDB build reproducible
The RocksDB binary included a string with the build timestamp:
> rocksdb_build_git_date:@2021-05-23·16:04:38@
As this changes from build to build, it makes the builds unreproducible.
Simply removing it solves the issue.
This temporary fix can be removed when a proper fix already done in upstream
lands in MariaDB when the RocksDB submodule is updated to a newer release.
Gbp-Pq: Name fix-reproducible-builds-rocksdb.patch
Otto Kekäläinen [Thu, 3 Mar 2022 02:13:18 +0000 (18:13 -0800)]
Fix various spelling errors still found in code Two upstream PRs remain that have been merged, but not imported on MariaDB yet.
Gbp-Pq: Name fix-spelling-rocksdb.patch
Otto Kekäläinen [Sun, 20 Dec 2020 18:58:42 +0000 (20:58 +0200)]
Fix perl path in scripts Fix Lintian issue https://lintian.debian.org/tags/incorrect-path-for-interpreter.html . Upstream will never accept this patch, see https://github.com/MariaDB/server/pull/1718
Gbp-Pq: Name env-perl-usr-bin-perl.patch
Andrew Kryczka [Wed, 17 Jun 2020 02:34:21 +0000 (19:34 -0700)]
rocksdb-kfreebsd
Forwarded: https://github.com/facebook/rocksdb/pull/6992
# Merged in RocksDB 6.13.fb, but not updated into MariaDB yet
Bug: https://jira.mariadb.org/browse/MDEV-19251
Description:
Upstream has merged this but we still need to wait for it to be included
in a RocksDB release and imported into MariaDB and then into Debian.
Gbp-Pq: Name rocksdb-kfreebsd.patch
Ondrej Sury [Wed, 22 Nov 2017 20:32:51 +0000 (20:32 +0000)]
Change the default optimization from -O3 to -O2 in mysql_release.cmake BUILD_CONFIG profile
Forwarded: https://jira.mariadb.org/browse/MDEV-19734?focusedCommentId=156606&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-156606
Gbp-Pq: Name 0025-Change-the-default-optimization-from-O3-to-O2-in-mys.patch
Otto Kekäläinen [Sun, 28 May 2023 06:16:42 +0000 (23:16 -0700)]
mariadb (1:10.11.3-1) unstable; urgency=medium
* New upstream version 10.11.3. Includes security fixes for
- CVE-2022-47015 (Closes: #
1034889)
* This is the first bug fixing maintenance release from upstream in the 10.11
series as the 10.11.2 release was the first one announced GA (general
availability). For a full list of all bug fixes see release notes at
https://mariadb.com/kb/en/mariadb-10-11-3-release-notes/.
* Update libmariadb3.symbols to include new ABI changes in 3.3.5
and fix DPKG_GENSYMBOLS_CHECK_LEVEL so it actually takes effect and in
build will properly fail if there are unaccounted symbol changes in
future upstream maintenance releases
* Update Lintian overrides after 10.11.3 import
* Use new log_slow_* configuration variable names in configuration examples
to be aligned with upstream and have least amount of surprises for users
of MariaDB 10.11 where these variables changed names
* Clean away unnecessary mariadb-test.links, no functional effect
* Delete all embedded zlib copies to fix crossbuilds and improve security
* Use native zlib to make crossbuilds work again after recent zlib 1.2.13
update regressed crossbuilds
* Revert fixes from February/March 2023 that the Debian release team
deemed unfit/too late for Bookworm (Bug#
1033811):
- Revert "Add patch to fix upgrades from MySQL 5.7 to MariaDB 10.11..."
- Revert "Limit check of running mysqld/mariadbd to system users..."
- Revert "MDEV-21303: Fix man page packaging for new mariadb-* named..."
- Revert "Add patches to fix spelling in MariaDB and components..."
- Revert "Add patch to better diagnose failures in main.order_by_innodb..."
- Revert "Add patch to fix misc compiler warnings in upstream build"
- Revert "Add patch to emit warnings if mariadb-upgrade was not run..."
[ Mathias Gibbens ]
* Silence superfluous warnings in mariadb-server preinst (Closes: #
1034684)
[dgit import unpatched mariadb 1:10.11.3-1]
Otto Kekäläinen [Sun, 28 May 2023 06:16:42 +0000 (23:16 -0700)]
Import mariadb_10.11.3.orig.tar.gz
[dgit import orig mariadb_10.11.3.orig.tar.gz]
Otto Kekäläinen [Sun, 28 May 2023 06:16:42 +0000 (23:16 -0700)]
Import mariadb_10.11.3-1.debian.tar.xz
[dgit import tarball mariadb 1:10.11.3-1 mariadb_10.11.3-1.debian.tar.xz]