summaryrefslogtreecommitdiff
path: root/sql/signal_handler.cc
Commit message (Collapse)AuthorAgeFilesLines
* Merge 10.4 into 10.5Marko Mäkelä2021-04-211-3/+3
|\
| * Merge 10.3 into 10.4Marko Mäkelä2021-04-211-3/+3
| |\
| | * Merge 10.2 into 10.3Marko Mäkelä2021-04-211-3/+3
| | |\
| | | * signal handler, display coredump file pattern similarly to MDEV-25294 but ↵David Carlier2021-04-151-3/+3
| | | | | | | | | | | | | | | | for FreeBSD, thankfully the sysctl OID is the same.
* | | | Merge 10.4 into 10.5Marko Mäkelä2021-03-311-1/+13
|\ \ \ \ | |/ / /
| * | | Merge 10.3 into 10.4Marko Mäkelä2021-03-311-1/+13
| |\ \ \ | | |/ /
| | * | Merge 10.2 into 10.3Marko Mäkelä2021-03-311-1/+13
| | |\ \ | | | |/
| | | * MDEV-25294 signal handler display coredump on macDavid CARLIER2021-03-301-1/+13
| | | |
* | | | Merge branch '10.4' into 10.5Sergei Golubchik2021-02-231-1/+2
|\ \ \ \ | |/ / /
| * | | In case of an abort, write "handling fatal signal" to DBUG log.Monty2021-02-141-1/+2
| |/ /
* | | Merge 10.4 into 10.5Marko Mäkelä2020-07-021-1/+1
|\ \ \ | |/ /
| * | Merge 10.2 into 10.3Marko Mäkelä2020-07-021-1/+1
| |\ \ | | |/
| | * 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
| | | |
* | | | Fixed access to undefined memory found by valgrind and MSANMonty2020-05-231-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | output_core_info - freebsd rlimits in different proc entryDaniel Black2020-04-031-0/+4
| | | |
* | | | Bug#18913935: REMOVE SUPPORT FOR LINUXTHREADSJon Olav Hauglid2020-03-101-18/+0
|/ / / | | | | | | | | | | | | This patch removes support for LinuxThreads. It was superseded by NPTL in Linux 2.6 (2003).
* | | Merge 10.2 into 10.3Marko Mäkelä2019-05-141-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
* | | | Merge 10.2 into 10.3Marko Mäkelä2019-05-021-4/+42
|\ \ \ \ | |/ / /
| * | | 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
* | | | Make possible to use clang on Windows (clang-cl)Vladislav Vaintroub2018-02-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | -DWITH_ASAN can be used as well now, on x64 Fix many clang-cl warnings.
* | | | Merge bb-10.2-ext into 10.3Marko Mäkelä2018-01-041-1/+3
|\ \ \ \ | |/ / /
| * | | Write location of core when doing core dumpMonty2018-01-011-1/+3
| | | |
* | | | Merge bb-10.2-ext into 10.3Marko Mäkelä2017-09-011-0/+4
|\ \ \ \ | |/ / /
| * | | 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.
* | | | Added DBUG_ASSERT_AS_PRINTF compile flagMonty2017-08-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | Enusure that my_global.h is included firstMichael Widenius2017-08-241-1/+1
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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
* | | 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