From owner-freebsd-bugs Sat Feb 22 1:25:27 2003 Delivered-To: freebsd-bugs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 235F637B40B for ; Sat, 22 Feb 2003 01:25:25 -0800 (PST) Received: from mail.imp.ch (mail.imp.ch [157.161.1.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id E364B43FE3 for ; Sat, 22 Feb 2003 01:25:23 -0800 (PST) (envelope-from mb@imp.ch) Received: from levais.imp.ch (levais.imp.ch [157.161.4.66]) by mail.imp.ch (8.12.6/8.12.3) with ESMTP id h1M9PLXN093081; Sat, 22 Feb 2003 10:25:21 +0100 (CET) (envelope-from Martin.Blapp@imp.ch) Date: Sat, 22 Feb 2003 10:28:06 +0100 (CET) From: Martin Blapp To: freebsd-bugs@FreeBSD.org Cc: HiTech Creations Support 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> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org 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, ------------------------------------------------------------------ ImproWare AG, UNIXSP & ISP, Zurlindenstrasse 29, 4133 Pratteln, CH Phone: +41 61 826 93 00 Fax: +41 61 826 93 01 PGP: 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