mysqld: relocation error: mysqld: symbol _ZTVNSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEEE, version GLIBCXX_3.4.21 not defined in file libstdc++.so.6 with link time reference

Bug #1609043 reported by Carles Sentis
32
This bug affects 6 people
Affects Status Importance Assigned to Milestone
gcc-6 (Ubuntu)
Won't Fix
High
Unassigned

Bug Description

Upgrade from 14.4 to 16.4.1

ProblemType: Package
DistroRelease: Ubuntu 16.04
Package: mysql-server-5.7 5.7.13-0ubuntu0.16.04.2
ProcVersionSignature: Ubuntu 4.4.0-31.50-generic 4.4.13
Uname: Linux 4.4.0-31-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.1
Architecture: amd64
Date: Tue Aug 2 15:03:05 2016
DuplicateSignature:
 package:mysql-server-5.7:5.7.13-0ubuntu0.16.04.2
 Setting up gir1.2-click-0.4 (0.4.43+16.04.20160203-0ubuntu2) ...
 dpkg: error processing package click (--configure):
  package click is already installed and configured
ErrorMessage: subprocess installed post-installation script returned error exit status 127
InstallationDate: Installed on 2014-09-04 (698 days ago)
InstallationMedia: Ubuntu 14.04.1 LTS "Trusty Tahr" - Release amd64 (20140722.2)
Logs.var.log.daemon.log:

MySQLConf.etc.mysql.conf.d.mysql.cnf: [mysql]
MySQLConf.etc.mysql.conf.d.mysqld_safe_syslog.cnf:
 [mysqld_safe]
 syslog
MySQLConf.etc.mysql.conf.d.mysqldump.cnf:
 [mysqldump]
 quick
 quote-names
 max_allowed_packet = 16M
MySQLConf.etc.mysql.mysql.conf.d.mysqld_safe_syslog.cnf:
 [mysqld_safe]
 syslog
MySQLVarLibDirListing: ['mysql_upgrade_info', 'ibtmp1', 'sys', 'mysql', 'ib_buffer_pool', 'ib_logfile0', 'debian-5.7.flag', 'auto.cnf', 'debian-5.5.flag', 'ib_logfile1', 'ibdata1', 'performance_schema']
ProcCmdline: BOOT_IMAGE=/boot/vmlinuz-4.4.0-31-generic.efi.signed root=UUID=20f5f1ec-f780-453a-89f8-f3dad1b3cf2d ro quiet splash vt.handoff=7
RelatedPackageVersions:
 dpkg 1.18.4ubuntu1.1
 apt 1.2.12~ubuntu16.04.1
SourcePackage: mysql-5.7
Title: package mysql-server-5.7 5.7.13-0ubuntu0.16.04.2 failed to install/upgrade: subprocess installed post-installation script returned error exit status 127
UpgradeStatus: Upgraded to xenial on 2016-08-02 (0 days ago)

Revision history for this message
Carles Sentis (heepie202) wrote :
tags: removed: need-duplicate-check
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in mysql-5.7 (Ubuntu):
status: New → Confirmed
Revision history for this message
Robie Basak (racb) wrote :

From log:

Setting up mysql-server-5.7 (5.7.13-0ubuntu0.16.04.2) ...
Installing new version of config file /etc/apparmor.d/usr.sbin.mysqld ...
Installing new version of config file /etc/init.d/mysql ...
Installing new version of config file /etc/init/mysql.conf ...
Installing new version of config file /etc/logrotate.d/mysql-server ...
Installing new version of config file /etc/mysql/debian-start ...
/usr/lib/x86_64-linux-gnu/libproxy.so.1: symbol _ZTTNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEE, version GLIBCXX_3.4.21 not defined in file libstdc++.so.6 with link time reference
Failed to load module: /usr/lib/x86_64-linux-gnu/gio/modules/libgiolibproxy.so
update-alternatives: using /etc/mysql/mysql.cnf to provide /etc/mysql/my.cnf (my.cnf) in auto mode
Renaming removed key_buffer and myisam-recover options (if present)
ERROR: Unable to start MySQL server:
mysqld: relocation error: mysqld: symbol _ZTVNSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEEE, version GLIBCXX_3.4.21 not defined in file libstdc++.so.6 with link time reference
Please take a look at https://wiki.debian.org/Teams/MySQL/FAQ for tips on fixing common upgrade issues.
Once the problem is resolved, run apt-get --fix-broken install to retry.
dpkg: error processing package mysql-server-5.7 (--configure):
 subprocess installed post-installation script returned error exit status 127

summary: - package mysql-server-5.7 5.7.13-0ubuntu0.16.04.2 failed to
- install/upgrade: subprocess installed post-installation script returned
- error exit status 127
+ mysqld: relocation error: mysqld: symbol
+ _ZTVNSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEEE, version
+ GLIBCXX_3.4.21 not defined in file libstdc++.so.6 with link time
+ reference
Changed in mysql-5.7 (Ubuntu):
importance: Undecided → High
Revision history for this message
DLPaktor (cppege430dtvg7d94rok5-david-9ei9nyjpwdexk1if796so) wrote :

My experience was very similar to that of the Original Reporter, Carles Sentis on 2016-08-02.

After upgrading from 14.4 to 16.4.1, I got a very similar error message:

apt-get: relocation error: /usr/lib/x86_64-linux-gnu/libapt-pkg.so.5.0: symbol _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareERKS4_, version GLIBCXX_3.4.21 not defined in file libstdc++.so.6 with link time reference

(Slightly different name of the undefined symbol).

This error-message occurred during boot-up; the system would not run at all!

Fortunately, before doing this upgrade on my main drive, I had done a test-upgrade on a scratch disk.
That one worked just fine. Apparently, I had gotten 16.4 (point nothing)

At first I thought it was a data-transmission error, but (running off the scratch disk), I eventually found other discussions of the same error.

As the error-message indicates, the proximate cause was in the file: /usr/lib/x86_64-linux-gnu/libstdc++.so.6 , which is sym-linked to libstdc++.so.6.0.22 (i.e.: libstdc++.so.6 -> libstdc++.so.6.0.22 ).

On my working scratch disk, the link is to libstdc++.so.6.0.21

When I copied ...0.21 over to my main drive and re-did the link to point to ...0.21 , everything worked again.

I have since had several system updates. Before and after each one, I now check where the /usr/lib/x86_64-linux-gnu/libstdc++.so.6 is linked. On several of them, the link got re-assigned to ...0.22
As soon as I noticed that, I re-did the link by hand.

I found that a very quick way to test and verify that "something is not right" is to launch gedit

When the link was pointing at ...0.22 , gedit would just refuse to open; once I relinked to ...0.21 , it worked as normal.

I don't know why this has not raised screaming fire alarms! This error prevents the system from booting up, as well as inhibiting basic functionality.

I hope to see a fixed libstdc++.so.6.0.23 that fixes the problem. Meanwhile, I will continue to be wary after every system update. ...

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

http://askubuntu.com/a/777814/7808 suggests that this bug can occur if people had "PPA for Ubuntu Toolchain Uploads" enabled. Can anyone affected who definitely *did not ever* have this PPA installed please speak up?

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

This seems to be not MySQL-specific, but related to libstdc++ as shipped in Ubuntu. Or it could be from a libstdc++ -related PPA, in which case it isn't a bug. Whichever way, let's move it away from the MySQL packaging and closer to the package with the problem, if indeed it is even a problem in Ubuntu.

affects: mysql-5.7 (Ubuntu) → gcc-6 (Ubuntu)
Revision history for this message
Mike McCracken (mikemc) wrote :

I have just seen this - with the following symbol error being thrown when trying to run 'apt' or 'apt-get', etc:

apt: relocation error: /usr/lib/x86_64-linux-gnu/libapt-private.so.0.0: symbol _ZN13pkgSourceList16AddVolatileFilesER11CommandLinePSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS8_EE, version APTPKG_5.0 not defined in file libapt-pkg.so.5.0 with link time reference

I have never had the "PPA for Ubuntu Toolchain Uploads" installed.

This is on a zesty server install. I have the latest libstdc++.so.6.0.22 version as mentioned in #4, and I'm going to try downgrading to .21

Revision history for this message
Matthias Klose (doko) wrote :

not looking into that. artful and bionic have GCC 7.2 as the default. please reopen if the problem persists.

Changed in gcc-6 (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.