Date: Wed, 15 Oct 2003 23:05:31 +0800 From: David Xu <davidxu@freebsd.org> To: Alexander Motin <mav@alkar.net> Cc: freebsd-current@freebsd.org Subject: Re: KSE & MySQL & rc.d Message-ID: <3F8D623B.1030101@freebsd.org> In-Reply-To: <3F8D5345.90007@alkar.net> References: <Pine.GSO.4.10.10310070931440.18073-100000@pcnet5.pcnet.com> <3F8D5345.90007@alkar.net>
next in thread | previous in thread | raw e-mail | index | archive | help
Alexander Motin wrote:
> Hi.
>
> This patch did not fix the problem. On the 4th boot system hang with
> same symptoms.
>
> Daniel Eischen wrote:
>
>>> 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.
>>
I have been running MySQL 4.1.0 on my SMP machine for monthes, it is
not P4 HyperThreading,
but a dual P3 machine, it just works fine for me.
>>> 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.
>>
Did kernel lock up or can you press ctrl+c to see if you can interrupt it ?
>>> 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 you build mysql from ports, it should install script mysql-server.sh
under /usr/local/etc/rc.d,
the default script will run mysqld_safe in background, I am confused
that you need to
manually turn it into background, the work should be done atomically by
the script.
>>> If I build mysql without KSE it works fine.
>>
>>
>>
>> I'm not sure, but try this patch; it duplicates what libc_r does.
>>
> 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. */
>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3F8D623B.1030101>
