Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 412911 - emerge --config =dev-db/mysql-5.1.61 fails to create initial database
Summary: emerge --config =dev-db/mysql-5.1.61 fails to create initial database
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo Linux MySQL bugs team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-21 12:24 UTC by Thomas Beutin
Modified: 2013-02-14 15:59 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
/var/tmp/portage/dev-db/mysql-5.1.61/temp/mysql_install_db.log (mysql_install_db.log,1.12 KB, text/plain)
2012-04-21 12:25 UTC, Thomas Beutin
Details
/var/log/mysql/mysqld.err (mysqld.err,1.18 KB, text/plain)
2012-04-21 12:25 UTC, Thomas Beutin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Beutin 2012-04-21 12:24:22 UTC
I'm unable to create the initial mysql database on my AMD E-350 amd64 system:

More information is available in the soon attached files:
/var/tmp/portage/dev-db/mysql-5.1.61/temp/mysql_install_db.log
/var/log/mysql/mysqld.err



Reproducible: Always

Steps to Reproduce:
1. emerge --config =dev-db/mysql-5.1.61
Actual Results:  

# emerge --config =dev-db/mysql-5.1.61


Configuring pkg...

 * Please provide a password for the mysql 'root' user now, in the
 * MYSQL_ROOT_PASSWORD env var or through the /root/.my.cnf file.
 * Avoid ["'\_%] characters in the password
    >
 * Retype the password
    >
 * ERROR: dev-db/mysql-5.1.61 failed (config phase):
 *   Failed to run mysql_install_db. Please review /var/log/mysql/mysqld.err AND /var/tmp/portage/dev-db/mysql-5.1.61/temp/mysql_install_db.log
 * 
 * Call stack:
 *     ebuild.sh, line   85:  Called pkg_config
 *   environment, line 3640:  Called mysql-v2_pkg_config
 *   environment, line 3271:  Called die
 * The specific snippet of code:
 *           die "Failed to run mysql_install_db. Please review ${EPREFIX}/var/log/mysql/mysqld.err AND ${TMPDIR}/mysql_install_db.log";
 * 
 * If you need support, post the output of 'emerge --info =dev-db/mysql-5.1.61',
 * the complete build log and the output of 'emerge -pqv =dev-db/mysql-5.1.61'.
 * This ebuild is from an overlay named 'gentoo': '/var/db/pkg/'
 * The complete build log is located at '/var/tmp/portage/dev-db/mysql-5.1.61/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-db/mysql-5.1.61/temp/environment'.
 * S: '/var/tmp/portage/dev-db/mysql-5.1.61/work/mysql-5.1.61'
(this is the content of /var/tmp/portage/dev-db/mysql-5.1.61/temp/build.log too)

Expected Results:  
clean db initialisation.



# emerge --info =dev-db/mysql-5.1.61
Portage 2.1.10.49 (default/linux/amd64/10.0, gcc-4.5.3, glibc-2.13-r4, 3.2.12-gentoo x86_64)
=================================================================
                        System Settings
=================================================================
System uname: Linux-3.2.12-gentoo-x86_64-AMD_E-350_Processor-with-gentoo-2.0.3
Timestamp of tree: Fri, 20 Apr 2012 05:30:01 +0000
app-shells/bash:          4.2_p20
dev-lang/python:          2.7.2-r3, 3.2.2
dev-util/cmake:           2.8.6-r4
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.0.3
sys-apps/openrc:          0.9.8.4
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.68
sys-devel/automake:       1.11.1
sys-devel/binutils:       2.21.1-r1
sys-devel/gcc:            4.5.3-r2
sys-devel/gcc-config:     1.5-r2
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r1
sys-kernel/linux-headers: 3.1 (virtual/os-headers)
sys-libs/glibc:           2.13-r4
Repositories: gentoo x-portage
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/fax /var/bind /var/spool/fax/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox"
FFLAGS=""
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="de en_IE en_GB en"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://portage/gentoo-portage"
USE="aac amd64 apache2 berkdb bzip2 cli cracklib crypt cvs cxx dri flac fortran gdbm geoip iconv imap ipv6 jbig jpeg ldap logrotate logwatch lzma memcache mercurial mmx modules mudflap multilib mysql ncurses nls nptl nptlonly ogg openmp pam pcre perl png postgres pppd readline sasl session sharedext sharedmem snmp sockets sqlite sqlite3 sse sse2 sse4a ssl ssse3 subversion sysfs syslog tcpd tiff unicode vhosts vorbis x264 xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="access auth auth_basic authn_dbm dbd ident imagemap authn_dbd authn_file authn_default authz_groupfile authn_alias authn_anon authz_dbm authz_owner authz_default authz_user auth_digest authz_host alias file_cache echo charset_lite cache disk_cache mem_cache ext_filter case_filter case-filter-in deflate filter mime_magic cern_meta proxy_ajp proxy_balancer expires headers usertrack proxy proxy_connect proxy_ftp proxy_http info include cgi cgid dav dav_lock dav_fs vhost_alias speling rewrite log_config logio env setenvif mime status substitute autoindex asis negotiation dir imap actions userdir so unique_id" APACHE2_MPMS="prefork" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de en_IE en_GB en" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="vesa" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON

=================================================================
                        Package Settings
=================================================================

dev-db/mysql-5.1.61 was built with the following:
USE="berkdb community extraengine (multilib) perl profiling ssl -big-tables -cluster -debug -embedded -latin1 -max-idx-128 -minimal -pbxt (-selinux) -static -test -xtradb"
CFLAGS="-O2 -pipe -DHAVE_ERRNO_AS_DEFINE=1 -fno-strict-aliasing"
CXXFLAGS="-O2 -pipe -DHAVE_ERRNO_AS_DEFINE=1 -fno-exceptions -fno-strict-aliasing -felide-constructors -fno-rtti -fno-implicit-templates -fno-strict-aliasing"

# emerge -pqv =dev-db/mysql-5.1.61
[ebuild   R   ] dev-db/mysql-5.1.61  USE="berkdb community extraengine perl profiling ssl -big-tables -cluster -debug -embedded -latin1 -max-idx-128 -minimal -pbxt (-selinux) -static -test -xtradb"
Comment 1 Thomas Beutin 2012-04-21 12:25:08 UTC
Created attachment 309717 [details]
/var/tmp/portage/dev-db/mysql-5.1.61/temp/mysql_install_db.log
Comment 2 Thomas Beutin 2012-04-21 12:25:41 UTC
Created attachment 309719 [details]
/var/log/mysql/mysqld.err
Comment 3 Thomas Beutin 2012-04-21 12:40:03 UTC
Actually, i'm able to start the mysql database even though the failed initialisation, but im unable to login.

/var/log/mysql/mysqld.err contain now (additionally lines):
120421 14:26:36 [Warning] No argument was provided to --log-bin, and --log-bin-index was not used; so replication may break when this MySQL server acts as a master and has his hostname changed!! Please use '--log-bin=mysqld-bin' to avoid this problem.
120421 14:26:36  InnoDB: Initializing buffer pool, size = 16.0M
120421 14:26:36  InnoDB: Completed initialization of buffer pool
InnoDB: The first specified data file ./ibdata1 did not exist:
InnoDB: a new database to be created!
120421 14:26:36  InnoDB: Setting file ./ibdata1 size to 10 MB
InnoDB: Database physically writes the file full: wait...
120421 14:26:37  InnoDB: Log file ./ib_logfile0 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile0 size to 5 MB
InnoDB: Database physically writes the file full: wait...
120421 14:26:37  InnoDB: Log file ./ib_logfile1 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile1 size to 5 MB
InnoDB: Database physically writes the file full: wait...
InnoDB: Doublewrite buffer not found: creating new
InnoDB: Doublewrite buffer created
InnoDB: Creating foreign key constraint system tables
InnoDB: Foreign key constraint system tables created
120421 14:26:37  InnoDB: Started; log sequence number 0 0
120421 14:26:37 [Note] Recovering after a crash using mysqld-bin
120421 14:26:37 [Note] Starting crash recovery...
120421 14:26:37 [Note] Crash recovery finished.
120421 14:26:37 [Note] Event Scheduler: Loaded 0 events
120421 14:26:37 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.1.61-log'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  Gentoo Linux mysql-5.1.61

Stopping is also possible (more lines):
120421 14:32:05 [Note] /usr/sbin/mysqld: Normal shutdown

120421 14:32:05 [Note] Event Scheduler: Purging the queue. 0 events
120421 14:32:05  InnoDB: Starting shutdown...
120421 14:32:09  InnoDB: Shutdown completed; log sequence number 0 44233
120421 14:32:09 [Note] /usr/sbin/mysqld: Shutdown complete


Unfortunally the trick from http://dev.mysql.com/doc/refman/5.1/en/resetting-permissions.html does not work:
# mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.1.61-log Gentoo Linux mysql-5.1.61

Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> UPDATE mysql.user SET Password=PASSWORD('root') WHERE User='root';
Query OK, 0 rows affected (0.00 sec)
Rows matched: 0  Changed: 0  Warnings: 0

mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)

mysql> \q
Bye

i still cannot login after regular restart.
Comment 4 Thomas Beutin 2012-04-23 21:46:16 UTC
hm, after an almost sleepless night and reading a lot of stuff in the net i tried a microcode update using sys-kernel/amd-ucode. this leads to the following:

# dmesg | tail -9 
e1000e: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: Rx/Tx
NET: Registered protocol family 10
eth0: no IPv6 routers present
mysqld[17565] general protection ip:7fa7efb1b47b sp:7fa7eda8c210 error:0 in libgcc_s.so.1[7fa7efb0c000+15000]
microcode: CPU0: patch_level=0x05000026
microcode: CPU0: new patch_level=0x05000028
microcode: CPU1: patch_level=0x05000026
microcode: CPU1: new patch_level=0x05000028
microcode: Microcode Update Driver: v2.00 <tigran@aivazian.fsnet.co.uk>, Peter Oruba
silencio ~ # emerge --config =dev-db/mysql-5.1.61


Configuring pkg...

 * Please provide a password for the mysql 'root' user now, in the
 * MYSQL_ROOT_PASSWORD env var or through the /root/.my.cnf file.
 * Avoid ["'\_%] characters in the password
    >
 * Retype the password
    >
 * Creating the mysql database and setting proper
 * permissions on it ...
 * Starting mysqld ...                                                                                                                                                                   [ ok ]
 * Setting root password ...                                                                                                                                                            [ ok ]
 * Loading "zoneinfo", this step may require a few seconds ... ...                                                                                                                      [ ok ]
 * Stopping the server ...
 * Done

Now i can start mysql and login to the database :)
(i tried it again without the microcode patch after system startup and it failed like before)
Comment 5 Thomas Beutin 2012-04-23 21:59:21 UTC
btw: this is the same machine as the one in the bug #381061
maybe i'll find the time to check next weekend.
Comment 6 Brian Evans (RETIRED) gentoo-dev 2013-02-14 13:51:30 UTC
(In reply to comment #5)
> btw: this is the same machine as the one in the bug #381061
> maybe i'll find the time to check next weekend.

Has this been resolved?

With your other bug listed as connected to the compilation failure meta bug, I'm inclined to ask if it was your hardware or something not related to MySQL.
Comment 7 Thomas Beutin 2013-02-14 15:59:52 UTC
Yes, it seems that this problem is somewhat hardware related to the AMD E-350 Processor. After the microcode and BIOS update the whole system runs stable for months.

Thanks!