From owner-freebsd-current@FreeBSD.ORG Tue Oct 7 06:34:13 2003 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 3693116A4B3; Tue, 7 Oct 2003 06:34:13 -0700 (PDT) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id C1C2343F3F; Tue, 7 Oct 2003 06:34:11 -0700 (PDT) (envelope-from eischen@vigrid.com) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mail.pcnet.com (8.12.10/8.12.1) with ESMTP id h97DY3gG021035; Tue, 7 Oct 2003 09:34:06 -0400 (EDT) Date: Tue, 7 Oct 2003 09:34:03 -0400 (EDT) From: Daniel Eischen X-Sender: eischen@pcnet5.pcnet.com To: Alexander Motin In-Reply-To: <3F828F95.1080306@alkar.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-current@freebsd.org Subject: Re: KSE & MySQL & rc.d X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: eischen@vigrid.com List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Oct 2003 13:34:13 -0000 On Tue, 7 Oct 2003, Alexander Motin wrote: > Hi! > > I have P4 system with SMP kernel and HyperThreading enabled. > I have one strange problem with mysql 4.1.0 when using KSE on 5.1-CURRENT. > After building mysql server with libkse as thread library and adding its > start script into /usr/local/etc/rc.d, system hangs on boot without any > error message when mysql trying to start. > If I trying to start mysql by hands after system completely boot then > everything works just fine. > If I add delay into mysql start script and run it in backgroud from rc.d > - everything is fine > If I build mysql without KSE it works fine. I'm not sure, but try this patch; it duplicates what libc_r does. -- Dan Eischen Index: thread/thr_init.c =================================================================== RCS file: /opt/FreeBSD/cvs/src/lib/libpthread/thread/thr_init.c,v retrieving revision 1.60 diff -u -r1.60 thr_init.c --- thread/thr_init.c 18 Aug 2003 03:58:29 -0000 1.60 +++ thread/thr_init.c 7 Oct 2003 13:30:54 -0000 @@ -251,6 +251,10 @@ PANIC("Can't set login to root"); if (__sys_ioctl(fd, TIOCSCTTY, (char *) NULL) == -1) PANIC("Can't set controlling terminal"); + if (__sys_dup2(fd, 0) == -1 || + __sys_dup2(fd, 1) == -1 || + __sys_dup2(fd, 2) == -1) + PANIC("Can't dup2"); } /* Initialize pthread private data. */