Malformed packet with mariadb-server-10.0

Bug #1660503 reported by SergeiFranco
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
exim4 (Ubuntu)
Won't Fix
Undecided
Unassigned
mariadb-10.0 (Ubuntu)
Won't Fix
Undecided
Unassigned

Bug Description

When trying to connect with exim4-daemon-heavy (out of official 16.04 repository) to mariadb-server-10.0 (also out of official 16.04 repository) the following error occurs:

"MYSQL connection failed: Malformed packet"

The packages in questions are:

Package: mariadb-server
Version: 10.0.29-0ubuntu0.16.04.1

mariadb-server:
  Installed: (none)
  Candidate: 10.0.29-0ubuntu0.16.04.1
  Version table:
     10.0.29-0ubuntu0.16.04.1 500
        500 http://nz.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages
        500 http://nz.archive.ubuntu.com/ubuntu xenial-updates/universe i386 Packages
        500 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 Packages
        500 http://security.ubuntu.com/ubuntu xenial-security/universe i386 Packages
     10.0.24-7 500
        500 http://nz.archive.ubuntu.com/ubuntu xenial/universe amd64 Packages
        500 http://nz.archive.ubuntu.com/ubuntu xenial/universe i386 Packages

Package: exim4-daemon-heavy
Version: 4.86.2-2ubuntu2.1

exim4-daemon-heavy:
  Installed: 4.86.2-2ubuntu2.1
  Candidate: 4.86.2-2ubuntu2.1
  Version table:
 *** 4.86.2-2ubuntu2.1 500
        500 http://nz.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages
        100 /var/lib/dpkg/status
     4.86.2-2ubuntu2 500
        500 http://nz.archive.ubuntu.com/ubuntu xenial/main amd64 Packages

Description: Ubuntu 16.04.1 LTS
Release: 16.04

It appears that exim4 is using libmysqlclient.so.20, which is not compatible with mariadb-10.0.
The exim4 from 14.04 on other hand was using libmysqlclient.so.18, which could be replaced by libmariadbclient18 from mariadb repository. There is no such equivalent for libmysqlclient20.

strace of mariadb instance during the malformed packet moment:
[pid 27743] recvfrom(0, "\215\242\276\1\0\0\0@\10\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0acs\0\24\33\272\343E^LN\260\201\350s<F\352\36\301\343\2#5mail\0mysql_native_password\0R\3_os\5Linux\f_client_name\10libmysql\4_pid\0042375\17_client_version\0065.7.17\t_platform\6x86_64", 167, MSG_DONTWAIT, NULL, NULL) = 167
[pid 27743] sendto(0, "\1\0\0\2\376", 5, MSG_DONTWAIT, NULL, 0) = 5

strace of mariadb instance during connection from 14.04 version of exim4 (no malformed packet):
[pid 27743] recvfrom(0, "\205\246? \0\0\0\1!\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0acs\0\24\226\266\337\245\374\207,\236&\322\32\334Z\34K\0\305\35n?mysql_native_password\0q\3_os\20debian-linux-gnu\f_client_name\10libmysql\4_pid\0042390\17_client_version\00710.0.29\t_platform\6x86_64\fprogram_name\5mysql", 193, MSG_DONTWAIT, NULL, NULL) = 193
[pid 27743] sendto(0, "\1\0\0\2\376", 5, MSG_DONTWAIT, NULL, 0) = 5

It appears that sendto(0, "\1\0\0\2\376"... triggers malformed packet.

This scenario can also be replicated using mysql-client (5.7.17-0ubuntu0.16.04.1):

ERROR 2027 (HY000): Malformed packet

I am not sure if it is a problem with mariadb-server-10.0 or actually with mysql 5.7 libraries...
I used exim as an example of affected software where it cannot be used with mariadb-server-10.0 (being an alternative for mysql).

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in exim4 (Ubuntu):
status: New → Confirmed
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Sorry to come by so late Sergei,
but I was clearing some old bug today.

I think - as you already point out - this might much more be an issue of libmysqlclient.20 ver maria-10 - therefore I'm adding the package of mysql who owns the lib for the experience and context of Lars and Robie woh work on it to take a look at this.

tags: added: xenial
Revision history for this message
Robie Basak (racb) wrote :

Thank you for the report.

MySQL doesn't make any claim in relation to compatibility with MariaDB.

Either MariaDB is compatible with MySQL, or it is not. Whether it is or not is therefore up to MariaDB Corp to decide.

If it is supposed to be compatible according to MariaDB, then this is an incompatibility and therefore a bug in MariaDB.

If it is not supposed to be compatible according to MariaDB, then I'm afraid that we'll have to mark this bug Won't Fix, and make it clear to users that they are not compatible and should not be used in this way.

To resolve this question, I think it's appropriate to assign this bug against MariaDB.

Please note that MariaDB is in universe in Ubuntu, and supported on a community-driven volunteer basis only.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in mariadb-10.1 (Ubuntu):
status: New → Confirmed
Robie Basak (racb)
affects: mysql-5.7 (Ubuntu) → mariadb-10.1 (Ubuntu)
Changed in mariadb-10.0 (Ubuntu):
status: New → Confirmed
Robie Basak (racb)
affects: mariadb-10.1 (Ubuntu) → mariadb-10.0 (Ubuntu)
Revision history for this message
Otto Kekäläinen (otto) wrote :

This is probably something introduced in libmysqlclient.so.20 that is incompatible with older versions of itself (or MariaDB). You could try a newer MariaDB version. Anyway, the libmariadb of mariadb-10.0 in an old Ubuntu release will not be updated at this point in time.

Changed in mariadb-10.0 (Ubuntu):
status: New → Won't Fix
Bryce Harrington (bryce)
Changed in exim4 (Ubuntu):
status: Confirmed → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.