From owner-freebsd-current@FreeBSD.ORG Mon Jun 14 18:15:39 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D7B3B16A4D0; Mon, 14 Jun 2004 18:15:39 +0000 (GMT) Received: from rwcrmhc13.comcast.net (rwcrmhc13.comcast.net [204.127.198.39]) by mx1.FreeBSD.org (Postfix) with ESMTP id B446643D2D; Mon, 14 Jun 2004 18:15:39 +0000 (GMT) (envelope-from julian@elischer.org) Received: from interjet.elischer.org ([24.7.73.28]) by comcast.net (rwcrmhc13) with ESMTP id <2004061418153801500fdmi3e>; Mon, 14 Jun 2004 18:15:39 +0000 Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id LAA31533; Mon, 14 Jun 2004 11:15:37 -0700 (PDT) Date: Mon, 14 Jun 2004 11:15:34 -0700 (PDT) From: Julian Elischer To: Lasse Laursen In-Reply-To: <01c301c45239$940781f0$6401a8c0@animal> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-current@freebsd.org cc: freebsd-threads@freebsd.org Subject: Re: Possible Threading problem with -CURRENT / MySQL? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Jun 2004 18:15:40 -0000 On Mon, 14 Jun 2004, Lasse Laursen wrote: > > MySQL 4.0.20 was compiled with --without-libwrap (libwrapper seems to be > broken) and WITH_PROC_SCOPE_PTH set to yes. > > WE use the SCHED_ULE, and: > > # Memory options > options MAXDSIZ="(1536*1024*1024)" > options MAXSSIZ="(1024*1024*1024)" > options DFLDSIZ="(1536*1024*1024)" > > The server runs fine until a single thread/query suddenly locks up the > entire MySQL daemon. After that all queries are just queued and a restart of > the daemon is needed to unlock the system. The system itself is stable > enough as far as I can see. 'top' reports a lot of locks (*Giant) so I > assume that it's some weird problem with the threading? We used to use > FreeBSD on non-SMP machines without any problems. > > I have tried with linux threads as well but the same problem occurs. This does suggest a bug in MySQL, but let's investigate anyhow.. > > Have anyone experienced any similar problems and found a solution to this > rather weird problem? > > Feel free to request any further information about the system/setup and I > will do my best to provide it to the list. the output of "ps -alxH might be useful. also: do you have teh kernel debugger compiled into the kernel? (option DDB) if so.. note the PID of the process sysctl debug.enter_debugger=ddb [you are now in the debugger] ps [note the Thread address of the threads that seem to be blocking things] (I may ask for specific threads after seeing the 'ps' output) do show thread {address} to get a stack backtrace of those threads. if possible use a serial console to do all this.. That way you can log it all. to make a serial console, connect 2 machines com1 by a null-modem cable. on the other machine do: script tip com1 on the SQL machine add console="comconsole" into /boot/loader.conf and reboot all console out put from teh boot-loader-on will now go to teh serial port and appear in teh 'tip' output. (which is being logged by the 'script' command). julian