Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 306541 - dev-db/mysql 5.1.44 with max-idx-128 crash on startup
Summary: dev-db/mysql 5.1.44 with max-idx-128 crash on startup
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Linux MySQL bugs team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-02-23 17:12 UTC by Thomas Phipps
Modified: 2010-03-24 03:42 UTC (History)
4 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Phipps 2010-02-23 17:12:44 UTC
while trying the new mysql unstable with max-idx-128 in the use settings. trying to start mysql results in the application unable to start 
here is the full output in the mysqld.err log 

100223  8:23:40 [Note] Plugin 'FEDERATED' is disabled.
100223  8:23:40  InnoDB: Started; log sequence number 0 340150
100223  8:23:40 - mysqld got signal 11 ;
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=4194304
max_used_connections=0
max_threads=50
threads_connected=0
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 426301 K
bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

thd: 0x8aa4b20
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 = 0xbfd7c338 thread_stack 0x30000
/usr/sbin/mysqld(my_print_stacktrace+0x22) [0x8477972]
/usr/sbin/mysqld(handle_segfault+0x3d9) [0x81d8579]
[0xb77df400]
/usr/sbin/mysqld(tablename_to_filename(char const*, char*, unsigned int)+0x28) [0x82c8468]
/usr/sbin/mysqld(build_table_filename(char*, unsigned int, char const*, char const*, char const*, unsigned int)+0xea) [0x82c85ba]
/usr/sbin/mysqld(Table_triggers_list::check_n_load(THD*, char const*, char const*, st_table*, bool)+0x4a) [0x832a2ca]
/usr/sbin/mysqld [0x821fea3]
/usr/sbin/mysqld(open_table(THD*, TABLE_LIST*, st_mem_root*, bool*, unsigned int)+0x73c) [0x822103c]
/usr/sbin/mysqld(open_tables(THD*, TABLE_LIST**, unsigned int*, unsigned int)+0x560) [0x8221bb0]
/usr/sbin/mysqld(open_and_lock_tables_derived(THD*, TABLE_LIST*, bool)+0x6b) [0x8221dcb]
/usr/sbin/mysqld(acl_reload(THD*)+0x101) [0x8281df1]
/usr/sbin/mysqld(acl_init(bool)+0xcc) [0x82830ac]
/usr/sbin/mysqld(main+0x424) [0x81db444]
/lib/libc.so.6(__libc_start_main+0xe5) [0xb7504a65]
/usr/sbin/mysqld [0x8127691]
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort...
thd->query at (nil) is an invalid pointer
thd->thread_id=0
thd->killed=NOT_KILLED
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.

Reproducible: Always

Steps to Reproduce:
1. compile mysql 5.1.44 with max-idx-128
2. try to run /etc/init.d/mysql restart
3. watch it crash

Actual Results:  
the software goes through a segfaul 11 instead of starting. 

Expected Results:  
the mysql starts as normal. 

Portage 2.1.7.16 (default/linux/x86/10.0/desktop, gcc-4.3.4, glibc-2.10.1-r1, 2.6.31-gentoo-r6 i686)
=================================================================
System uname: Linux-2.6.31-gentoo-r6-i686-Intel-R-_Pentium-R-_Dual_CPU_E2180_@_2.00GHz-with-gentoo-1.12.13
Timestamp of tree: Tue, 23 Feb 2010 15:00:01 +0000
app-shells/bash:     4.0_p35
dev-java/java-config: 2.1.10
dev-lang/python:     2.6.4
dev-python/pycrypto: 2.1.0_beta1
dev-util/cmake:      2.6.4-r3
sys-apps/baselayout: 1.12.13
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.63-r1
sys-devel/automake:  1.8.5-r3, 1.9.6-r2, 1.10.3, 1.11.1
sys-devel/binutils:  2.18-r3
sys-devel/gcc:       4.3.4
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6b
virtual/os-headers:  2.6.30-r1
ACCEPT_KEYWORDS="x86"
ACCEPT_LICENSE="* -@EULA dlj-1.1"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=i686 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/eselect/postgresql /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2 -march=i686 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests distlocks fixpackages news parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LDFLAGS="-Wl,-O1"
MAKEOPTS="-j3"
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="/usr/local/portage-overlay"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="7zip a52 aac acl acpi apache2 ares audit bash-completion berkdb branding bzip2 cdr cgi cli consolekit cracklib crypt cscope curl cxx dbus dri dts dvd dvdr eds emboss encode evo exif expat fam firefox flac fortran gdbm geoip gif gmp gnutls gpm gstreamer hal iconv icu ip28 ip32r10k ipv6 java jpeg kolab ldap libffi libnotify libssh2 libwww lm_sensors lzma lzo mad mikmod mng modules mp3 mp4 mpeg mudflap mysql ncurses nptl nptlonly objc objc++ objc-gc offensive ogg openmp pam pcre pdf perl pg-intdatetime php png ppds pppd profile python qt3support quicktime readline reflection rrdtool ruby sendmail session slang spell spl sqlite sqlite3 sse2 ssl startup-notification suexec svg sysfs tcpd threads thunar tiff tools trace truetype unicode usb uuid vim-pager vim-syntax vorbis win32codecs x264 x86 xattr xinetd xml xorg xulrunner xv xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 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 auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias log_forensic version" APACHE2_MPMS="worker" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga neomagic nv r128 radeon savage sis tdfx trident vesa via vmware voodoo" 
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Rick George 2010-02-25 13:39:27 UTC
I saw this exact same behavior on AMD64 when I tried to use this version of mysql, so the scope of problem is wider than just x86.
Comment 2 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2010-02-26 23:27:10 UTC
Why are you using max-idx-128?

If you move your databases out the way, and run the "emerge --config dev-db/mysql" does it start up after that?
Comment 3 Martin Korous 2010-03-01 10:10:22 UTC
I have same problem.
If i have remove dir /var/lib/mysql than "emerge --config dev-db/mysql" has failed:

ERROR: dev-db/mysql-5.1.44 failed:
 *   Failed to run mysql_install_db. Please review /var/log/mysql/mysqld.err AND /var/tmp/portage/dev-db/mysql-5.1.44/temp/mysql_install_db.log

in mysqld.err is:
ERROR: 1146  Table 'mysql.tmp_db' doesn't exist
100301 10:27:53 [ERROR] Aborting
100301 10:27:53 [Note] /usr/sbin/mysqld: Shutdown complete

in mysql_install_db.log:
Installation of system tables failed!  Examine the logs in
/var/lib/mysql for more information.

No logs are in /var/lib/mysql, databases test and mysql seems well, there are *.frm *.MYI and *.MYD files, but start of mysql is crashing with same error as above.
/usr/sbin/mysqld --skip-grant doesnt work too.

I have reproduce this on source code from upstream without gentoo patches with similiar configure command as portage using:

./configure  '--prefix=/usr/local/mysql51' '--build=x86_64-pc-linux-gnu' '--host=x86_64-pc-linux-gnu' '--sysconfdir=/etc' '--sysconfdir=/etc/mysql' '--with-low-memory' '--with-client-ldflags=-lstdc++' '--enable-thread-safe-client' '--with-comment=Gentoo Linux mysql-5.1.44' '--without-docs' '--with-big-tables' '--enable-local-infile' '--with-extra-charsets=all' '--with-mysqld-user=mysql' '--with-server' '--with-unix-socket-path=/var/run/mysqld/mysqld.sock' '--without-libwrap' '--enable-shared' '--enable-static' '--without-debug' '--with-charset=utf8' '--with-collation=utf8_general_ci' '--without-embedded-privilege-control' '--without-embedded-server' '--with-ssl' '--enable-assembler' '--with-geometry' '--with-readline' '--with-zlib-dir=/usr/' '--without-pstack' '--with-max-indexes=128' '--with-plugins=csv,myisam,myisammrg,heap,archive,blackhole,federated,partition,innobase,innodb_plugin' 'build_alias=x86_64-pc-linux-gnu' 'host_alias=x86_64-pc-linux-gnu' 'CFLAGS=-mtune=nocona -O2 -pipe -fomit-frame-pointer -DHAVE_ERRNO_AS_DEFINE=1 -fno-strict-aliasing' 'LDFLAGS=-Wl,-O1' 'CPPFLAGS=' 'CXXFLAGS=-mtune=nocona -O2 -pipe -fomit-frame-pointer -DHAVE_ERRNO_AS_DEFINE=1 -fno-exceptions -fno-strict-aliasing -felide-constructors -fno-rtti -fno-implicit-templates -fno-strict-aliasing'

Without "--with-max-indexes=128" mysql works, but if I compiled mysql only with "-with-max-indexes=128" and without other options, cant reproduce.
Comment 4 Thomas Phipps 2010-03-01 17:15:26 UTC
(In reply to comment #2)
> Why are you using max-idx-128?
> 
> If you move your databases out the way, and run the "emerge --config
> dev-db/mysql" does it start up after that?
> 
 
honestly usage amounts to testing. no practical use here.  

as for moving the mysql directory out of the way and running config, it also failed. 
see Martin Korous's reply for error. 
Comment 5 Stan Sander 2010-03-05 02:35:15 UTC
Same issue here.  Renaming /var/lib/mysql and running the emerge --config as asked in comment #2 still results in the same segfault and crash.  emerging without the max-idx-128 use flag results in a working install.  I'm running ~amd64 no multilib here.  
Comment 6 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2010-03-24 03:42:26 UTC
What testing are you doing that needs max-idx-128?

You're going to need to fire up GDB and produce a backtrace, possibly take it upstream too.

Please reopen with backtrace.