Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 383137

Summary: dev-db/mysql-5.1.[56-58] fails to restart with InnoDB Enabled
Product: Gentoo Linux Reporter: spresse1
Component: Current packagesAssignee: Gentoo Linux MySQL bugs team <mysql-bugs>
Status: RESOLVED NEEDINFO    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: x86   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description spresse1 2011-09-15 19:26:51 UTC
dev-db/mysql-5.1.[56-58] will fail to restart after the initial install if the InnoDB storage engine is enabled.   

Reproducible: Always

Steps to Reproduce:
1. Install dev-db/mysql-5.1.56 or .58 on a hardened x86 machine
2. Proceed through install process
3. /etc/init.d/mysql restart
Actual Results:  
MySQL fails to start and outputs the following in /var/log/mysqld.log:


110913 11:08:36  InnoDB: Initializing buffer pool, size = 16.0M
110913 11:08:36  InnoDB: Completed initialization of buffer pool
110913 11:08:36 - mysqld got signal 4 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
We will try our best to scrape up some info that will hopefully help diagnose
the problem, but since we have already crashed, something is definitely wrong
and this may fail.

key_buffer_size=16777216
read_buffer_size=262144
max_used_connections=0
max_threads=151
threads_connected=0
It is possible that mysqld could use up to 
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 133903 K
bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

Thread pointer: 0x0
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
stack_bottom = (nil) thread_stack 0x40000
/usr/sbin/mysqld(my_print_stacktrace+0x3c) [0x7f10b89328bc]
/usr/sbin/mysqld(handle_segfault+0x42d) [0x7f10b86634ed]
/lib64/libpthread.so.0(+0xf2f0) [0x7f10b7efc2f0]
/usr/sbin/mysqld(rec_copy_prefix_to_buf+0x35) [0x7f10b887c385]
/usr/sbin/mysqld(btr_pcur_store_position+0xc4) [0x7f10b88c3e14]
/usr/sbin/mysqld(dict_check_tablespaces_and_store_max_id+0x37f) [0x7f10b883056f]
/usr/sbin/mysqld(innobase_start_or_create_for_mysql+0x1201) [0x7f10b88a00c1]
/usr/sbin/mysqld(+0x4d4513) [0x7f10b87fd513]
/usr/sbin/mysqld(ha_initialize_handlerton(st_plugin_int*)+0x45) [0x7f10b8759705]
/usr/sbin/mysqld(+0x4b5576) [0x7f10b87de576]
/usr/sbin/mysqld(plugin_init(int*, char**, int)+0x6db) [0x7f10b87e08ab]
/usr/sbin/mysqld(+0x33ac8c) [0x7f10b8663c8c]
/usr/sbin/mysqld(main+0x1ce) [0x7f10b86664ce]
/lib64/libc.so.6(__libc_start_main+0xfd) [0x7f10b699fd5d]
/usr/sbin/mysqld(+0x252cc9) [0x7f10b857bcc9]
The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
information that should help you find out what is causing the crash.


Expected Results:  
mysql starts appropriately.

Running Kernel built with Genkernel


emerge --info:

Portage 2.1.10.11 (hardened/linux/amd64, gcc-4.4.5, glibc-2.12.2-r0, 2.6.39-hardened-r8 x86_64)
=================================================================
System uname: Linux-2.6.39-hardened-r8-x86_64-Intel-R-_Xeon-TM-_CPU_3.00GHz-with-gentoo-2.0.3
Timestamp of tree: Sun, 11 Sep 2011 04:45:01 +0000
app-shells/bash:          4.1_p9
dev-lang/python:          2.7.1-r1, 3.1.3-r1
dev-util/cmake:           2.8.4-r1
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.0.3
sys-apps/openrc:          0.8.3-r1
sys-apps/sandbox:         2.4
sys-devel/autoconf:       2.68
sys-devel/automake:       1.11.1
sys-devel/binutils:       2.21.1-r1
sys-devel/gcc:            4.4.5
sys-devel/gcc-config:     1.4.1-r1
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r1
sys-kernel/linux-headers: 2.6.36.1 (virtual/os-headers)
sys-libs/glibc:           2.12.2
Repositories: gentoo
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=k8"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /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 -march=k8"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles fixpackages news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="http://gentoo.chem.wisc.edu/gentoo/ ftp://mirror.datapipe.net/gentoo http://www.gtlib.gatech.edu/pub/gentoo http://mirrors.rit.edu/gentoo/"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync5.us.gentoo.org/gentoo-portage"
USE="acl amd64 berkdb bzip2 cli cracklib crypt cups cxx dri dvd gdbm gpm hardened iconv justify ldap mmx modules mudflap multilib mysql ncurses nls nptl nptlonly openldap openmp pam pax_kernel pcre perl pppd python readline session sse sse2 ssl sysfs tcpd urandom 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="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan 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 evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga neomagic nouveau nv r128 radeon savage sis tdfx trident vesa via vmware dummy v4l" 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, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 spresse1 2011-09-15 19:33:58 UTC
Workaround: in /etc/mysql/my.cnf, uncomment (aprox. line 94):

skip-innodb
Comment 2 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2012-02-02 02:40:36 UTC
If you explicitly compile without the hardened gcc, does the problem go away?
Comment 3 spresse1 2012-02-02 05:29:16 UTC
(In reply to comment #2)
> If you explicitly compile without the hardened gcc, does the problem go away?

I will do my best to check this tomorrow.  However, time and allowable server downtime may not permit such.  In any case, I'll report back as soon as I am able to test.
Comment 4 spresse1 2012-02-02 18:41:27 UTC
Yes, this compiles cleanly on a server with gcc-x86_64-pc-linux-gnu-4.5.3-vanilla.

Oddly enough recompiling it with the hardened version results in a MySQL that will start InnoDB (and reflects so in its logs), but which start-stop-daemon consistently fails to find the pid file for.
Comment 5 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2012-02-02 20:12:22 UTC
Which version of the init script package are you using?
And did you fully convert the conf.d formats for the new mysql init scripts?
Comment 6 spresse1 2012-02-02 22:41:17 UTC
(In reply to comment #5)
> Which version of the init script package are you using?
> And did you fully convert the conf.d formats for the new mysql init scripts?

I'm up to date in the init script (0.9.8.4).  As far as I know my conf.d files are up to date.  How would I know?
Comment 7 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2012-02-02 22:59:40 UTC
No, not openrc, the mysql-init-scripts package.
Comment 8 spresse1 2012-05-18 13:27:24 UTC
dev-db/mysql-init-scripts
      Latest version available: 2.0_pre1-r2
      Latest version installed: 2.0_pre1-r2

Sorry about the delay.
Comment 9 Jorge Manuel B. S. Vicetto (RETIRED) gentoo-dev 2013-06-26 20:03:21 UTC
(In reply to spresse1 from comment #8)
> dev-db/mysql-init-scripts
>       Latest version available: 2.0_pre1-r2
>       Latest version installed: 2.0_pre1-r2
> 
> Sorry about the delay.

Please test again with 2.0_pre1-r3.
Comment 10 Jorge Manuel B. S. Vicetto (RETIRED) gentoo-dev 2013-10-08 02:46:17 UTC
(In reply to Jorge Manuel B. S. Vicetto from comment #9)
> (In reply to spresse1 from comment #8)
> > dev-db/mysql-init-scripts
> >       Latest version available: 2.0_pre1-r2
> >       Latest version installed: 2.0_pre1-r2
> > 
> > Sorry about the delay.
> 
> Please test again with 2.0_pre1-r3.

Please reopen the bug if you can provide the requested feedback.