Skip to content
Permalink
Browse files
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.
  • Loading branch information
montywi committed Oct 19, 2022
1 parent 5522723 commit 81ad678
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
@@ -1 +1 @@
-a -Cutf8 --collation-server=utf8_bin -T12 -W2
-a -Cutf8 --collation-server=utf8_bin -W2
@@ -1,5 +1,4 @@
# 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:

0 comments on commit 81ad678

Please sign in to comment.