NetBSD Problem Report #47394

From www@NetBSD.org  Thu Jan  3 08:59:42 2013
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	by www.NetBSD.org (Postfix) with ESMTP id A7D1563EB84
	for <gnats-bugs@gnats.NetBSD.org>; Thu,  3 Jan 2013 08:59:41 +0000 (UTC)
Message-Id: <20130103085940.A621763EB84@www.NetBSD.org>
Date: Thu,  3 Jan 2013 08:59:40 +0000 (UTC)
From: rodolfobsd@gmail.com
Reply-To: rodolfobsd@gmail.com
To: gnats-bugs@NetBSD.org
Subject: Mysql daemon does not in boot time
X-Send-Pr-Version: www-1.0

>Number:         47394
>Category:       bin
>Synopsis:       Mysql daemon does not in boot time
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Jan 03 09:00:01 +0000 2013
>Last-Modified:  Tue Jan 15 04:05:02 +0000 2013
>Originator:     Edgar Rodolfo
>Release:        6.0 and 6.0.1
>Organization:
>Environment:
NetBSD 6.0 Release i386
>Description:
I want to use mysql server in my machine i386 (NetBSD 6.0 and 6.0.1 release) but mysqld does not start in boot time.
My rc.conf:
mysqld=YES
When finished the boot time, i write /etc/rc.d/mysqld status, it says mysqld is not running, in that moment i write /etc/rc.d/mysqld start then mysql is running, i do not know.

In the early release (NetBSD 5.2) is sufficient to start mysql writing mysqld=YES in rc.conf, the it start in boot time.
>How-To-Repeat:
echo mysqld=YES >> /etc/rc.conf and reboot, afterwards see /etc/rc.d/mysqld status, then you can see that mysql is not running, the release problem is NetBSD 6.0 and 6.0.1
>Fix:
I do not know

>Audit-Trail:
From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: bin/47394: Mysql daemon does not in boot time
Date: Thu, 3 Jan 2013 10:51:18 +0100

 FWIW: it still works for me, but I have this in /etc/rc.conf:

 mysqld=YES      mysqld_flags=--skip-networking

 (since I only allow local processes to access the database).

 Maybe your DNS is not resolving the address(es) your mysqld tries to bind
 to?


 Martin

From: Edgar Rodolfo <rodolfobsd@gmail.com>
To: gnats-bugs@netbsd.org
Cc: martin@duskware.de
Subject: Re: bin/47394: Mysql daemon does not start in boot time
Date: Fri, 4 Jan 2013 04:15:34 -0500

 2013/1/3, Martin Husemann <martin@duskware.de>:
 > The following reply was made to PR bin/47394; it has been noted by GNATS.
 >
 > From: Martin Husemann <martin@duskware.de>
 > To: gnats-bugs@NetBSD.org
 > Cc:
 > Subject: Re: bin/47394: Mysql daemon does not in boot time
 > Date: Thu, 3 Jan 2013 10:51:18 +0100
 >

 THanks a lot for your reply

 >  FWIW: it still works for me, but I have this in /etc/rc.conf:
 >
 >  mysqld=YES      mysqld_flags=--skip-networking

 But mysql_flags=--skip-networking is no necessary in early release to
 start in boot time mysqld, i believe that it should be fixed
 >
 >  (since I only allow local processes to access the database).
 >
 >  Maybe your DNS is not resolving the address(es) your mysqld tries to bind
 >  to?
 >

 I put dns of google 8.8.8.8 and 8.8.4.4 to resolve names and also
 remember that is the same when i was using my own dns server, i
 believe that is no problem dns.

 For me is strange because never i saw similar problem in NetBSD (5.x),
 the release 6.0 and 6.0.1 do not start mysqld

 >
 >  Martin

 Thanks my friend
 >
 >

From: Bernd Ernesti <netbsd@lists.veego.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: bin/47394: Mysql daemon does not in boot time
Date: Sat, 5 Jan 2013 09:40:11 +0100

 Is there anything in the error log?

 You have to enable that log with --log-error

From: Edgar Rodolfo <rodolfobsd@gmail.com>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: bin/47394: Mysql daemon does not Start in boot time
Date: Sat, 5 Jan 2013 23:16:24 -0500

 2013/1/5, Bernd Ernesti <netbsd@lists.veego.de>:
 > The following reply was made to PR bin/47394; it has been noted by GNATS.
 >
 > From: Bernd Ernesti <netbsd@lists.veego.de>
 > To: gnats-bugs@NetBSD.org
 > Cc:
 > Subject: Re: bin/47394: Mysql daemon does not in boot time
 > Date: Sat, 5 Jan 2013 09:40:11 +0100
 >
 >  Is there anything in the error log?

 Nothing, i saw tail /var/log/messages and other.
 >
 >  You have to enable that log with --log-error
 >
 >

From: Bernd Ernesti <netbsd@lists.veego.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: bin/47394: Mysql daemon does not Start in boot time
Date: Sun, 6 Jan 2013 09:25:32 +0100

 On Sun, Jan 06, 2013 at 04:20:08AM +0000, Edgar Rodolfo wrote:
 >  2013/1/5, Bernd Ernesti <netbsd@lists.veego.de>:
 >  >  Is there anything in the error log?
 >  
 >  Nothing, i saw tail /var/log/messages and other.

 mysql will not anything there, you have to look in the log
 in the mysql database root directory and as I said: 

 >  >  You have to enable that log with --log-error

 without that you will not see anything.

 http://dev.mysql.com/doc/refman/5.1/en/error-log.html

 Is there any output in /var/run/rc.log ?

 Bernd

From: David Holland <dholland-bugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: bin/47394: Mysql daemon does not in boot time
Date: Mon, 7 Jan 2013 05:39:19 +0000

 On Thu, Jan 03, 2013 at 09:00:01AM +0000, rodolfobsd@gmail.com wrote:
  > echo mysqld=YES >> /etc/rc.conf and reboot, afterwards see
  > /etc/rc.d/mysqld status, then you can see that mysql is not
  > running

 Two further questions:

   (1) Is it starting and exiting, or not getting started at all?
       You may be able to determine this by watching the console during
       boot.

   (2) Can you check the order in which things are being started?
       If you run "rcorder /etc/rc.d/*" you will see the order; if it
       is coming before something it needs to function correctly,
       adding stuff to the script header that rcorder uses may fix the
       problem.

 -- 
 David A. Holland
 dholland@netbsd.org

From: Edgar Rodolfo <rodolfobsd@gmail.com>
To: gnats-bugs@netbsd.org
Cc: gnats-admin@netbsd.org, netbsd-bugs@netbsd.org
Subject: Re: bin/47394: Mysql daemon does not START in boot time
Date: Mon, 7 Jan 2013 15:53:21 -0500

 2013/1/7, David Holland <dholland-bugs@netbsd.org>:
 > The following reply was made to PR bin/47394; it has been noted by GNATS.
 >
 > From: David Holland <dholland-bugs@netbsd.org>
 > To: gnats-bugs@NetBSD.org
 > Cc:
 > Subject: Re: bin/47394: Mysql daemon does not in boot time
 > Date: Mon, 7 Jan 2013 05:39:19 +0000
 >
 >  On Thu, Jan 03, 2013 at 09:00:01AM +0000, rodolfobsd@gmail.com wrote:
 >   > echo mysqld=YES >> /etc/rc.conf and reboot, afterwards see
 >   > /etc/rc.d/mysqld status, then you can see that mysql is not
 >   > running
 >
 >  Two further questions:
 >
 >    (1) Is it starting and exiting, or not getting started at all?
 >        You may be able to determine this by watching the console during
 >        boot.

 In the boot time i saw mysqld starting, but when i put in terminal
 /etc/rc.d/mysqld status it says mysqld is not running, is very strange
 for me.
 i saw the files /var/mysql/myservername.error and i did not see the
 .pid, the i put MANUALLY /etc/rc.d/mysqld start, then all is normal
 then i can use mysql
 >
 >    (2) Can you check the order in which things are being started?
 >        If you run "rcorder /etc/rc.d/*" you will see the order; if it
 >        is coming before something it needs to function correctly,
 >        adding stuff to the script header that rcorder uses may fix the
 >        problem.

 Is additional thing, i believe that it is not normal, i think that,
 thanks a lot for your reply and attention, but i will try it, regards!

 >
 >  --
 >  David A. Holland
 >  dholland@netbsd.org
 >
 >

From: David Holland <dholland-bugs@netbsd.org>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: bin/47394: Mysql daemon does not START in boot time
Date: Thu, 10 Jan 2013 16:40:41 +0000

 Please use gnats-bugs@ for bug database traffic and don't send to the
 list directly.
 (two mails follow)

    ------

 From: Edgar Rodolfo <rodolfobsd@gmail.com>
 To: Sverre Froyen <sverre@viewmark.com>
 Cc: netbsd-users <netbsd-users@netbsd.org>, netbsd-bugs
 	<netbsd-bugs@netbsd.org>
 Subject: Re: bin/47394: Mysql daemon does not START in boot time
 Date: Tue, 8 Jan 2013 22:35:38 -0500

 2013/1/8, Sverre Froyen <sverre@viewmark.com>:
 > Hi,
 >
 > I just wanted to check if you tried adding the delay or redirecting the
 > output in /etc/rc.d/mysqld script. See
 >
 > http://mail-index.netbsd.org/netbsd-users/2012/12/26/msg012229.html
 > http://mail-index.netbsd.org/netbsd-users/2012/12/27/msg012233.html
 >
 > Like I said, both of these solved my issue (which sounded very similar to
 > yours).

 This is partial solution, but my purpose is that it should be fixed in
 the another release (6.0.x) because is a bug (i believe it) NetBSD for
 me is a good operating system and this strange behavior in the boot
 time is serious for me, i did my part puting the strange behavior, if
 it will not fixed as early release (where it was simple to start mysql
 (NetBSD 5.x)) then i will think to use OpenBSD or FreeBSD for server,
 i close the thread, thanks a lot for some people for their atention
 and time.

 Again thanks a lot!
 >
 > Regards,
 > Sverre

 From: Martin Husemann <martin@duskware.de>
 To: Edgar Rodolfo <rodolfobsd@gmail.com>
 Cc: Sverre Froyen <sverre@viewmark.com>, netbsd-users
 	<netbsd-users@netbsd.org>, netbsd-bugs <netbsd-bugs@netbsd.org>
 Subject: Re: bin/47394: Mysql daemon does not START in boot time
 Date: Wed, 9 Jan 2013 09:26:46 +0100

 On Tue, Jan 08, 2013 at 10:35:38PM -0500, Edgar Rodolfo wrote:
 > This is partial solution, but my purpose is that it should be fixed in
 > the another release (6.0.x) because is a bug

 Unless I misunderstand something, it can not be solved in a future
 NetBSD release, as it is not an OS bug.

 However, it can be fixed in the mysqld package (like Takahiro Kambe
 suggested), or in the mysqld code.

 Martin

From: Sverre Froyen <sverre@viewmark.com>
To: gnats-bugs@netbsd.org
Cc: martin@duskware.de
Subject: Re: bin/47394: Mysql daemon does not START in boot time
Date: Mon, 14 Jan 2013 08:44:22 -0700

 On Wed, 9 Jan 2013 09:26:46 +0100, Martin Husemann wrote:
 > On Tue, Jan 08, 2013 at 10:35:38PM -0500, Edgar Rodolfo wrote:
 >  > This is partial solution, but my purpose is that it should be fixed =
 in
 >  > the another release (6.0.x) because is a bug
 > =20
 > Unless I misunderstand something, it can not be solved in a future
 > NetBSD release, as it is not an OS bug.
 > =20
 > However, it can be fixed in the mysqld package (like Takahiro Kambe
 > suggested), or in the mysqld code.

 While I do not particularly care for the way mysqld_safe starts mysqld, =
 I would like to better understand the issue before I accept that this is =
 not a NetBSD bug.

 Without the output redirect (or the delay), mysqld segfaults when =
 started up at boot time -- perhaps related to IO handling in the rc =
 scripts. If the problem can be fixed there, i.e. the rc scripts, it =
 would make NetBSD more user friendly. If it cannot, the issue should be =
 documented. (I could not find anything obvious in the rc man pages.)

 Regards,
 Sverre=

From: Martin Husemann <martin@duskware.de>
To: Sverre Froyen <sverre@viewmark.com>
Cc: gnats-bugs@netbsd.org
Subject: Re: bin/47394: Mysql daemon does not START in boot time
Date: Mon, 14 Jan 2013 16:54:12 +0100

 On Mon, Jan 14, 2013 at 08:44:22AM -0700, Sverre Froyen wrote:

 > Without the output redirect (or the delay), mysqld segfaults when
 > started up at boot time

 Any chance to get a backtrace from the core file?
 What is the key to make this happen (mysqld does not do this in my local
 setup)?

 Martin

From: Sverre Froyen <sverre@viewmark.com>
To: Martin Husemann <martin@duskware.de>
Cc: gnats-bugs@netbsd.org
Subject: Re: bin/47394: Mysql daemon does not START in boot time
Date: Mon, 14 Jan 2013 11:20:41 -0700

 On Jan 14, 2013, at 08:54, Martin Husemann <martin@duskware.de> wrote:

 > On Mon, Jan 14, 2013 at 08:44:22AM -0700, Sverre Froyen wrote:
 >=20
 >> Without the output redirect (or the delay), mysqld segfaults when
 >> started up at boot time
 >=20
 > Any chance to get a backtrace from the core file?
 > What is the key to make this happen (mysqld does not do this in my =
 local
 > setup)?
 >=20
 > Martin

 I think it must be a timing issue. Presumably related to the time it =
 takes mysqld to print its startup message. I first noticed it on two =
 faster amd64 computers where I did clean installs of NetBSD 6 and =
 current. The problem may predate NetBSD 6, however, because I usually =
 add mysqlcheck to the startup. I can do additional testing as needed.

 For backtraces see

 http://mail-index.netbsd.org/netbsd-users/2012/12/25/msg012227.html

 Regards,
 Sverre

From: Takahiro Kambe <taca@back-street.net>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: bin/47394: Mysql daemon does not START in boot time
Date: Tue, 15 Jan 2013 13:02:18 +0900 (JST)

 Just FYI.

 I found that mysql-server-5.5.29 from pkgsrc current on NetBSD
 6.0_STABLE, mysqld start without problem.  6.0_STABLE is from 8th
 Jan. 2013 source tree.

 -- 
 Takahiro Kambe <taca@back-street.net>

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.