Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 22 Feb 2003 11:56:54 -0500
From:      "Simon" <simon@optinet.com>
To:        "Martin Blapp" <mb@imp.ch>
Cc:        "freebsd-bugs@FreeBSD.org" <freebsd-bugs@FreeBSD.org>, "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:  <20030222165740.92AF243FBD@mx1.FreeBSD.org>
In-Reply-To: <20030222175014.P59307@levais.imp.ch>

next in thread | previous in thread | raw e-mail | index | archive | help

So building with "WITH_LINUXTHREADS=yes" is perfectly safe in 4.7-R and later?

PS: i'm not sure what you mean by *now*, thus the question.

-Simon

On Sat, 22 Feb 2003 17:56:41 +0100 (CET), Martin Blapp wrote:

>
>Hi,
>
>>         @${ECHO} "      WITH_LINUXTHREADS=yes   Use the linuxthreads pthread library."
>>         @${ECHO} "                              This is _NOT_ recommended for production"
>>         @${ECHO} "                              servers. Expect problems when enabled."
>
>I know that. It was true until now.
>
>>
>> what is the patch below for?
>
>Mysql did not kill it's threads when using WITH_LINUXTHREADS=yes. So
>you were running out of processes and fd's after some time.
>
>Quoting Rick Reed from Yahoo!
>
>>  The socket on which MySQL listens for new connections on a blocking
>>  socket most of the time but is set to non-blocking during the
>>  accept() of the new connection.  Due to a bug in the kernel, the new
>>  socket returned by accept() is a blocking socket but returns the
>>  O_NONBLOCK flag when queried via fcntl(F_GETFL).  That is, the file
>>  descriptor and the underlying socket don't agree on the blocking
>>  mode.
>>
>>  Since MySQL determines via fcntl(F_GETFL) that the socket is
>>  non-blocking, it expects the first read() in my_real_read to not
>>  block, so it doesn't enable the timeout alarm.  However, the read
>>  does block, and thus there's no timeout alarm.  The thread kill
>>  (which relies on rescheduling the timeout alarm) also does not work
>>  as a consequence.
>
>Martin
>





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?20030222165740.92AF243FBD>