Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Won't Fix
-
10.5.4
-
POWER_PPC64, AIX 7.1, GCC 8.4
Description
Hi,
On AIX, all tests fail with an EBADF:
[ERROR] Error in accept: Bad file number
The error is from handle_connections_sockets() function in sql/mysqld.cc. This function has been rewritten in 10.5.
If I compare https://github.com/MariaDB/server/blob/10.4/sql/mysqld.cc#L6549 and https://github.com/MariaDB/server/blob/10.5/sql/mysqld.cc#L6262, I think the logic is not the same.
In particular, if getting fd is a success, the loop is over on 10.4, and the loop retries in 10.5.
It causes the EBADF on AIX. The following patch corrects the trouble on AIX and does not affect Linux tests result.
--- ./sql/mysqld.cc.orig 2020-07-10 13:26:15 +0200
|
+++ ./sql/mysqld.cc 2020-07-10 16:57:03 +0200
|
@@ -6260,8 +6260,8 @@
|
sql_perror("Error in accept");
|
if (socket_errno == SOCKET_ENFILE || socket_errno == SOCKET_EMFILE)
|
sleep(1); // Give other threads some time
|
- break;
|
}
|
+ break;
|
}
|
}
|
sd_notify(0, "STOPPING=1\n" |
I think this patch restores the same logical between 10.4 and 10.5.
Tested on:
AIX configuration: POWER_PPC64, AIX 7.1, GCC 8.4
Linux configuration: x86_64, Fedora 31, 9.3