After updating today to mariadb 10 and runned mysql_upgrade check and optimize table does not longer work mysqlcheck: Got error: 2013: Lost connection to MySQL server during query when executing 'CHECK TABLE ... ' Reproducible: Always Steps to Reproduce: 1. Install dev-db/mariadb-10.0.12 2. run mysql_upgrade 3. run eighter mysqlcheck -u root -p --auto-repair --check --all-databases || mysqlcheck -u root -p --auto-repair --optimize --all-databases Actual Results: Enter password: levi.raoqb_allvideoshare_adverts OK levi.raoqb_allvideoshare_categories OK levi.raoqb_allvideoshare_config OK levi.raoqb_allvideoshare_licensing OK levi.raoqb_allvideoshare_players OK levi.raoqb_allvideoshare_videos OK levi.raoqb_assets OK levi.raoqb_associations OK levi.raoqb_banner_clients OK levi.raoqb_banner_tracks OK levi.raoqb_banners OK levi.raoqb_categories OK mysqlcheck: Got error: 2013: Lost connection to MySQL server during query when executing 'CHECK TABLE ... ' Portage 2.2.10 (default/linux/amd64/13.0/desktop/gnome/systemd, gcc-4.9.0, glibc-2.19-r1, 3.15.6-aufs-costel x86_64) ================================================================= System Settings ================================================================= System uname: Linux-3.15.6-aufs-costel-x86_64-AMD_Athlon-tm-_5350_APU_with_Radeon-tm-_R3-with-gentoo-2.2 KiB Mem: 7614580 total, 5558720 free KiB Swap: 0 total, 0 free Timestamp of tree: Wed, 30 Jul 2014 11:30:01 +0000 ld GNU ld (Gentoo 2.24 p1.4) 2.24 app-shells/bash: 4.2_p47 dev-java/java-config: 2.2.0 dev-lang/python: 2.7.8, 3.4.1 dev-util/cmake: 2.8.12.2-r1 dev-util/pkgconfig: 0.28-r2 sys-apps/baselayout: 2.2 sys-apps/openrc: 0.12.4 sys-apps/sandbox: 2.6-r1 sys-devel/autoconf: 2.13, 2.69 sys-devel/automake: 1.11.6, 1.14.1 sys-devel/binutils: 2.24-r3 sys-devel/gcc: 4.9.0 sys-devel/gcc-config: 1.8 sys-devel/libtool: 2.4.2-r1 sys-devel/make: 4.0-r1 sys-kernel/linux-headers: 3.15 (virtual/os-headers) sys-libs/glibc: 2.19-r1 Repositories: gentoo added ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="*" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -pipe -march=native -w" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /var/lib/hsqldb" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.5/ext-active/ /etc/php/cgi-php5.5/ext-active/ /etc/php/cli-php5.5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" CXXFLAGS="-O2 -pipe -march=native -w" DISTDIR="/mnt/date/linux/distfiles" EMERGE_DEFAULT_OPTS="--jobs=3 --load-average=6 --keep-going --with-bdeps=y --complete-graph --quiet-build=n --autounmask-write" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-logs candy cgroup collision-protect config-protect-if-modified distlocks fail-clean fixlafiles ipc-sandbox merge-sync news nodoc noinfo parallel-fetch parallel-install preserve-libs protect-owned sandbox sfperms strict unknown-features-filter unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="http://ftp.romnet.org/gentoo/ http://mirrors.xservers.ro/gentoo/ ftp://ftp.romnet.org/gentoo/ http://ftp.roedu.net/pub/mirrors/gentoo.org/ http://distfiles.gentoo.org/" LANG="ro_RO.UTF-8" LC_ALL="ro_RO.UTF-8" LDFLAGS="-Wl,-O1,--sort-common,--hash-style=gnu,--as-needed,-z,now" MAKEOPTS="-j4 --load-average=6" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_EXTRA_OPTS="--human-readable --progress" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-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/portage/local/added" USE="X a52 aac acl acpi alsa amd64 avx berkdb branding bzip2 cairo cdda cdr cli colord cracklib crypt cups cxx dbus dri dts dvd dvdr eds emboss encode evo exif fam ffmpeg firefox flac gdbm gif gmp gnome gnome-keyring gnome-online-accounts gpm gstreamer gtk gtk3 iconv introspection ipv6 ithreads jpeg lcms ldap libnotify libsecret logrotate mad mmx mng modules mp3 mp4 mpeg multilib mysql nautilus ncurses networkmanager nls nptl ogg opengl openmp opus pam pango pch pcre pdf png policykit postgres ppds pulseaudio python qt3support qt4 readline sdl session socialweb spell sse sse2 sse4_1 sse4_2 ssl ssse3 startup-notification svg systemd tcpd theora threads tiff truetype udev udisks unicode upower usb vaapi vhosts vorbis wxwidgets x264 xcb xml xv xvid zlib" ABI_X86="64" ALSA_CARDS="virtuoso hda-intel" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd 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 sheets stage tables krita karbon braindump author" 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 ublox ubx" GRUB_PLATFORMS="efi-64 pc" INPUT_DEVICES="evdev keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="ro en" NETBEANS_MODULES="php" NGINX_MODULES_HTTP="access auth_basic autoindex browser charset empty_gif fastcgi geo gzip limit_conn limit_req map memcached proxy referer rewrite scgi split_clients spdy ssi upstream_ip_hash userid uwsgi" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby21" USERLAND="GNU" VIDEO_CARDS="fglrx radeon" 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" USE_PYTHON="2.7 3.4" Unset: CPPFLAGS, CTARGET, INSTALL_MASK, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, SYNC ================================================================= Package Settings ================================================================= dev-db/mariadb-10.0.12 was built with the following: USE="community pam perl ssl -bindist -cluster -debug -embedded -extraengine -jemalloc -latin1 -max-idx-128 -minimal -odbc -oqgraph -profiling (-selinux) -sphinx -static -static-libs -systemtap -tcmalloc -test -tokudb -xml" ABI_X86="64" CFLAGS="-O2 -pipe -march=native -w -fno-strict-aliasing" CXXFLAGS="-O2 -pipe -march=native -w -fno-strict-aliasing -felide-constructors -fno-strict-aliasing" mini costel # mysql_upgrade -p Enter password: Phase 1/3: Fixing table and database names Phase 2/3: Checking and upgrading tables Processing databases information_schema levi levi.raoqb_allvideoshare_adverts OK levi.raoqb_allvideoshare_categories OK levi.raoqb_allvideoshare_config OK levi.raoqb_allvideoshare_licensing OK levi.raoqb_allvideoshare_players OK levi.raoqb_allvideoshare_videos OK levi.raoqb_assets OK levi.raoqb_associations OK levi.raoqb_banner_clients OK levi.raoqb_banner_tracks OK levi.raoqb_banners OK levi.raoqb_categories OK levi.raoqb_contact_details OK levi.raoqb_content OK levi.raoqb_content_frontpage OK levi.raoqb_content_rating OK levi.raoqb_content_types OK levi.raoqb_contentitem_tag_map OK levi.raoqb_core_log_searches OK levi.raoqb_eventgallery_cart OK levi.raoqb_eventgallery_comment OK levi.raoqb_eventgallery_file OK levi.raoqb_eventgallery_folder OK levi.raoqb_eventgallery_imagelineitem OK levi.raoqb_eventgallery_imagetype OK levi.raoqb_eventgallery_imagetypeset OK levi.raoqb_eventgallery_imagetypeset_imagetype_assignment OK levi.raoqb_eventgallery_order OK levi.raoqb_eventgallery_orderstatus OK levi.raoqb_eventgallery_paymentmethod OK levi.raoqb_eventgallery_sequence OK levi.raoqb_eventgallery_servicelineitem OK levi.raoqb_eventgallery_shippingmethod OK levi.raoqb_eventgallery_staticaddress OK levi.raoqb_eventgallery_surcharge OK levi.raoqb_eventgallery_useraddress OK levi.raoqb_eventgallery_watermark OK levi.raoqb_extensions OK levi.raoqb_finder_filters OK levi.raoqb_finder_links OK levi.raoqb_finder_links_terms0 OK levi.raoqb_finder_links_terms1 OK levi.raoqb_finder_links_terms2 OK levi.raoqb_finder_links_terms3 OK levi.raoqb_finder_links_terms4 OK levi.raoqb_finder_links_terms5 OK levi.raoqb_finder_links_terms6 OK levi.raoqb_finder_links_terms7 OK levi.raoqb_finder_links_terms8 OK levi.raoqb_finder_links_terms9 OK levi.raoqb_finder_links_termsa OK levi.raoqb_finder_links_termsb OK levi.raoqb_finder_links_termsc OK levi.raoqb_finder_links_termsd OK levi.raoqb_finder_links_termse OK levi.raoqb_finder_links_termsf OK levi.raoqb_finder_taxonomy OK levi.raoqb_finder_taxonomy_map OK levi.raoqb_finder_terms OK levi.raoqb_finder_terms_common OK levi.raoqb_finder_tokens OK levi.raoqb_finder_tokens_aggregate OK levi.raoqb_finder_types OK levi.raoqb_languages OK levi.raoqb_menu OK levi.raoqb_menu_types OK levi.raoqb_messages OK levi.raoqb_messages_cfg OK levi.raoqb_modules OK levi.raoqb_modules_menu OK levi.raoqb_newsfeeds OK levi.raoqb_overrider OK levi.raoqb_postinstall_messages OK levi.raoqb_redirect_links OK levi.raoqb_schemas OK levi.raoqb_session OK levi.raoqb_tags OK levi.raoqb_template_styles OK levi.raoqb_ucm_base OK levi.raoqb_ucm_content OK levi.raoqb_ucm_history OK levi.raoqb_update_sites OK levi.raoqb_update_sites_extensions OK levi.raoqb_updates OK levi.raoqb_user_keys OK levi.raoqb_user_notes OK levi.raoqb_user_profiles OK levi.raoqb_user_usergroup_map OK levi.raoqb_usergroups OK levi.raoqb_users OK levi.raoqb_viewlevels OK levi.raoqb_weblinks OK mysql mysql.columns_priv OK mysql.db OK mysql.event OK mysql.func OK mysql.help_category OK mysql.help_keyword OK mysql.help_relation OK mysql.help_topic OK mysql.host OK mysql.ndb_binlog_index OK mysql.plugin OK mysql.proc OK mysql.procs_priv OK mysql.proxies_priv OK mysql.servers OK mysql.tables_priv OK mysql.time_zone OK mysql.time_zone_leap_second OK mysql.time_zone_name OK mysql.time_zone_transition OK mysql.time_zone_transition_type OK mysql.user OK performance_schema Phase 3/3: Running 'mysql_fix_privilege_tables'... OK It does not happed with 5.5.38-r1. Syntax or man page didn't change afaik.
I want to mention: This is happening on default config. Increasing wait_timeout and connect_timeout ten times (288000) does not help. The error also occured on large databases restore. With or without altering max_allowed_packet value in my.cnf And it's also reproductible on different machine - it does not look like a simple my.cnf missconfiguration. /var/lib/mysql is on SSD and, as emerge --info says, there are plenty of RAM available.
The culprit is sys-devel/gcc-4.9.0. I belive it generate wrong code. I tested with gcc-4.8.1 to 4.8.3 and no problem. I changed the bug title according.
This issue may actually be https://bugzilla.redhat.com/show_bug.cgi?id=1094975 - does Gentoo include that patch to GCC?
Mariadb works fine when compiled with: gcc (Gentoo 4.8.3 p1.1, pie-0.5.9) 4.8.3 Copyright (C) 2013 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. But fails in this way with: gcc-4.9.0 (Gentoo 4.9.0 p1.0, pie-0.6.0) 4.9.0 Copyright (C) 2014 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Here's the error information logged in /var/log/mysqld.error when compiled with the aforementioned version of GCC: To report this bug, see http://kb.askmonty.org/en/reporting-bugs 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. Server version: 10.0.12-MariaDB key_buffer_size=16777216 read_buffer_size=262144 max_used_connections=0 max_threads=153 thread_count=0 It is possible that mysqld could use up to key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 137032 K bytes of memory Hope that's ok; if not, decrease some variables in the equation. Thread pointer: 0x0x0 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 = 0x0 thread_stack 0x48000 /usr/sbin/mysqld(my_print_stacktrace+0x3c)[0xb0982c] /usr/sbin/mysqld(handle_fatal_signal+0x3a0)[0x6d9760] /lib64/libpthread.so.0(+0xfd20)[0x7fc661c4bd20] /usr/sbin/mysqld[0x9b1a9c] /usr/sbin/mysqld[0x9b2a35] /usr/sbin/mysqld[0x92f959] /usr/sbin/mysqld[0x886255] /usr/sbin/mysqld(_Z24ha_initialize_handlertonP13st_plugin_int+0x57)[0x6db9e7] /usr/sbin/mysqld[0x5adc76] /usr/sbin/mysqld(_Z11plugin_initPiPPci+0x4b8)[0x5ae878] /usr/sbin/mysqld[0x527700] /usr/sbin/mysqld(_Z11mysqld_mainiPPc+0x474)[0x52b824] /lib64/libc.so.6(__libc_start_main+0xf0)[0x7fc66083e010] /usr/sbin/mysqld[0x5213b5] 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.
If this is the same as https://bugzilla.redhat.com/show_bug.cgi?id=1094975 I believe it will be fixed by 4.9.1.
It still crash sometimes. Not as often as before, once or two per day, so there is still a problem. Compiled it with gcc-4.8.3 and I'll test it for ~ 24 hours to see if it's still gcc-4.9* problem or is something wrong at my end.
After two days, there are no problems with gcc-4.8.3.
Solved in 10.0.13. http://bazaar.launchpad.net/~maria-captains/maria/10.0/revision/4314
should be fixed with gcc-4.9.2. please re-open if it isn't.