[MDEV-30885] unit.conc_connection fails on test_conc21 Created: 2023-03-20  Updated: 2023-11-28

Status: Stalled
Project: MariaDB Server
Component/s: None
Affects Version/s: None
Fix Version/s: 10.4, 10.5, 10.6, 10.11

Type: Bug Priority: Major
Reporter: Otto Kekäläinen Assignee: Oleksandr Byelkin
Resolution: Unresolved Votes: 0
Labels: None


 Description   

While building latest MariaDB on Launchpad (Debian/Ubuntu build testing) I noticed that test unit.conc_connection fails on test_conc21

unit.conc_connection                     w3 [ fail ]
        Test ended at 2023-03-19 22:32:31
...
# Due to mysql_change_user security fix this test will not work anymore.
ok 35 # skip test_change_user
true: 1
ok 36 - test_opt_reconnect
ok 37 - test_compress
# Thread_id before kill: 46
# Thread_id after kill: 47
ok 38 - test_reconnect
# Error: String server version mismatch (./libmariadb/unittest/libmariadb/connection.c: 634)
not ok 39 - test_conc21
# error: Can't connect to local server through socket '/run/mysqld/mysqld.sock' (2)
# error: Can't connect to local server through socket '/run/mysqld/mysqld.sock' (2)
ok 40 - test_conc26
# error: Can't connect to server on '192.168.1.101' (110)
# elapsed: 5
ok 41 - test_connection_timeout
# error: Can't connect to local server through socket '/run/mysqld/mysqld.sock' (2)
# elapsed: 0
ok 42 - test_connection_timeout2
# error: Lost connection to server during query
# elapsed: 5
# elapsed: 10
ok 43 - test_connection_timeout3
# close default
# Failed 1 tests!

Full log at https://launchpadlibrarian.net/656676218/buildlog_ubuntu-lunar-amd64.mariadb_1%3A10.11.2-2~ubuntu23.04.1~1679260930.3d164ca5277.dev.otto_BUILDING.txt.gz



 Comments   
Comment by Georg Richter [ 2023-03-20 ]

The length of the server name is limited to 60 chars, so you should reduce the length of your suffix definition when running cmake.

MariaDB [(none)]> select @@version;
+-------------------------------------------------------------+
| @@version                                                   |
+-------------------------------------------------------------+
| 10.11.3-MariaDB-2~ubuntu23.04.1~1679260930.3d164ca5277.dev. |
+-------------------------------------------------------------+
1 row in set (0,001 sec)
 
MariaDB [(none)]> select length(concat("10.11.2-MariaDB", "-2~ubuntu23.04.1~1679260930.3d164ca5277.dev.otto"));
+---------------------------------------------------------------------------------------+
| length(concat("10.11.2-MariaDB", "-2~ubuntu23.04.1~1679260930.3d164ca5277.dev.otto")) |
+---------------------------------------------------------------------------------------+
|                                                                                    63 |
+---------------------------------------------------------------------------------------+

$ grep SERVER_VERSION_LENGTH include/*.h
include/mysql_com.h:#define SERVER_VERSION_LENGTH 60

Comment by Sergei Golubchik [ 2023-03-20 ]

looks like a server bug to me

Comment by Georg Richter [ 2023-03-20 ]

reopend the issue, since it seems to be a server bug:

1) The version string transmitted in the server hello packet has no length limitations
2) The documentation doesn't mention a maximum length of server_version.

The test conc_21 fails here:

FAIL_IF(strcmp(mysql_get_server_info(mysql), tmp) != 0, "String server version mismatch");

Version name submitted in server_hello packet:

5.5.5-10.11.3-MariaDB-2~ubuntu23.04.1~1679260930.3d164ca5277

which will be transformed to

10.11.3-MariaDB-2~ubuntu23.04.1~1679260930.3d164ca5277

select @@version returns

10.11.3-MariaDB-2~ubuntu23.04.1~1679260930.3d164ca5277.dev.

Comment by Otto Kekäläinen [ 2023-10-05 ]

I just ran the full official test suite and this unit.conc_connection is still failing (log https://launchpadlibrarian.net/690458994/buildlog_ubuntu-mantic-amd64.mariadb_1%3A10.11.5-2~bpo23.10.1~1696482175.fcfd3a06fd5.debian.latest.full.mariadb.test.run_BUILDING.txt.gz)

unit.conc_connection                     w1 [ fail ]
        Test ended at 2023-10-05 06:09:22
 
CURRENT_TEST: unit.conc_connection
# port: 16040
# ssl_port: 16040
# socketname: /<<PKGBUILDDIR>>/builddir/mysql-test/var/tmp/1/mysqld.1.sock
1..44
# TLS server variables
# --------------------
# have_openssl: YES
# have_ssl: YES
# ssl_ca: /<<PKGBUILDDIR>>/mysql-test/std_data/cacert.pem
# ssl_capath: 
# ssl_cert: /<<PKGBUILDDIR>>/mysql-test/std_data/server-cert.pem
# ssl_cipher: 
# ssl_crl: 
# ssl_crlpath: 
# ssl_key: /<<PKGBUILDDIR>>/mysql-test/std_data/server-key.pem
# version_ssl_library: OpenSSL 3.0.10 1 Aug 2023
# Cipher in use: TLS_AES_256_GCM_SHA384
# --------------------
# Testing against MySQL Server 10.11.5-MariaDB-2~bpo23.10.1~1696482175.fcfd3a06fd5.de
# Host: Localhost via UNIX socket
# Client library: 3.3.6
ok 1 - test_conc632
# -------------------------
ok 2 - test_status_callback
ok 3 - test_conc365
ok 4 - test_conc365_reconnect
# host: localhost
# user: root
# cipher: (null)
ok 5 - test_conn_str
# Cipher in use: TLS_AES_256_GCM_SHA384
ok 6 - test_conn_str_1
# error: Authentication plugin 'mysql_native_password' couldn't be found in restricted_auth plugin list.
ok 7 - test_conc544
ok 8 - test_conc490
ok 9 # skip test_gtid
ok 10 - test_conc496
ok 11 - test_default_auth
ok 12 - test_conc443
ok 13 - test_conc366
ok 14 - test_conc392
# Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'BY 'foo'' at line 1
# caching_sha256_password not supported
ok 15 # skip test_conc312
ok 16 - test_conc351
# server_status: 16386
# server_status after changing autocommit: 16384
# server_status after mysql_change_user: 16386
ok 17 - test_conc332
# new charset: latin2
ok 18 - test_conc327
ok 19 - test_conc317
# csname=utf8mb4
ok 20 - test_conc315
# Server doesn't support password expiration
ok 21 # skip test_expired_pw
# Cipher in use: TLS_AES_256_GCM_SHA384
# Cipher in use: TLS_AES_256_GCM_SHA384
ok 22 - test_conc276
# character set: latin2
ok 23 - test_mdev13100
# sha256_password plugin not available
ok 24 # skip test_auth256
ok 25 - test_reset
# error: Can't connect to local server through socket './dummy_sock' (111)
# error: Can't connect to local server through socket './dummy_sock' (111)
# error: Can't connect to local server through socket './dummy_sock' (111)
# error: Can't connect to local server through socket './dummy_sock' (111)
# error: Can't connect to local server through socket './dummy_sock' (111)
# error: Can't connect to local server through socket './dummy_sock' (111)
# error: Can't connect to local server through socket './dummy_sock' (111)
# error: Can't connect to local server through socket './dummy_sock' (111)
...

Generated at Thu Feb 08 10:19:37 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.