package mariadb-server-10.0 10.0.16-2~exp1~ubuntu1 is uninstallable

Bug #1429725 reported by David Arceneaux on 2015-03-09
162
This bug affects 33 people
Affects Status Importance Assigned to Milestone
mariadb-10.0 (Ubuntu)
High
Unassigned

Bug Description

I installed via 'apt-get install mariadb-server-10.0' and got this error

ProblemType: Package
DistroRelease: Ubuntu 15.04
Package: mariadb-server-10.0 10.0.16-2~exp1~ubuntu1
ProcVersionSignature: Ubuntu 3.19.0-7.7-generic 3.19.0
Uname: Linux 3.19.0-7-generic x86_64
NonfreeKernelModules: nvidia
ApportVersion: 2.16.2-0ubuntu1
Architecture: amd64
Date: Sun Mar 8 18:31:07 2015
DuplicateSignature: package:mariadb-server-10.0:10.0.16-2~exp1~ubuntu1:subprocess installed post-installation script returned error exit status 1
ErrorMessage: subprocess installed post-installation script returned error exit status 1
InstallationDate: Installed on 2015-03-08 (0 days ago)
InstallationMedia: Ubuntu 15.04 "Vivid Vervet" - Alpha amd64 (20150306)
SourcePackage: mariadb-10.0
Title: package mariadb-server-10.0 10.0.16-2~exp1~ubuntu1 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1
UpgradeStatus: No upgrade log present (probably fresh install)

David Arceneaux (daviy) wrote :
tags: removed: need-duplicate-check
Launchpad Janitor (janitor) wrote :

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

Changed in mariadb-10.0 (Ubuntu):
status: New → Confirmed
Changed in mariadb-10.0 (Ubuntu):
importance: Undecided → High
Daniel Speichert (dasp) wrote :

mysql.log:

ERROR: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the r
ight syntax to use near 'USE mysql; DELIMITER //; CREATE PROCEDURE debian_plugin_install(IN plugin_name C' at line 1
150324 14:43:28 [ERROR] Aborting

Jérôme Poulin (jeromepoulin) wrote :

+ /usr/sbin/mysqld --bootstrap --user=mysql --skip-grant-tables --default-storage-engine=myisam --plugin-load-add=auth_socket
+ echo 'SET sql_log_bin=0; USE mysql; DELIMITER //; CREATE PROCEDURE debian_plugin_install(IN plugin_name CHAR(50), IN soname CHAR(50)) BEGIN DECLARE CONTINUE HANDLER FOR NOT FOUND EXECUTE
inst_plug; set @plugin_name=plugin_name; set @soname=soname ;set @install_plugin=CONCAT("INSTALL PLUGIN ",@plugin_name," SONAME '\''", @soname, "'\''");PREPARE inst_plug FROM @install_plugin ;
select PLUGIN_NAME INTO @a from information_schema.plugins where PLUGIN_NAME=@plugin_name AND PLUGIN_STATUS='\''ACTIVE'\'' AND PLUGIN_TYPE='\''AUTHENTICATION'\'' AND PLUGIN_LIBRARY LIKE concat(@soname,'\''%'\''
); DEALLOCATE PREPARE inst_plug; END// CALL debian_plugin_install('\''unix_socket'\'', '\''auth_socket'\'') // DROP PROCEDURE debian_plugin_install//'
+ logger -p daemon.err -t mysqld_safe -i
dpkg: error processing package mariadb-server-10.0 (--configure):
 subprocess installed post-installation script returned error exit status 1
D000001: ensure_diversions: same, skipping
D000001: process queue pkg mariadb-server:all queue.len 0 progress 1, try 1
dpkg: dependency problems prevent configuration of mariadb-server:
 mariadb-server depends on mariadb-server-10.0 (>= 10.0.16-2~exp1~ubuntu1); however:
  Package mariadb-server-10.0 is not configured yet.

dpkg: error processing package mariadb-server (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 mariadb-server-10.0
 mariadb-server

Mark Constable (markc) wrote :

FWIW I also notice that /etc/mysql/debian.cnf contains "socket = /mysqld.sock" instead of "socket = /var/run/mysqld/mysqld.sock" and after many hours attempting to get the package installed I seem to have it running but I cannot gain root access even though I have reset the root password a dozen times in a few different ways.

/etc/mysql/mariadb.conf.d/mysqld.cnf has a "user = mysql" setting which I think is needed to initially install the tables because doing so manually results in some root owned files/dirs (like /var/lib/mysql/mysql) but then that mysql user setting seems to disrupt further operations unless there are specific grant entries for that user and there is no hint of any attempt to setup a mysql user in the install scripts.

I'd go "back" to mysql 5.6 but it uses a huge amount of ram by default, over 400Mb RSS compared to about 100Mb RSS for mariadb 10 and mysql 5.5. For me the only immediate solutions is to drop back to utopic and hope the mariadb 10 packages get fixed asap.

Gabor Jozsef Wacha (wachag) wrote :

Apparently falling back to MySQL does not work, since at this stage of the installation MariaDB already converted the database to its engine (I am not a database expert).
This means that now I have cca. 10 unaccessible databases with a few hundred tables each...

Maxxer (lorenzo-milesi) wrote :

Not sure I'm affected by the same bug, but my postinst fails like this:

root@dharma:/var/lib/dpkg/info# ./mariadb-server-10.0.postinst
Use of uninitialized value $action in string eq at /usr/share/debconf/frontend line 27.
postinst called with unknown argument ''

Maxxer (lorenzo-milesi) wrote :

ignore last comment:

150404 22:45:34 [Note] InnoDB: Waiting for purge to start
150404 22:45:34 [Note] InnoDB: Percona XtraDB (http://www.percona.com) 5.6.22-71.0 started; log sequence number 1617093
150404 22:45:34 [Note] Plugin 'FEEDBACK' is disabled.
ERROR: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use ne
ar 'USE mysql; DELIMITER //; CREATE PROCEDURE debian_plugin_install(IN plugin_name C' at line 1
150404 22:45:34 [ERROR] Aborting

Matthieu Marcillaud (marcimat) wrote :
Download full text (13.3 KiB)

Hi all,

I have same error (using mariadb-server-10.0 (10.0.16-2~exp1~ubuntu1)).

I try to use the latest debian .postinst file we can find here : http://anonscm.debian.org/cgit/pkg-mysql/mariadb-10.0.git/log/debian/mariadb-server-10.0.postinst

There is into a partial improvement (there is no more sql syntax error), but there is instead a new error with mysqld and skip-grant-tables option :

<pre>
150410 14:47:42 [Note] InnoDB: Waiting for purge to start
150410 14:47:42 [Note] InnoDB: Percona XtraDB (http://www.percona.com) 5.6.22-71.0 started; log sequence number 1616887
150410 14:47:42 [Note] Plugin 'FEEDBACK' is disabled.
ERROR: 1290 The MariaDB server is running with the --skip-grant-tables option so it cannot execute this statement
150410 14:47:42 [ERROR] Aborting
</pre>

I try to remove this option in the postinst script, but nothing change, so I understand (or try to) that it is not this script who runs mysqd in the time of the error.

There is also a thread about this update (passwordless root account feature) here : https://lists.launchpad.net/maria-developers/msg08314.html . This (breaking) update seems to come with the debian/ubuntu package mariadb-server-10.0.16 .

In this thread, an answer is proposed for this new error, so I try it and replace ~L.177 :
<pre>
"INSTALL PLUGIN unix_socket SONAME 'auth_socket';\n"`
</pre>
by
<pre>
"INSERT INTO mysql.plugin (name, dl) VALUES ('unix_socket', 'auth_socket');\n"`
</pre>

With this, it's better, but… there is a new error ! Witch is :
<pre>
150410 15:46:11 [Note] InnoDB: Percona XtraDB (http://www.percona.com) 5.6.22-71.0 started; log sequence number 1616797
150410 15:46:11 [Note] Plugin 'FEEDBACK' is disabled.
150410 15:46:11 [ERROR] Function 'unix_socket' already exists
150410 15:46:11 [Warning] Couldn't load plugin named 'unix_socket' with soname 'auth_socket'.
150410 15:46:11 [Note] Server socket created on IP: '127.0.0.1'.
</pre>

After that, I try to replace new INSERT with REPLACE, as maybe the error is that.
So, I change the line above by :
<pre>
"REPLACE INTO mysql.plugin (name, dl) VALUES ('unix_socket', 'auth_socket');\n"`
</pre>

So, with, that, I have no more error in var/log/mysql. Happy !
But… The package won't install correctly.

I have a new error :
<pre>
Paramétrage de mariadb-server-10.0 (10.0.16-2~exp1~ubuntu1) ...
Job for mysql.service failed. See "systemctl status mysql.service" and "journalctl -xe" for details.
invoke-rc.d: initscript mysql, action "start" failed.
</pre>

The command "systemctl status mysql.service" tells me that mysql_safe can't log on both syslog and error.log.
So I comment the "syslog" line in /etc/mysql/mariadb.conf.d/mysqld_safe.cnf

And… with all that, it is finally working (but I'm not really sure).
I need to replace my old databases thought.

So to work : stop mysql, remove the deamon, remove package mariadb-server,
remove /var/lib/mysql, remove .postinst, comment syslog line in mysqld_safe.cnf,
reinstall mariadb-server (with error), change the .postinst by new one
(see below), re-run configure dpkg…

Note : To achieve my tests, I used that commands.
I had totally also reinstall mysql-common but I think it was not necessary (mark wi...

Otto Kekäläinen (otto) wrote :

Hello!

Ubuntu should sync to 10.0.17-1~exp2 from Debian is possible. The DELIMITER issue is fixed now in Debian experimental and anyway the current Debian experimental is much less experimental now as the changes done between 10.0.16...17 in packaging have been stablized now.

Otto, the Debian maintainer of MariaDB

summary: - package mariadb-server-10.0 10.0.16-2~exp1~ubuntu1 failed to
- install/upgrade: subprocess installed post-installation script returned
- error exit status 1
+ package mariadb-server-10.0 10.0.16-2~exp1~ubuntu1 is uninstallable
Robie Basak (racb) on 2015-04-16
Changed in mariadb-10.0 (Ubuntu):
status: Confirmed → Fix Committed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mariadb-10.0 - 10.0.17-0ubuntu1

---------------
mariadb-10.0 (10.0.17-0ubuntu1) vivid; urgency=medium

  * New upstream microrelease.
  * Drop patches no longer required:
    - d/p/reproducible-builds-fix-connect.patch: upstream no longer uses
      __DATE__ and __TIME__ in build.
    - new_valid_certs.patch, new_valid_certs_test_fix.patch: tests fixed
      upstream with new certificate.
  * Refresh remove_rename_mariadb-server_files_in.patch to remove fuzz.
  * Cherry-picks from Debian VCS in range e73d494..c0b5f94 as the others
    are not suitable for feature freeze:
    - [221008e] Adding mysqld_multi_confd.patch, makes mysqld_multi
      reading conf.d (Closes: #778761)
    - [361e420] Adding mysqld_multi.server_lsb-header.patch, provides
      LSB headers for example initscript (Closes: #778762)
    - [5038203] d/rules: added same hardening line as in mysql-5.6
      packaging after validation with hardening-check tool
    - [c0b5f94] Updated Swedish debconf translations
    - Fixes to d/mariadb-server-10.0.postinst:
      + [72b30b2] Remove script output, such invasive debugging is no
        longer needed.
      + [ffefd9a] Set mysql_rundir
      + [14fd487] Fix postinst script failure: don't use unsupported
        DELIMITER in mysqld command (LP: #1429725).
 -- Robie Basak <email address hidden> Thu, 16 Apr 2015 14:16:45 +0000

Changed in mariadb-10.0 (Ubuntu):
status: Fix Committed → Fix Released
Wacha Gábor (wacha) wrote :

I see that a fix has been released. And what happens with my half-migrated databases?

Also, since mysql-common is still broken from the earlier Mariadb install (and the fix does not solve this problem), half of the KDE packages which depend on Mysql are unavailable (amarok, akonadi-server, python3-pykde4, etc.).

Robie Basak (racb) wrote :

Migration performed in maintainer scripts should be idempotent (since maintainer scripts should be idempotent). So in theory it should magically all be fixed on upgrade. Clearly you're saying that it isn't, so there's still a bug there. If somebody can help fix this for users who were testing Vivid, your help would be appreciated.

> Also, since mysql-common is still broken from the earlier Mariadb install

How so?

Wacha Gábor (wacha) wrote :

A little update: I could not manage to get a verbose output from APT, only a complaint about update-alternatives not finding /etc/mysql/my.cnf.fallback which I did not think to be relevant.

However, this gave me an idea: from a backup I've restored the /etc/mysql config from a MySQL installed before the MariaDB migration. This solved my problem. Now how and why my /etc/mysql directory became corrupted will - I think - remain a mystery...

So the conclusion is: always back up your /etc :-)

Robie Basak (racb) wrote :

> only a complaint about update-alternatives not finding /etc/mysql/my.cnf.fallback which I did not think to be relevant.

This is relevant, I think. It should be provided by mysql-common now, and on Ubuntu MariaDB should require the version of mysql-common that supplies it. So why was it not present on your system at install time?

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers