Commit 81ad6787 authored by Monty's avatar Monty

MDEV-29508 perfschema.short_option_1 fails with MSAN - Error in accept

This was caused by the short_option_1-master.opt file that had the
option -T12, which means (among other things) to use blocking for
sockets.  This was supported up to MariaDB 10.4, but not in 10.5 where
we removed the code that changes blocking sockets to non blocking in
case of errors.

Fixed by ignoring the TEST_BLOCKING flag and also by not using the -T12
argument in short_option_1.

Other things:
- Added back support for valgrind (the original issue had nothing to
  do with valgrind).
- While debugging I noticed that the retry loop in
  handle_connections_sockets() was doing a lot of work during shutdown.
  Fixed by not doing retrys during shutdown.
parent 55227234
-a -Cutf8 --collation-server=utf8_bin -T12 -W2
-a -Cutf8 --collation-server=utf8_bin -W2
# Work around MDEV-29508
--source include/not_valgrind.inc
# Tests for PERFORMANCE_SCHEMA
# Check server start for short server start options
......
......@@ -6307,7 +6307,7 @@ void handle_connections_sockets()
sock = unix_sock;
#endif // HAVE_POLL
for (uint retry=0; retry < MAX_ACCEPT_RETRY; retry++)
for (uint retry=0; retry < MAX_ACCEPT_RETRY && !abort_loop; retry++)
{
size_socket length= sizeof(struct sockaddr_storage);
MYSQL_SOCKET new_sock;
......@@ -8044,7 +8044,7 @@ mysqld_get_one_option(const struct my_option *opt, const char *argument,
global_system_variables.log_warnings= atoi(argument);
break;
case 'T':
test_flags= argument ? (uint) atoi(argument) : 0;
test_flags= argument ? ((uint) atoi(argument) & ~TEST_BLOCKING) : 0;
opt_endinfo=1;
break;
case OPT_THREAD_CONCURRENCY:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment