1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-18 23:03:28 +03:00
Commit Graph

93 Commits

Author SHA1 Message Date
ea847cbeaf Merge 10.4 into 10.5 2022-06-27 10:51:20 +03:00
01d757036f Merge 10.3 into 10.4 2022-06-27 10:14:37 +03:00
d4539426bc MDEV-28884: include kernel information in crashing signal handler
Recent adventures in liburing and btrfs have shown up some kernel
version dependent bugs. Having a bug report of accurace kernel version
can start to correlate these errors sooner.

On Linux, /proc/version contains the kernel version.

FreeBSD has kern.version (per man 8 sysctl), so include that too.

Example output:

Max nice priority         0                    0
Max realtime priority     0                    0
Max realtime timeout      unlimited            unlimited            us
Core pattern: |/usr/lib/systemd/systemd-coredump %P %u %g %s %t %c %h

Kernel version: Linux version 5.19.0-0.rc2.21.fc37.x86_64 (mockbuild@bkernel01.iad2.fedoraproject.org) (gcc (GCC) 12.1.1 20220507 (Red Hat 12.1.1-1), GNU ld version 2.38-14.fc37) #1 SMP PREEMPT_DYNAMIC Mon Jun 13 15:27:24 UTC 2022

Segmentation fault (core dumped)
2022-06-18 21:14:04 +03:00
b729c1a1ec Fix a false positive GCC5 warning. 2021-09-06 19:07:24 +02:00
7d351f1aa0 MDEV-26533 fixup: GCC -Wformat 2021-09-06 10:14:17 +03:00
a1b0f23586 MDEV-26533 MariaDB 10.5 crashes with key_buffer_size > 4Gb on Windows x64
This is a side-effect of my_large_malloc() introduction,MDEV-18851

It removed a cast to size_t to variable 'blocks' in
multiplication blocks * keycache->key_cache_block_size , creating ulong value
instead of correct size_t.


Replaced a couple of ulongs with appropriate data type, which is size_t.

Also, fixed casts to ulongs in crash handler messages, so that people would
not be confused by that, too.

Interestingly, aria did not expose the same problem even if it contains
copied and pasted code in ma_pagecache, because Aria had some ulongs removed
when fixing a similar problem in MDEV-9256.
2021-09-04 17:51:26 +02:00
ae6bdc6769 Merge branch '10.4' into 10.5 2021-07-31 23:19:51 +02:00
b34cafe9d9 cleanup: move thread_count to THD_count::value()
because the name was misleading, it counts not threads, but THDs,
and as THD_count is the only way to increment/decrement it, it
could as well be declared inside THD_count.
2021-07-24 12:37:50 +02:00
80ed136e6d Merge 10.4 into 10.5 2021-04-21 09:01:01 +03:00
a0588d54a2 Merge 10.3 into 10.4 2021-04-21 07:58:42 +03:00
75c01f39b1 Merge 10.2 into 10.3 2021-04-21 07:25:48 +03:00
3ebd6cd3ad signal handler, display coredump file pattern similarly to MDEV-25294 but for FreeBSD, thankfully the sysctl OID is the same. 2021-04-15 04:03:40 +10:00
5eae8c2742 Merge 10.4 into 10.5 2021-03-31 11:05:21 +03:00
50de71b026 Merge 10.3 into 10.4 2021-03-31 09:47:14 +03:00
d6d3d9ae2f Merge 10.2 into 10.3 2021-03-31 08:01:03 +03:00
99945d77d7 MDEV-25294 signal handler display coredump on mac 2021-03-30 19:53:04 +03:00
f33e57a9e6 Merge branch '10.4' into 10.5 2021-02-23 13:06:22 +01:00
d0defd1ea2 In case of an abort, write "handling fatal signal" to DBUG log. 2021-02-14 17:46:14 +02:00
1813d92d0c Merge 10.4 into 10.5 2020-07-02 09:41:44 +03:00
1df1a63924 Merge 10.2 into 10.3 2020-07-02 06:17:51 +03:00
ea2bc974dc Merge 10.1 into 10.2 2020-07-01 12:03:55 +03:00
ca55e09e9a signal handler: use mariadb kb URL rather than MySQL one 2020-06-29 05:49:52 +02:00
c4bf4b7aef Fixed access to undefined memory found by valgrind and MSAN
When my_vsnprintf() is patched, the code protected disabled with
'WAITING_FOR_BUGFIX_TO_VSPRINTF' should be enabled again. Also all %b
formats in this patch should be revert to %s again
2020-05-23 12:29:10 +03:00
abb0a31ec8 output_core_info - freebsd rlimits in different proc entry 2020-04-03 15:11:43 +02:00
52d7980753 Bug#18913935: REMOVE SUPPORT FOR LINUXTHREADS
This patch removes support for LinuxThreads.
It was superseded by NPTL in Linux 2.6 (2003).
2020-03-10 19:24:21 +01:00
be85d3e61b Merge 10.2 into 10.3 2019-05-14 17:18:46 +03:00
26a14ee130 Merge 10.1 into 10.2 2019-05-13 17:54:04 +03:00
cb248f8806 Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
5543b75550 Update FSF Address
* Update wrong zip-code
2019-05-11 21:29:06 +03:00
158247d3bd Merge 10.2 into 10.3 2019-05-02 21:43:24 +03:00
dc8e15db7e MDEV-15051: signal handler - output information about the core generation
The working directory, resource limits and core pattern will
aid the user finding a core file in the case of failure.

While the core file size is most relevant however other resource
limits may give a clue as the the cause of the fatal signal so
include them also.

As signal handler functions are limited, proc filesystem reads/
readlink calls are used instead of the more obvious getcwd/getrlimits
functions which aren't listed as signal safe.

Results in output of the form:

Writing a core file: working directory at /tmp/datadir
Resource Limits:
Limit                     Soft Limit           Hard Limit Units
Max cpu time              unlimited            unlimited seconds
Max file size             unlimited            unlimited bytes
Max data size             unlimited            unlimited bytes
Max stack size            8388608              unlimited bytes
Max core file size        unlimited            unlimited bytes
Max resident set          unlimited            unlimited bytes
Max processes             47194                47194 processes
Max open files            1024                 4096 files
Max locked memory         65536                65536 bytes
Max address space         unlimited            unlimited bytes
Max file locks            unlimited            unlimited locks
Max pending signals       47194                47194 signals
Max msgqueue size         819200               819200 bytes
Max nice priority         0                    0
Max realtime priority     0                    0
Max realtime timeout      unlimited            unlimited            us
Core pattern: |/usr/libexec/abrt-hook-ccpp %s %c %p %u %g %t %P %I

Segmentation fault (core dumped)

Closes #537
2019-05-01 18:18:00 +02:00
56e7b7eaed Make possible to use clang on Windows (clang-cl)
-DWITH_ASAN can be used as well now, on x64

Fix many clang-cl warnings.
2018-02-20 21:17:36 +00:00
145ae15a33 Merge bb-10.2-ext into 10.3 2018-01-04 09:22:59 +02:00
08ff39dca2 Write location of core when doing core dump 2018-01-01 14:12:18 +02:00
4e1fa7f63d Merge bb-10.2-ext into 10.3 2017-09-01 11:33:45 +03:00
91826970c5 Fix threadpool to report connections aborted due to wait timeout.
Update wait_timeout.test to add test case for this.
2017-08-30 14:37:16 +00:00
536215e32f Added DBUG_ASSERT_AS_PRINTF compile flag
If compiling a non DBUG binary with
-DDBUG_ASSERT_AS_PRINTF asserts will be
changed to printf + stack trace (of stack
trace are enabled).

- Changed #ifndef DBUG_OFF to
  #ifdef DBUG_ASSERT_EXISTS
  for those DBUG_OFF that was just used to enable
  assert
- Assert checking that could greatly impact
  performance where changed to DBUG_ASSERT_SLOW which
  is not affected by DBUG_ASSERT_AS_PRINTF
- Added one extra option to my_print_stacktrace() to
  get more silent in case of stack trace printing as
  part of assert.
2017-08-24 01:05:50 +02:00
4aaa38d26e Enusure that my_global.h is included first
- Added sql/mariadb.h file that should be included first by files in sql
  directory, if sql_plugin.h is not used (sql_plugin.h adds SHOW variables
  that must be done before my_global.h is included)
- Removed a lot of include my_global.h from include files
- Removed include's of some files that my_global.h automatically includes
- Removed duplicated include's of my_sys.h
- Replaced include my_config.h with my_global.h
2017-08-24 01:05:44 +02:00
92f18bdede MDEV-11177 mysqlbinlog exits silently without error when another
instance connects to server.

        New thread kill status added KILL_SLAVE_SAME_ID, and the related
        error message.
2017-03-22 01:48:22 +04:00
2195bb4e41 Merge branch '10.1' into 10.2 2017-02-10 17:01:45 +01:00
8e15768731 Merge branch '10.0' into 10.1 2017-01-16 03:18:14 +02:00
e9aed131ea Merge remote-tracking branch 'origin/5.5' into 10.0 2017-01-06 17:09:59 +02:00
4a5d25c338 Merge branch '10.1' into 10.2 2016-12-29 13:23:18 +01:00
e025ebcdb5 Fix pointer formatting in crash handler output.
Do not use 0x%p to output thd address, use %p
2016-12-20 12:45:48 +00:00
76546a099c MDEV-10382 Using systemd, mariadb doesn't restart on crashes
when crashing on a signal, don't exit(), but re-signal it, so that
the caller could check WIFSIGNALED()
2016-12-06 09:45:50 +01:00
66d9696596 Merge branch '10.0' into 10.1 2016-09-28 17:55:28 +02:00
06b7fce9f2 Merge branch '10.1' into 10.2 2016-09-09 08:33:08 +02:00
dd31e5c6ab MDEV-9593 - Print the real version in the error log 2016-09-01 12:29:53 +04:00
f81f985f37 fix conpilation on OpenBSD 2016-08-29 11:53:33 +02:00
326a8dcd87 Merge branch '10.0' into 10.1 2016-07-13 12:09:59 +02:00