summaryrefslogtreecommitdiff
path: root/sql/signal_handler.cc
Commit message (Collapse)AuthorAgeFilesLines
* Merge 10.1 into 10.2bb-10.2-mergeMarko Mäkelä2020-07-011-1/+1
|\
| * signal handler: use mariadb kb URL rather than MySQL oneDaniel Black2020-06-291-1/+1
| |
* | Merge 10.1 into 10.2Marko Mäkelä2019-05-131-1/+1
|\ \ | |/
| * Merge branch '5.5' into 10.1Vicențiu Ciorbaru2019-05-111-1/+1
| |\
| | * Update FSF AddressVicențiu Ciorbaru2019-05-111-1/+1
| | | | | | | | | | | | * Update wrong zip-code
* | | MDEV-15051: signal handler - output information about the core generationDaniel Black2019-05-011-4/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Write location of core when doing core dumpMonty2018-01-011-1/+3
| | |
* | | Fix threadpool to report connections aborted due to wait timeout.Vladislav Vaintroub2017-08-301-0/+4
| | | | | | | | | | | | Update wait_timeout.test to add test case for this.
* | | MDEV-11177 mysqlbinlog exits silently without error when anotherAlexey Botchkov2017-03-221-0/+3
| | | | | | | | | | | | | | | | | | | | | instance connects to server. New thread kill status added KILL_SLAVE_SAME_ID, and the related error message.
* | | Merge branch '10.1' into 10.2Sergei Golubchik2017-02-101-1/+1
|\ \ \ | |/ /
| * | Merge branch '10.0' into 10.1Vicențiu Ciorbaru2017-01-161-1/+1
| |\ \
| | * \ Merge remote-tracking branch 'origin/5.5' into 10.0vicentiu2017-01-061-1/+1
| | |\ \ | | | |/
| | | * Fix pointer formatting in crash handler output.Vladislav Vaintroub2016-12-201-1/+1
| | | | | | | | | | | | | | | | Do not use 0x%p to output thd address, use %p
* | | | Merge branch '10.1' into 10.2Sergei Golubchik2016-12-291-3/+7
|\ \ \ \ | |/ / /
| * | | MDEV-10382 Using systemd, mariadb doesn't restart on crashesSergei Golubchik2016-12-061-2/+4
| | | | | | | | | | | | | | | | | | | | when crashing on a signal, don't exit(), but re-signal it, so that the caller could check WIFSIGNALED()
| * | | Merge branch '10.0' into 10.1Sergei Golubchik2016-09-281-1/+3
| |\ \ \ | | |/ /
| | * | fix conpilation on OpenBSDSergei Golubchik2016-08-291-1/+3
| | | |
* | | | Merge branch '10.1' into 10.2Sergei Golubchik2016-09-091-1/+22
|\ \ \ \ | |/ / /
| * | | Merge branch '10.0' into 10.1Sergei Golubchik2016-07-131-1/+22
| |\ \ \ | | |/ /
| | * | [MDEV-9127] Crash reporter often fails to show the query that crashedVicențiu Ciorbaru2016-07-121-1/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Addreses are not necessarily between heap_start && heap_end. Malloc calls using mmap can place pointers outside these bounds. In this case, we'll warn the user that the query pointer is potentially invalid. However, we'll attempt to print the data anyway after we're done printing everything else.
* | | | MDEV-9593 - Print the real version in the error logSergey Vojtovich2016-09-011-0/+1
| | | |
* | | | Merge branch '10.1' into 10.2Sergei Golubchik2016-03-231-2/+2
|\ \ \ \ | |/ / /
| * | | Merge branch '10.0' into 10.1Sergei Golubchik2016-03-211-2/+2
| |\ \ \ | | |/ /
| | * | Update AskMonty and Atlassian references to MariaDBiangilfillan2016-03-081-1/+1
| | | |
| | * | Fix spelling: occurred, execute, which etcOtto Kekäläinen2016-03-041-1/+1
| | | |
* | | | We can't call set_server_version() in signal handler as it's not callable afterMonty2016-02-071-1/+0
|/ / / | | | | | | | | | server has started (assert in sys_var::where get_sys_var_value_origin())
* | | Fixed errors and bugs found by valgrind:Monty2015-09-011-17/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - If run with valgrind, mysqltest will now wait longer when syncronizing slave with master - Ensure that we wait with cleanup() until slave thread has stopped. - Added signal_thd_deleted() to signal close_connections() that all THD's has been freed. - Check in handle_fatal_signal() that we don't use variables that has been freed. - Increased some timeouts when run with --valgrind Other things: - Fixed wrong test in one_thread_per_connection_end() if galera is used. - Removed not needed calls to THD_CHECK_SENTRY() when we are calling 'delete thd'.
* | | MDEV 4427: query timeoutsMonty2014-10-071-0/+4
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added MAX_STATEMENT_TIME user variable to automaticly kill queries after a given time limit has expired. - Added timer functions based on pthread_cond_timedwait - Added kill_handlerton() to signal storage engines about kill/timeout - Added support for GRANT ... MAX_STATEMENT_TIME=# - Copy max_statement_time to current user, if stored in mysql.user - Added status variable max_statement_time_exceeded - Added KILL_TIMEOUT - Removed digest hash from performance schema tests as they change all the time. - Updated test results that changed because of the new user variables or new fields in mysql.user This functionallity is inspired by work done by Davi Arnaut at twitter. Test case is copied from Davi's work. Documentation can be found at https://kb.askmonty.org/en/how-to-limittimeout-queries/ mysql-test/r/mysqld--help.result: Updated for new help message mysql-test/suite/perfschema/r/all_instances.result: Added new mutex mysql-test/suite/sys_vars/r/max_statement_time_basic.result: Added testing of max_statement_time mysql-test/suite/sys_vars/t/max_statement_time_basic.test: Added testing of max_statement_time mysql-test/t/max_statement_time.test: Added testing of max_statement_time mysys/CMakeLists.txt: Added thr_timer mysys/my_init.c: mysys/mysys_priv.h: Added new mutex and condition variables Added new mutex and condition variables mysys/thr_timer.c: Added timer functions based on pthread_cond_timedwait() This can be compiled with HAVE_TIMER_CREATE to benchmark agains timer_create()/timer_settime() sql/lex.h: Added MAX_STATEMENT_TIME sql/log_event.cc: Safety fix (timeout should be threated as an interrupted query) sql/mysqld.cc: Added support for timers Added status variable max_statement_time_exceeded sql/share/errmsg-utf8.txt: Added ER_QUERY_TIMEOUT sql/signal_handler.cc: Added support for KILL_TIMEOUT sql/sql_acl.cc: Added support for GRANT ... MAX_STATEMENT_TIME=# Copy max_statement_time to current user sql/sql_class.cc: Added timer functionality to THD. Added thd_kill_timeout() sql/sql_class.h: Added timer functionality to THD. Added KILL_TIMEOUT Added max_statement_time variable in similar manner as long_query_time was done. sql/sql_connect.cc: Added handling of max_statement_time_exceeded sql/sql_parse.cc: Added starting and stopping timers for queries. sql/sql_show.cc: Added max_statement_time_exceeded for user/connects status in MariaDB 10.0 sql/sql_yacc.yy: Added support for GRANT ... MAX_STATEMENT_TIME=# syntax, to be enabled in 10.0 sql/structs.h: Added max_statement_time user resource sql/sys_vars.cc: Added max_statement_time variables mysql-test/suite/roles/create_and_drop_role_invalid_user_table.test Removed test as we require all fields in mysql.user table. scripts/mysql_system_tables.sql scripts/mysql_system_tables_data.sql scripts/mysql_system_tables_fix.sql Updated mysql.user with new max_statement_time field
* | 10.0-base mergeSergei Golubchik2014-02-261-2/+2
|\ \ | |/
| * MySQL-5.5.36 mergeSergei Golubchik2014-02-171-2/+2
| |\ | | | | | | | | | (without few incorrect bugfixes and with 1250 files where only a copyright year was changed)
| | * Updated/added copyright headersMurthy Narkedimilli2014-01-061-1/+1
| | |
* | | 10.0-base merge.Sergei Golubchik2013-09-211-1/+1
|\ \ \ | |/ / | | | | | | | | | Partitioning/InnoDB changes are *not* merged (they'll come from 5.6) TokuDB does not compile (not updated to 10.0 SE API)
| * | mysql-5.5.33 mergeSergei Golubchik2013-09-061-1/+1
| |\ \ | | |/
| | * Fixing the bug 16919882 - WRONG FSF ADDRESS IN LICENSES HEADERSMurthy Narkedimilli2013-06-101-1/+1
| | |
* | | Temporary commit of 10.0-mergeMichael Widenius2013-03-261-1/+1
|/ /
* | MDEV-419 ensure that all HAVE_XXX constants can be set by cmakeSergei Golubchik2012-07-311-17/+0
| | | | | | | | | | add missing checks to configure.cmake remove dead code and unused HAVE_xxx constants from the sources
* | Fixed some simple warnings on Windows.Vladislav Vaintroub2012-04-131-1/+1
| |
* | mysql 5.5.23 mergeSergei Golubchik2012-04-101-0/+1
|\ \ | |/
| * Merge 5.1 => 5.5Tor Didriksen2012-03-061-0/+1
| |\ | | | | | | | | | | | | | | | | | | | | | storage/innobase/include/sync0rw.ic: Prerequisite for compiling with gcc4 on solaris: ignore result from os_compare_and_swap_ulint storage/myisam/mi_dynrec.c: Prerequisite for compiling with gcc4 on solaris: cast to void*
| | * Bug#11761576 54082: HANDLE_SEGFAULT MAKES USE OF UNSAFE FUNCTIONSTor Didriksen2012-03-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Post-push fixes. mysys/stacktrace.c: Missing comma after "%s" format specifier. sql/mysqld.cc: Move #define to signal_handler.cc sql/signal_handler.cc: Missing #define UNSAFE_DEFAULT_LINUX_THREADS 200
* | | Merge mariadb 5.3->mariadb 5.5unknown2012-03-241-1/+1
|\ \ \
| * \ \ mergeSergei Golubchik2012-03-211-1/+1
| |\ \ \
| | * \ \ mergeSergei Golubchik2012-03-211-1/+1
| | |\ \ \
| | | * | | restore my_safe_printf_stderr for "crash-safe sigsegv handler"Sergei Golubchik2012-03-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | use vsnprintf() use write() on windows, not WriteFile or fwrite() localtime_r is still a problem
* | | | | | Merge 5.3->5.5Igor Babaev2012-03-171-1/+1
|\ \ \ \ \ \ | |/ / / / /
| * | | | | Merge 5.2->5.3unknown2012-03-141-1/+1
| |\ \ \ \ \ | | |/ / / /
| | * | | | mergeVladislav Vaintroub2012-03-121-1/+1
| | |\ \ \ \ | | | |/ / /
| | | * | | LP953714: Fix formatting of the crash messages in signal/exception handlerVladislav Vaintroub2012-03-121-1/+1
| | | | | |
* | | | | | Merged the implementation of MDEV-28 LIMIT ROWS EXAMINED into MariaDB 5.5.unknown2012-03-121-0/+4
|\ \ \ \ \ \
| * | | | | | Implementation of MDEV-28 LIMIT ROWS EXAMINEDunknown2012-03-111-0/+4
| |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://mariadb.atlassian.net/browse/MDEV-28 This task implements a new clause LIMIT ROWS EXAMINED <num> as an extention to the ANSI LIMIT clause. This extension allows to limit the number of rows and/or keys a query would access (read and/or write) during query execution.