summaryrefslogtreecommitdiff
path: root/mysql-test/lib
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2022-12-16 09:59:09 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2022-12-16 09:59:09 +0200
commit9f8fc983d5fe23698f8fd6f7457568cd689ed0e2 (patch)
treedd9006256dd77b3c62e82126de1dc260bd33cd25 /mysql-test/lib
parentd0f6d467045591176ec5e229e2b0562c61c29358 (diff)
downloadmariadb-git-9f8fc983d5fe23698f8fd6f7457568cd689ed0e2.tar.gz
MDEV-30242 MTR fails to report stack traces of all threads by default
An unfortunate change to the default behavior of the handling of core dumps was implemented in commit e9be5428a27eaaccf142f2bd53f4d30e8e368484 by making MTR_PRINT_CORE=small the default value, that is, to only display the stack trace of one thread in crash reports. Many if not most failures that occur in regression tests are sporadic and involve race conditions or deadlocks. To be able to analyze such failures, having the stack traces of all active threads is a must, because CI environments typically do not save any core dumps. While the environment variable MTR_PRINT_CORE could be set in CI environments to compensate for the unfortunate change, it is better to revert to the old default (dumping all threads) so that no explicit action will be required from maintainers of independent CI systems. In that case, if something fails once in a blue moon, we can have some hope of diagnosing it based on the output. We fix this regression by defaulting the unset environment variable MTR_PRINT_CORE to "medium".
Diffstat (limited to 'mysql-test/lib')
-rw-r--r--mysql-test/lib/My/CoreDump.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/mysql-test/lib/My/CoreDump.pm b/mysql-test/lib/My/CoreDump.pm
index 298cf9ef877..05b6edf1385 100644
--- a/mysql-test/lib/My/CoreDump.pm
+++ b/mysql-test/lib/My/CoreDump.pm
@@ -108,7 +108,7 @@ for my $f (keys %print_formats)
register_opt('print-core|C', ':s',
"Print core dump format: ". $print_formats. " (for not printing cores). ".
- "Defaults to value of MTR_PRINT_CORE or 'short'");
+ "Defaults to value of MTR_PRINT_CORE or 'medium'");
if (!IS_WINDOWS)
{
register_opt('print-method', '=s',
@@ -134,7 +134,7 @@ sub env_or_default($$) {
}
sub pre_setup() {
- $config{print_core}= env_or_default('short', 'MTR_PRINT_CORE')
+ $config{print_core}= env_or_default('medium', 'MTR_PRINT_CORE')
if not defined $config{print_core};
$config{print_method}= (IS_WINDOWS) ? 'cdb' : 'auto'
if not defined $config{print_method};