summaryrefslogtreecommitdiff
path: root/mysql-test/lib/My/SafeProcess
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch '10.3' into bb-10.4-releasemariadb-10.4.26Oleksandr Byelkin2022-08-101-2/+9
|\
| * my_safe_process: try to kill the process softly firstSergei Golubchik2022-08-101-2/+9
| | | | | | | | | | | | | | first SIGTERM and if the process didn't die in 10 seconds, SIGKILL it. This allows various tools like `rr`, `gcov`, `gprof`, etc to flush their data to disk properly
* | Merge branch '10.3' into 10.4Vladislav Vaintroub2021-09-242-108/+4
|\ \ | |/
| * MDEV-11499 mysqltest, Windows : improve diagnostics if server fails to shutdownVladislav Vaintroub2021-09-242-108/+4
| | | | | | | | | | | | | | | | | | | | | | Create minidump when server fails to shutdown. If process is being debugged, cause a debug break. Moves some code which is part of safe_kill into mysys, as both safe_kill, and mysqltest produce minidumps on different timeouts. Small cleanup in wait_until_dead() - replace inefficient loop with a single wait.
* | Merge 10.3 into 10.4Marko Mäkelä2020-10-291-1/+1
|\ \ | |/
| * cleanup: use predefined CMAKE_DL_LIBSSergei Golubchik2020-10-231-1/+1
| | | | | | | | instead of, say, MY_SEARCH_LIBS(dlopen dl LIBDL)
* | Merge 10.3 into 10.4Marko Mäkelä2020-05-051-1/+1
|\ \ | |/
| * Merge branch '10.2' into 10.3Oleksandr Byelkin2020-05-041-1/+1
| |\
| | * Merge branch '10.1' into 10.2Oleksandr Byelkin2020-05-021-1/+1
| | |\
| | | * Merge branch '5.5' into 10.1Oleksandr Byelkin2020-04-301-1/+1
| | | |\
| | | | * Fix wrong argument size passed to --parent-pid strncmp checkDisconnect3d2020-04-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This PR fixes wrong size argument passed in `strncmp(arg, "--parent-pid", 10)` as the `"--parent-pid"` string has length of 12. Closes #1502
* | | | | MDEV-18565 Galera mtr-suite fails if galera library is not installedSergei Golubchik2020-04-272-112/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | revert/simplify f5390eea9a9 remove galera-specific checks from mtr and the main suite
* | | | | Fixup cd2c0e013ccb5f9b009743dfd7188585a539d9b5Marko Mäkelä2020-01-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | The variable 'dlh' was being used uninitialized if WSREP_PROVIDER is not set.
* | | | | Added error output wsrep_print_versionMonty2020-01-291-5/+16
| | | | | | | | | | | | | | | | | | | | This helps to determinate why galera library doesn't load
* | | | | Merge 10.3 into 10.4, except for MDEV-20265Marko Mäkelä2019-08-231-0/+2
|\ \ \ \ \ | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The MDEV-20265 commit e746f451d57def4be679caafc29976741b3e89f7 introduces DBUG_ASSERT(right_op == r_tbl) in st_select_lex::add_cross_joined_table(), and that assertion would fail in several tests that exercise joins. That commit was skipped in this merge, and a separate fix of MDEV-20265 will be necessary in 10.4.
| * | | | Merge 10.2 into 10.3Marko Mäkelä2019-08-211-0/+2
| |\ \ \ \ | | |/ / /
| | * | | MDEV-20377: Fix uninitialized memory in mysqltestMarko Mäkelä2019-08-191-0/+2
| | | | |
| | * | | MDEV-18565: Galera mtr-suite fails if galera library is not installedJulius Goryavsky2019-07-172-1/+132
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, running mtr with an incorrect (for example, new or obsolete) version of wsrep_provider (for example, with the 26 version of libgalera_smm.so) leads to the failure of tests in several suites with vague error diagnostics. As for the galera_3nodes suite, the mtr also does not effectively check all the prerequisites after merge with MDEV-18426 fixes. For example, tests that using mariabackup do not check for presence of ss and socat/nc. This is due to improper handling of relative paths in mtr scripts. In addition, some tests in different suites can be run without setting the environment variables such as MTR_GALERA_TFMT, XBSTREAM, and so on. To eliminate all these issues, this patch makes the following changes: 1. Added auxiliary wsrep_mtr_check utility (which located in the mysql-test/lib/My/SafeProcess subdirectory), which compares the versions of the wsrep API that used by the server and by the wsrep provider library, and it does this comparison safely, without accessing the API if the versions do not match. 2. All checks related to the presence of mariabackup and utilities that necessary for its operation transferred from the local directories of different mtr suites (from the suite.pm files) to the main suite.pm file. This not only reduces the amount of code and eliminates duplication of identical code fragments, but also avoids problems due to the inability of mtr to consider relative paths to include files when checking skip combinations. 3. Setting the values of auxiliary environment variables that are necessary for Galera, SST scripts and mariabackup (to work properly) is moved to the main mysql-test-run.pl script, so as not to duplicate this code in different suites, and to avoid partial corrections of the same errors for different suites (while other suites remain uncorrected). 4. Fixed duplication of the have_file_key_management.inc and have_filekeymanagement.inc files between different suites, these checks are also transferred to the top level. 5. Added garbd presence check and garbd path variable. https://jira.mariadb.org/browse/MDEV-18565
| * | | | Added missing installation target (merge MDEV-18565 from 10.2 into 10.3)Julius Goryavsky2019-07-171-0/+3
| | | | |
| * | | | MDEV-18565: Galera mtr-suite fails if galera library is not installed (#1243)sysprg2019-07-092-1/+129
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * MDEV-18565: Galera mtr-suite fails if galera library is not installed Currently, running mtr with an incorrect (for example, new or obsolete) version of wsrep_provider (for example, with the 26 version of libgalera_smm.so) leads to the failure of tests in several suites with vague error diagnostics. As for the galera_3nodes suite, the mtr also does not effectively check all the prerequisites after merge with MDEV-18426 fixes. For example, tests that using mariabackup do not check for presence of ss and socat/nc. This is due to improper handling of relative paths in mtr scripts. In addition, some tests in different suites can be run without setting the environment variables such as MTR_GALERA_TFMT, XBSTREAM, and so on. To eliminate all these issues, this patch makes the following changes: 1. Added auxiliary wsrep_mtr_check utility (which located in the mysql-test/lib/My/SafeProcess subdirectory), which compares the versions of the wsrep API that used by the server and by the wsrep provider library, and it does this comparison safely, without accessing the API if the versions do not match. 2. All checks related to the presence of mariabackup and utilities that necessary for its operation transferred from the local directories of different mtr suites (from the suite.pm files) to the main suite.pm file. This not only reduces the amount of code and eliminates duplication of identical code fragments, but also avoids problems due to the inability of mtr to consider relative paths to include files when checking skip combinations. 3. Setting the values of auxiliary environment variables that are necessary for Galera, SST scripts and mariabackup (to work properly) is moved to the main mysql-test-run.pl script, so as not to duplicate this code in different suites, and to avoid partial corrections of the same errors for different suites (while other suites remain uncorrected). 4. Fixed duplication of the have_file_key_management.inc and have_filekeymanagement.inc files between different suites, these checks are also transferred to the top level. https://jira.mariadb.org/browse/MDEV-18565 * Build without additional utility in configurations without wsrep support
* | | | | MDEV-18565: Galera mtr-suite fails if galera library is not installedJulius Goryavsky2019-07-172-1/+132
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, running mtr with an incorrect (for example, new or obsolete) version of wsrep_provider (for example, with the 26 version of libgalera_smm.so) leads to the failure of tests in several suites with vague error diagnostics. As for the galera_3nodes suite, the mtr also does not effectively check all the prerequisites after merge with MDEV-18426 fixes. For example, tests that using mariabackup do not check for presence of ss and socat/nc. This is due to improper handling of relative paths in mtr scripts. In addition, some tests in different suites can be run without setting the environment variables such as MTR_GALERA_TFMT, XBSTREAM, and so on. To eliminate all these issues, this patch makes the following changes: 1. Added auxiliary wsrep_mtr_check utility (which located in the mysql-test/lib/My/SafeProcess subdirectory), which compares the versions of the wsrep API that used by the server and by the wsrep provider library, and it does this comparison safely, without accessing the API if the versions do not match. 2. All checks related to the presence of mariabackup and utilities that necessary for its operation transferred from the local directories of different mtr suites (from the suite.pm files) to the main suite.pm file. This not only reduces the amount of code and eliminates duplication of identical code fragments, but also avoids problems due to the inability of mtr to consider relative paths to include files when checking skip combinations. 3. Setting the values of auxiliary environment variables that are necessary for Galera, SST scripts and mariabackup (to work properly) is moved to the main mysql-test-run.pl script, so as not to duplicate this code in different suites, and to avoid partial corrections of the same errors for different suites (while other suites remain uncorrected). 4. Fixed duplication of the have_file_key_management.inc and have_filekeymanagement.inc files between different suites, these checks are also transferred to the top level. 5. Added garbd presence check and garbd path variable. https://jira.mariadb.org/browse/MDEV-18565
* | | | Merge 10.2 into 10.3Marko Mäkelä2019-05-145-5/+5
|\ \ \ \ | |/ / /
| * | | Merge 10.1 into 10.2Marko Mäkelä2019-05-135-5/+5
| |\ \ \ | | |/ /
| | * | Merge branch '5.5' into 10.1Vicențiu Ciorbaru2019-05-115-5/+5
| | |\ \ | | | |/
| | | * Update FSF AddressVicențiu Ciorbaru2019-05-115-5/+5
| | | | | | | | | | | | | | | | * Update wrong zip-code
* | | | Better crash reports on OS XSergey Vojtovich2018-05-211-0/+50
| | | | | | | | | | | | | | | | | | | | Symlink core from default location (/cores/core.%P), so that lldb can handle it.
* | | | Merge branch '10.2' into 10.3Sergei Golubchik2018-05-111-8/+6
|\ \ \ \ | |/ / /
| * | | Merge branch '10.1' into 10.2Sergei Golubchik2018-05-101-8/+6
| |\ \ \ | | |/ /
| | * | Merge branch '10.0' into 10.1Sergei Golubchik2018-05-051-8/+6
| | |\ \
| | | * | MDEV-16084 Calling exit() from a signal handler is unsafe.Vladislav Vaintroub2018-05-031-8/+6
| | | |/ | | | | | | | | | | | | Call _exit() from signal handler. main() can just do return.
* | | | Merge branch 'bb-10.2-ext' into 10.3Sergei Golubchik2018-02-231-4/+8
|\ \ \ \ | |/ / /
| * | | Merge branch '10.1' into 10.2Sergei Golubchik2018-02-221-4/+8
| |\ \ \ | | |/ /
| | * | log all mtr output in vardir/log/stdout.logSergei Golubchik2018-02-211-4/+8
| | | | | | | | | | | | | | | | despite the name, it logs both stdout and stderr
| | * | Merge branch '10.0' into 10.1Vladislav Vaintroub2015-12-301-5/+5
| | |\ \ | | | |/
| | | * Fix process handle leak in buildbot. GenerateConsoleCtrlEvent sent to ↵Vladislav Vaintroub2015-12-301-5/+5
| | | | | | | | | | | | | | | | non-existing process will add a process handle to this non-existing process to console host process conhost.exe
* | | | Make possible to use clang on Windows (clang-cl)Vladislav Vaintroub2018-02-202-15/+15
| | | | | | | | | | | | | | | | | | | | | | | | -DWITH_ASAN can be used as well now, on x64 Fix many clang-cl warnings.
* | | | Windows, compiling : use /permissive- switch to improve conformanceVladislav Vaintroub2018-02-071-1/+2
|/ / / | | | | | | | | | fix a couple "initialization skipped by goto" and other new errors.
* | | Fix MinSizeRel build on Windows.Vladislav Vaintroub2018-01-261-9/+13
| | | | | | | | | | | | do not include test suite in release zip anymore.
* | | Silence warning coming from Windows' own header dbghelp.hVladislav Vaintroub2018-01-101-0/+13
| | |
* | | Windows- "my_safe_kill <pid> dump" will now also dump child processesVladislav Vaintroub2017-10-251-62/+72
| | | | | | | | | | | | | | | This is necessary to analyze hangs on buildbot, because they also happen when mysqltest executes external programs.
* | | Fix my_safe_kill's create crashdump functionality on Windows.Vladislav Vaintroub2017-10-241-17/+64
| | | | | | | | | | | | | | | If pid belongs to my_safe_process.exe, create crashdump of my_safe_process's child, because my_safe_process is only used to start other programs.
* | | Fix mtr to create a process dump on Window for hanging or looping processesVladislav Vaintroub2017-10-132-2/+81
| | |
* | | don't install same files twiceSergei Golubchik2017-08-141-10/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CMakeLists.txt - merge mistake, apparently include/CMakeLists.txt - install from CMAKE_CURRENT_BINARY_DIR. Only install from CMAKE_CURRENT_SOURCE_DIR, if it's different from CMAKE_CURRENT_BINARY_DIR mysql-test/CMakeLists.txt - INSTALL_MYSQL_TEST() macro installs everything, no need to install mtr separately once again mysql-test/lib/My/SafeProcess/CMakeLists.txt MYSQL_ADD_EXECUTABLE includes INSTALL sql-bench/CMakeLists.txt list files explicitly. don't install garbage, don't process 'foo' and 'foo.sh' separately, it's only one file to install, not two.
* | | Fix process handle leak in buildbot. GenerateConsoleCtrlEvent sent to ↵Vladislav Vaintroub2015-12-301-5/+5
|/ / | | | | | | non-existing process will add a process handle to this non-existing process to console host process conhost.exe
* | test failureSergei Golubchik2015-09-041-7/+15
|/
* MDEV-7659 buildbot may leave stale mysqldSergei Golubchik2015-03-061-5/+13
| | | | | | | | | | | | | | | safe_process puts its children (mysqld, in this case) into a separate process group, to be able to kill it all at once. buildslave kills mtr's process group when it loses connection to the master. result? buildslave kills mtr and safe_process, but leaves stale mysqld processes in their own process groups. fix: put safe_process itself into a separate process group, then buildslave won't kill it and safe_process will kill mysqld'd and itself when it will notice that the parent mtr no longer exists.
* MDEV-7448 - mtr may leave stale mysqldSergey Vojtovich2015-01-142-0/+4
| | | | | | Let mtr handle SIGHUP the same way as SIGINT. This solves stale mysqld processes left after broken/closed ssh connection.
* MySQL-5.5.36 mergeSergei Golubchik2014-02-171-1/+1
|\ | | | | | | (without few incorrect bugfixes and with 1250 files where only a copyright year was changed)
| * Updated/added copyright headersMurthy Narkedimilli2014-01-061-1/+1
| |
* | mysql-5.5.32 mergeSergei Golubchik2013-07-162-5/+17
|\ \ | |/