Date: Sat, 22 Feb 2003 10:28:06 +0100 (CET) From: Martin Blapp <mb@imp.ch> To: freebsd-bugs@FreeBSD.org Cc: HiTech Creations Support <htsupp@hitechcreations.com> Subject: Re: kern/39878: mysqld process suddenly runs at 99% CPU without load, and a restart of mysqld is required. Message-ID: <20030222102442.A55282@levais.imp.ch>
next in thread | raw e-mail | index | archive | help
Hi,
We had this problem too. There are several problems causing
this. Some of them are libc_r bugs and some parts of FreeBSD
aren't even threadsafe (gethostbyname, realpath) ...
You can solve all these problems with:
make WITH_LINUXTHREADS=YES
and use this patch for mysql:
--- sql/violite.c.orig Fri Feb 21 17:02:16 2003
+++ sql/violite.c Fri Feb 21 17:03:38 2003
@@ -110,6 +110,9 @@
vio->sd);
#if !defined(___WIN__) && !defined(__EMX__) && !defined(OS2)
#if !defined(NO_FCNTL_NONBLOCK)
+#if defined(__FreeBSD__)
+ fcntl(sd, F_SETFL, vio->fcntl_mode); /* Yahoo! FreeBSD patch */
+#endif
vio->fcntl_mode = fcntl(sd, F_GETFL);
#elif defined(HAVE_SYS_IOCTL_H) /* hpux */
/* Non blocking sockets doesn't work good on HPUX 11.0 */
--- libmysql/violite.c.orig Fri Feb 21 17:02:31 2003
+++ libmysql/violite.c Fri Feb 21 17:04:09 2003
@@ -110,6 +110,9 @@
vio->sd);
#if !defined(___WIN__) && !defined(__EMX__) && !defined(OS2)
#if !defined(NO_FCNTL_NONBLOCK)
+#if defined(__FreeBSD__)
+ fcntl(sd, F_SETFL, vio->fcntl_mode); /* Yahoo! FreeBSD patch */
+#endif
vio->fcntl_mode = fcntl(sd, F_GETFL);
#elif defined(HAVE_SYS_IOCTL_H) /* hpux */
/* Non blocking sockets doesn't work good on HPUX 11.0 */
Martin Blapp, <mb@imp.ch> <mbr@FreeBSD.org>
------------------------------------------------------------------
ImproWare AG, UNIXSP & ISP, Zurlindenstrasse 29, 4133 Pratteln, CH
Phone: +41 61 826 93 00 Fax: +41 61 826 93 01
PGP: <finger -l mbr@freebsd.org>
PGP Fingerprint: B434 53FC C87C FE7B 0A18 B84C 8686 EF22 D300 551E
------------------------------------------------------------------
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030222102442.A55282>
