Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 164781 - dev-db/mysql-5.0.32 - server hangs with 99% CPU usage while client is disconnecting
Summary: dev-db/mysql-5.0.32 - server hangs with 99% CPU usage while client is disconn...
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Gentoo Linux MySQL bugs team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-02-01 05:31 UTC by bbkr
Modified: 2007-04-15 13:10 UTC (History)
0 users

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


Attachments
MySQL server error log after process goes to 99% (mysqld.err,3.50 KB, text/plain)
2007-02-01 05:34 UTC, bbkr
Details

Note You need to log in before you can comment on or make changes to this bug.
Description bbkr 2007-02-01 05:31:49 UTC
CPU usage goes to 99% when some client is disconnecting, only stopping server helps. i removed all old tables before installation, also everything from /etc/mysql. happens on all 5.0.x versions available currently in portage and on all types of clients (mysql console, perl DBD::mysql, etc)

Reproducible: Always

Steps to Reproduce:
1. install MySQL-5.0.32 database
2. run 'emerge --config =dev-db/mysql-5.0.32'
3. run 'mysql' to enter the console
4. type \q to quit console



bbkr ~ # emerge --info
Portage 2.1.2-r4 (default-linux/amd64/2006.1/desktop, gcc-3.4.6, glibc-2.4-r3, 2.6.19-gentoo-r1 x86_64)
=================================================================
System uname: 2.6.19-gentoo-r1 x86_64 AMD Athlon(tm) 64 Processor 3000+
Gentoo Base System version 1.12.1
Timestamp of tree: Thu, 01 Feb 2007 02:30:01 +0000
dev-java/java-config: 2.0.30
dev-lang/python:     2.3.5, 2.4.2-r1
dev-python/pycrypto: 2.0.1-r5
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1, 1.10
sys-devel/binutils:  2.17
sys-devel/gcc-config: 1.3.14
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r3
ACCEPT_KEYWORDS="amd64 ~amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=athlon64 -Os -pipe -msse3"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c"
CXXFLAGS="-march=athlon64 -Os -pipe -msse3"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
MAKEOPTS="-j1"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/portage/local/layman/sunrise /usr/portage-overlay"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac acpi alsa amd64 amuled apache2 audiofile avi berkdb bindist bzip2 bzlib cairo cdr cli cracklib crypt cups dba dbus dedicated divx4linux dlloader dri dv dvb dvd dvdr dvdread eds emboss encode examples fam ffmpeg firefox flac ftp gd gdbm gif gphoto2 gpm gstreamer gtk2 hal iconv isdnlog ithreads jpeg jpeg2k kde ldap libg++ lm_sensors logitech-mouse mad midi mikmod mime mp3 mpeg music musicbrainz mysql ncurses nls nptl nptlonly nvidia ogg opengl pam pcre perl php png postgres ppds pppd qt qt3 qt4 quicktime readline reflection ruby sasl sdl session spell spl ssl tcpd threads tiff truetype truetype-fonts type1-fonts udev unicode userlocales v4l vdr vorbis xml xorg xv xvid zlib" ALSA_CARDS="emu10k1" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="mouse keyboard evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="nvidia v4l dri"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_RSYNC_EXTRA_OPTS


#####################################################################


bbkr ~ # emerge dev-db/mysql -epvt
These are the packages that would be merged, in reverse order:
Calculating dependencies... done!
[ebuild   R   ] perl-core/Test-Harness-2.64  0 kB
[ebuild   R   ] app-admin/perl-cleaner-1.04.3  0 kB
[ebuild   R   ] perl-core/PodParser-1.35  0 kB
[ebuild   R   ] app-misc/ca-certificates-20050804  0 kB
[ebuild   R   ] dev-perl/DBD-mysql-4.00  0 kB
[ebuild  N    ]  virtual/mysql-5.0  0 kB
[ebuild   R   ]   dev-db/mysql-5.0.34_alpha20070101-r61  USE="berkdb perl ssl -big-tables -cluster -debug -embedded -extraengine -latin1 -max-idx-128 -minimal (-selinux) -static" 0 kB
[ebuild   R   ]    sys-libs/readline-5.2_p1  0 kB
[ebuild   R   ]     app-shells/bash-3.2_p9-r1  USE="nls (-afs) -bashlogger -vanilla" 0 kB
[ebuild   R   ]    sys-apps/sed-4.1.5  USE="nls -static" 0 kB
[ebuild   R   ]    dev-libs/openssl-0.9.8d  USE="bindist (sse2) zlib -emacs -test" 0 kB
[ebuild   R   ]     sys-apps/diffutils-2.8.7-r1  USE="nls -static" 0 kB
[ebuild   R   ]    sys-apps/ed-0.4  0 kB
[ebuild   R   ]    sys-devel/libtool-1.5.22  0 kB
[ebuild   R   ]     sys-devel/automake-1.10  0 kB
[ebuild   R   ]      sys-devel/autoconf-2.61  USE="-emacs" 0 kB
[ebuild   R   ]       sys-apps/texinfo-4.8-r5  USE="nls -build -static" 0 kB
[ebuild   R   ]       sys-devel/m4-1.4.8  USE="nls" 0 kB
[ebuild   R   ]       sys-devel/autoconf-wrapper-4-r3  0 kB
[ebuild   R   ]      sys-devel/automake-wrapper-3-r1  0 kB
[ebuild   R   ]      sys-apps/help2man-1.36.4  USE="nls" 0 kB
[ebuild   R   ]       dev-perl/Locale-gettext-1.05  0 kB
[ebuild   R   ]    sys-process/procps-3.2.7  USE="(-n32)" 0 kB
[ebuild   R   ]    sys-libs/zlib-1.2.3-r1  USE="-build" 0 kB
[ebuild   R   ]    dev-db/mysql-init-scripts-1.1  0 kB
[ebuild   R   ]  dev-perl/DBI-1.53  0 kB
[ebuild   R   ]   dev-perl/PlRPC-0.2018  0 kB
[ebuild   R   ]    virtual/perl-Storable-2.15  0 kB
[ebuild   R   ]    dev-perl/Net-Daemon-0.39  0 kB
[ebuild   R   ]   virtual/perl-Sys-Syslog-0.18  0 kB
[ebuild   R   ]    perl-core/Sys-Syslog-0.18  0 kB
[ebuild   R   ]     dev-lang/perl-5.8.8-r2  USE="berkdb gdbm ithreads -build -debug -doc -perlsuid" 0 kB
[ebuild   R   ]      sys-devel/libperl-5.8.8-r1  USE="berkdb gdbm ithreads -debug" 0 kB
[ebuild   R   ]       sys-libs/gdbm-1.8.3-r2  USE="berkdb" 0 kB
[ebuild   R   ]        sys-libs/db-4.3.29-r2  USE="-bootstrap -doc -java -nocxx -tcl -test" 0 kB
[ebuild   R   ]         sys-devel/binutils-2.17  USE="nls -multislot (-multitarget) -test -vanilla" 0 kB
[ebuild   R   ]          sys-devel/binutils-config-1.9-r3  0 kB
[ebuild   R   ]           sys-apps/findutils-4.3.2  USE="nls (-selinux) -static" 0 kB
[ebuild   R   ]            virtual/libintl-0  0 kB
[ebuild   R   ]            sys-devel/gettext-0.16.1  USE="nls -doc -emacs -nocxx" 0 kB
[ebuild   R   ]             virtual/libiconv-0  0 kB
[ebuild   R   ]             dev-libs/expat-2.0.0  0 kB
[ebuild   R   ]          sys-devel/gnuconfig-20060702  0 kB
[ebuild   R   ] sys-libs/ncurses-5.6  USE="gpm unicode -bootstrap -build -debug -doc -minimal -nocxx -trace" 0 kB
[ebuild   R   ]  sys-libs/gpm-1.20.1-r5  USE="(-selinux)" 0 kB
Total: 45 packages (1 new, 44 reinstalls), Size of downloads: 0 kB

#####################################################################

(some info captured from second console while 99% of CPU was sed by mysqld process)

mysql> show processlist;
+----+------+-----------+------+---------+------+-------+------------------+
| Id | User | Host      | db   | Command | Time | State | Info             |
+----+------+-----------+------+---------+------+-------+------------------+
|  2 | root | localhost | NULL | Query   |    0 | NULL  | show processlist |
+----+------+-----------+------+---------+------+-------+------------------+
1 row in set (0.00 sec)
Comment 1 bbkr 2007-02-01 05:34:00 UTC
Created attachment 108812 [details]
MySQL server error log after process goes to 99%
Comment 2 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2007-04-01 23:42:34 UTC
I cannot reproduce. Could you please build mysql with debugging, and then when it goes into the loop, kill it such that you get a backtrace?
Comment 3 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2007-04-15 13:10:50 UTC
no response from user.
if persists on 5.0.38, please reopen.