NetBSD Problem Report #48258

From Wolfgang.Stukenbrock@nagler-company.com  Wed Oct  2 10:57:57 2013
Return-Path: <Wolfgang.Stukenbrock@nagler-company.com>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 3D92B71008
	for <gnats-bugs@gnats.NetBSD.org>; Wed,  2 Oct 2013 10:57:57 +0000 (UTC)
Message-Id: <20131002105744.E5864123B93@test-s0.nagler-company.com>
Date: Wed,  2 Oct 2013 12:57:44 +0200 (CEST)
From: Wolfgang.Stukenbrock@nagler-company.com
Reply-To: Wolfgang.Stukenbrock@nagler-company.com
To: gnats-bugs@gnats.NetBSD.org
Subject: mysql-server startup files may try to set to high fd-limit in pkgsrc-startup-file
X-Send-Pr-Version: 3.95

>Number:         48258
>Category:       pkg
>Synopsis:       mysql-server startup files may try to set to high fd-limit in pkgsrc-startup-file
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    pkg-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Wed Oct 02 11:00:00 +0000 2013
>Last-Modified:  Fri Oct 04 09:15:00 +0000 2013
>Originator:     Dr. Wolfgang Stukenbrock
>Release:        pkgsrc-2013Q2, MAIN-CVS-branch
>Organization:
Dr. Nagler & Company GmbH
>Environment:


System: NetBSD test-s0 5.1.2 NetBSD 5.1.2 (NSW-WS) #3: Fri Dec 21 15:15:43 CET 2012 wgstuken@test-s0:/usr/src/sys/arch/amd64/compile/NSW-WS amd64
Architecture: x86_64
Machine: amd64
>Description:
	On NetBSD during installation of mysql-server packages a rc-file from "files" directory is installed.
	This exapmple file is bad, because it tries to set the fd-limit to 4096 unconditionaly.
	This fails on "normal" NetBSD systems that has a default limit of 3404.
>How-To-Repeat:
	setup a fresh system (e.g. amd64), log in and run "ulimit -Hn". It will report 3404.
	And so setting 4096 in the rc-file will (silently) fail and the server will stay at 128 fd's.
>Fix:
	Either just set the actual limit to the max with "ulimit -n `ulimit -Hn`" or
	introduce a more complex code that will determine the max between the value
	returned by "ulimit -Hn" and the hardcoded limit of 4096.
	By the way: what about a variable that may be tuned in /etc/rc.conf ???
	All four version of mysql-server packages in 2013Q2 are affected and need  correction.

>Audit-Trail:
From: "OBATA Akio" <obache@netbsd.org>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/48258: mysql-server startup files may try to set to high
 fd-limit in pkgsrc-startup-file
Date: Wed, 02 Oct 2013 20:19:35 +0900

 On Wed, 02 Oct 2013 20:00:00 +0900, <Wolfgang.Stukenbrock@nagler-company.com> wrote:

 >> How-To-Repeat:
 > 	setup a fresh system (e.g. amd64), log in and run "ulimit -Hn". It will report 3404.
 > 	And so setting 4096 in the rc-file will (silently) fail and the server will stay at 128 fd's.

 I cannot reproduce it on NetBSD-5.1.2-i386, soft limit will be up to the hard limit:

 # ulimit -Hn
 3404
 # ulimit -Sn
 128
 # ulimit -n 4096
 # ulimit -Hn
 3404
 # ulimit -Sn
 3404

 -- 
 OBATA Akio / obache@NetBSD.org

From: Wolfgang Stukenbrock <wolfgang.stukenbrock@nagler-company.com>
To: gnats-bugs@NetBSD.org
Cc: pkg-manager@NetBSD.org, gnats-admin@NetBSD.org, pkgsrc-bugs@NetBSD.org
Subject: Re: pkg/48258: mysql-server startup files may try to set to high fd-limit in pkgsrc-startup-file
Date: Wed, 02 Oct 2013 14:32:37 +0200

 Hi - OK, I haven't tested that again on NetBSD.

 On Solaris ulimit with a to large value will give an error. (tested 
 again in /bin/sh and with setrlimit() for some minutes.)

 On NetBSD there seems to be (now) the feature that ulimit in /bin/sh and 
 setrlimit() will clamp the parameter passed to the maximum - the hard-limit.

 So for NetBSD this is working, but for any other system that does not 
 silently clamp the value it doesn't.
 I'm not shure about the set of OS's that is affected. At least Solaris 8 is.

 pkgsrc is for more than "only" NetBSD, so I think it would be better not 
 to "hope" that the system will truncate to the max.
 Sorry for not explicitly testing on NetBSD prior sending the report.

 By The way, I have had this problem with the FD-limit with mysqld in the 
 past, so that I have added some commandline options in my automated 
 DB-setup scripts that are executed during system installation, but I'm 
 not shure about the NetBSD version where I've added this (3.x or 4.x). 
 It is still in there, even it is (perhaps) now no longer needed.
 And I remember that my main DB-server has crashed when I try to set a 
 larger value as the kernel supports in the DB-server-config file - e.g. 
 when I boot a GENERIC for some reasons - I've increased the hard-limit 
 in the "normal" kernel for this system. That system currently runs 
 NetBSD 4.x.

 just for information (till now):
 I'm debugging an other problem with the delivered rc-files for 
 mysql-server 5.5, because the DB-server crashes during startup when 
 started during system startup on NetBSD 6.1. Calling "/etc/rc.d/mysqld 
 start" by hand later will bring the deamon up.
 (It seems to be either mysql 5.5 related or is a problem with NetBSD 
 6.1, because mysql 5.1 on NetBSD 5.1.2 does not show this problem on 
 several installations.)
 Still not found what it is. Without additional debugging inserted the 
 DB-server runs into SEGV after setting up the socket and prior the 
 message that it is now listening in the error log. But when started 
 under ktrace it still does not start, but it now looks like "something" 
 is shutting down the server during startup (no SEGV anymore), but the 
 normal shutdown messages are in the error-log file of the DB-server. 
 Very strange till now ...

 best regards

 W. Stukenbrock

 OBATA Akio wrote:

 > The following reply was made to PR pkg/48258; it has been noted by GNATS.
 > 
 > From: "OBATA Akio" <obache@netbsd.org>
 > To: gnats-bugs@netbsd.org
 > Cc: 
 > Subject: Re: pkg/48258: mysql-server startup files may try to set to high
 >  fd-limit in pkgsrc-startup-file
 > Date: Wed, 02 Oct 2013 20:19:35 +0900
 > 
 >  On Wed, 02 Oct 2013 20:00:00 +0900, <Wolfgang.Stukenbrock@nagler-company.com> wrote:
 >  
 >  >> How-To-Repeat:
 >  > 	setup a fresh system (e.g. amd64), log in and run "ulimit -Hn". It will report 3404.
 >  > 	And so setting 4096 in the rc-file will (silently) fail and the server will stay at 128 fd's.
 >  
 >  I cannot reproduce it on NetBSD-5.1.2-i386, soft limit will be up to the hard limit:
 >  
 >  # ulimit -Hn
 >  3404
 >  # ulimit -Sn
 >  128
 >  # ulimit -n 4096
 >  # ulimit -Hn
 >  3404
 >  # ulimit -Sn
 >  3404
 >  
 >  -- 
 >  OBATA Akio / obache@NetBSD.org
 >  
 > 
 > 
 > Received: from DB3PR07MB171.eurprd07.prod.outlook.com (10.242.132.149) by
 >  DB3PR07MB169.eurprd07.prod.outlook.com (10.242.132.141) with Microsoft SMTP
 >  Server (TLS) id 15.0.775.9 via Mailbox Transport; Wed, 2 Oct 2013 11:25:09
 >  +0000
 > Received: from DB3PR07CA009.eurprd07.prod.outlook.com (10.242.134.49) by
 >  DB3PR07MB171.eurprd07.prod.outlook.com (10.242.132.149) with Microsoft SMTP
 >  Server (TLS) id 15.0.775.9; Wed, 2 Oct 2013 11:25:07 +0000
 > Received: from AM1FFO11FD017.protection.gbl (2a01:111:f400:7e00::124) by
 >  DB3PR07CA009.outlook.office365.com (2a01:111:e400:9814::49) with Microsoft
 >  SMTP Server (TLS) id 15.0.775.9 via Frontend Transport; Wed, 2 Oct 2013
 >  11:25:07 +0000
 > Received: from e002.nagler-company.com (212.185.86.227) by
 >  AM1FFO11FD017.mail.protection.outlook.com (10.174.64.206) with Microsoft SMTP
 >  Server (TLS) id 15.0.785.10 via Frontend Transport; Wed, 2 Oct 2013 11:25:06
 >  +0000
 > Received: from mollari.NetBSD.org (blog.netbsd.org [149.20.53.80])	by
 >  e002.nagler-company.com (8.14.5/8.14.5) with ESMTP id r92BP2js014397	for
 >  <Wolfgang.Stukenbrock@nagler-company.com>; Wed, 2 Oct 2013 13:25:06 +0200
 >  (CEST)
 > Received: by mollari.NetBSD.org (Postfix, from userid 31008)	id 612697100A;
 >  Wed,  2 Oct 2013 11:25:01 +0000 (UTC)
 > From: OBATA Akio <obache@NetBSD.org>
 > To: <pkg-manager@NetBSD.org>, <gnats-admin@NetBSD.org>,
 > 	<pkgsrc-bugs@NetBSD.org>, <Wolfgang.Stukenbrock@nagler-company.com>
 > Reply-To: <gnats-bugs@NetBSD.org>
 > Subject: Re: pkg/48258: mysql-server startup files may try to set to high
 >  fd-limit in pkgsrc-startup-file
 > References: <pr-pkg-48258@gnats.netbsd.org>
 >   <20131002105744.E5864123B93@test-s0.nagler-company.com>
 > X-Gnats-Was-Stupid: no
 > CC:
 > Message-ID: <20131002112501.612697100A@mollari.NetBSD.org>
 > Date: Wed, 2 Oct 2013 11:25:01 +0000
 > Return-Path: gnats@NetBSD.org
 > X-MS-Exchange-Organization-MessageDirectionality: Incoming
 > X-Forefront-Antispam-Report: CIP:212.185.86.227;CTRY:DE;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(24454002)(189002)(199002)(43066001)(81342001)(47776003)(20776003)(63696002)(47446002)(74662001)(74502001)(16796002)(50466002)(81542001)(6806004)(77982001)(83072001)(46386002)(45336002)(44976005)(52956002)(42186004)(33656001)(51856001)(83322001)(19580405001)(19580395003)(80976001)(74876001)(70486001)(54356001)(47976001)(76482001)(54316002)(50986001)(49866001)(56776001)(4396001)(47736001)(81686001)(79102001)(81816001)(48376002)(74706001)(59766001)(56816003)(76786001)(77096001)(46102001)(76796001)(69226001)(80022001)(65816001)(74366001)(42262001);DIR:INB;SFP:;SCL:1;SRVR:DB3PR07MB171;H:e002.nagler-company.com;CLIP:212.185.86.227;FPR:;RD:e002.nagler-company.com;MX:1;A:1;LANG:en;
 > Content-Type: text/plain
 > X-MS-Exchange-Organization-Network-Message-Id: 83c85e0a-9996-4672-2882-08d08d792ecc
 > X-MS-Exchange-Organization-AVStamp-Service: 1.0
 > Received-SPF: None (: NetBSD.org does not designate permitted sender hosts)
 > X-MS-Exchange-Organization-SCL: 1
 > X-MS-Exchange-Organization-AuthSource: AM1FFO11FD017.protection.gbl
 > X-MS-Exchange-Organization-AuthAs: Anonymous
 > MIME-Version: 1.0
 > 
 > The following reply was made to PR pkg/48258; it has been noted by GNATS.
 > 
 > From: "OBATA Akio" <obache@netbsd.org>
 > To: gnats-bugs@netbsd.org
 > Cc: 
 > Subject: Re: pkg/48258: mysql-server startup files may try to set to high
 >  fd-limit in pkgsrc-startup-file
 > Date: Wed, 02 Oct 2013 20:19:35 +0900
 > 
 >  On Wed, 02 Oct 2013 20:00:00 +0900, <Wolfgang.Stukenbrock@nagler-company.com> wrote:
 >  
 >  >> How-To-Repeat:
 >  > 	setup a fresh system (e.g. amd64), log in and run "ulimit -Hn". It will report 3404.
 >  > 	And so setting 4096 in the rc-file will (silently) fail and the server will stay at 128 fd's.
 >  
 >  I cannot reproduce it on NetBSD-5.1.2-i386, soft limit will be up to the hard limit:
 >  
 >  # ulimit -Hn
 >  3404
 >  # ulimit -Sn
 >  128
 >  # ulimit -n 4096
 >  # ulimit -Hn
 >  3404
 >  # ulimit -Sn
 >  3404
 >  
 >  -- 
 >  OBATA Akio / obache@NetBSD.org
 >  
 > 


 -- 


 Dr. Nagler & Company GmbH
 Hauptstraße 9
 92253 Schnaittenbach

 Tel. +49 9622/71 97-42
 Fax +49 9622/71 97-50

 Wolfgang.Stukenbrock@nagler-company.com
 http://www.nagler-company.com


 Hauptsitz: Schnaittenbach
 Handelregister: Amberg HRB
 Gerichtsstand: Amberg
 Steuernummer: 201/118/51825
 USt.-ID-Nummer: DE 273143997
 Geschäftsführer: Dr. Martin Nagler


From: Wolfgang Stukenbrock <wolfgang.stukenbrock@nagler-company.com>
To: gnats-bugs@NetBSD.org
Cc: pkg-manager@NetBSD.org, gnats-admin@NetBSD.org, pkgsrc-bugs@NetBSD.org
Subject: Re: pkg/48258: mysql-server startup files may try to set to high fd-limit in pkgsrc-startup-file
Date: Wed, 02 Oct 2013 16:56:10 +0200

 Hi again,

 I've just found "my" problem why the mysqld does not start during boot.

 The problem is "located" in mysqld_safe.

 Prior the logging is realy setup, a message is send by log_notice (or 
 similar) to the stdout. (Same happens if I try not to all the 
 shell-funtion and just echo the line.)

 It looks like the login process on the console has already started and 
 all previous fd's to /dev/console has been revoked. Why this simply 
 kills the shell I still don't know. And why writing to stdout later is 
 ignored without crashing the shell is also a little bit strange.
 If I "disable" this output (e.g. by setting the true command in front of 
 the line) further output is redirected to the log-file of syslog (not 
 tested, but should work too) and the DB-server comes up.

 This is very very bad !!!!!
 We seems to have a timing problem during startup here.

 The only known workaround to me is to add a sleep in the rc-file after 
 backgrounding mysqld_save. Not very smart and not realy relyable.

 For my system a "sleep 1" is good for all my startup tries (till now). 
 So a "sleep 5" should do it for this system with excactly this set of 
 programs started during boot.
 But this is no sollution - just try, error and hope it wil not break ...

 I try to get the syscall that kills the shell by starting ktrace short 
 time in front of the location of the problem - but cannot say how much 
 time I need to get a sollution.
 The current startup script simply does not work on NetBSD 6.1. With the 
 sleep mentioned above the problem can be worked around for unknown reasons.

 best regards

 W. Stukenbrock

 Wolfgang Stukenbrock wrote:

 > The following reply was made to PR pkg/48258; it has been noted by GNATS.
 > 
 > From: Wolfgang Stukenbrock <wolfgang.stukenbrock@nagler-company.com>
 > To: gnats-bugs@NetBSD.org
 > Cc: pkg-manager@NetBSD.org, gnats-admin@NetBSD.org, pkgsrc-bugs@NetBSD.org
 > Subject: Re: pkg/48258: mysql-server startup files may try to set to high fd-limit in pkgsrc-startup-file
 > Date: Wed, 02 Oct 2013 14:32:37 +0200
 > 
 >  Hi - OK, I haven't tested that again on NetBSD.
 >  
 >  On Solaris ulimit with a to large value will give an error. (tested 
 >  again in /bin/sh and with setrlimit() for some minutes.)
 >  
 >  On NetBSD there seems to be (now) the feature that ulimit in /bin/sh and 
 >  setrlimit() will clamp the parameter passed to the maximum - the hard-limit.
 >  
 >  So for NetBSD this is working, but for any other system that does not 
 >  silently clamp the value it doesn't.
 >  I'm not shure about the set of OS's that is affected. At least Solaris 8 is.
 >  
 >  pkgsrc is for more than "only" NetBSD, so I think it would be better not 
 >  to "hope" that the system will truncate to the max.
 >  Sorry for not explicitly testing on NetBSD prior sending the report.
 >  
 >  By The way, I have had this problem with the FD-limit with mysqld in the 
 >  past, so that I have added some commandline options in my automated 
 >  DB-setup scripts that are executed during system installation, but I'm 
 >  not shure about the NetBSD version where I've added this (3.x or 4.x). 
 >  It is still in there, even it is (perhaps) now no longer needed.
 >  And I remember that my main DB-server has crashed when I try to set a 
 >  larger value as the kernel supports in the DB-server-config file - e.g. 
 >  when I boot a GENERIC for some reasons - I've increased the hard-limit 
 >  in the "normal" kernel for this system. That system currently runs 
 >  NetBSD 4.x.
 >  
 >  just for information (till now):
 >  I'm debugging an other problem with the delivered rc-files for 
 >  mysql-server 5.5, because the DB-server crashes during startup when 
 >  started during system startup on NetBSD 6.1. Calling "/etc/rc.d/mysqld 
 >  start" by hand later will bring the deamon up.
 >  (It seems to be either mysql 5.5 related or is a problem with NetBSD 
 >  6.1, because mysql 5.1 on NetBSD 5.1.2 does not show this problem on 
 >  several installations.)
 >  Still not found what it is. Without additional debugging inserted the 
 >  DB-server runs into SEGV after setting up the socket and prior the 
 >  message that it is now listening in the error log. But when started 
 >  under ktrace it still does not start, but it now looks like "something" 
 >  is shutting down the server during startup (no SEGV anymore), but the 
 >  normal shutdown messages are in the error-log file of the DB-server. 
 >  Very strange till now ...
 >  
 >  best regards
 >  
 >  W. Stukenbrock
 >  
 >  OBATA Akio wrote:
 >  
 >  > The following reply was made to PR pkg/48258; it has been noted by GNATS.
 >  > 
 >  > From: "OBATA Akio" <obache@netbsd.org>
 >  > To: gnats-bugs@netbsd.org
 >  > Cc: 
 >  > Subject: Re: pkg/48258: mysql-server startup files may try to set to high
 >  >  fd-limit in pkgsrc-startup-file
 >  > Date: Wed, 02 Oct 2013 20:19:35 +0900
 >  > 
 >  >  On Wed, 02 Oct 2013 20:00:00 +0900, <Wolfgang.Stukenbrock@nagler-company.com> wrote:
 >  >  
 >  >  >> How-To-Repeat:
 >  >  > 	setup a fresh system (e.g. amd64), log in and run "ulimit -Hn". It will report 3404.
 >  >  > 	And so setting 4096 in the rc-file will (silently) fail and the server will stay at 128 fd's.
 >  >  
 >  >  I cannot reproduce it on NetBSD-5.1.2-i386, soft limit will be up to the hard limit:
 >  >  
 >  >  # ulimit -Hn
 >  >  3404
 >  >  # ulimit -Sn
 >  >  128
 >  >  # ulimit -n 4096
 >  >  # ulimit -Hn
 >  >  3404
 >  >  # ulimit -Sn
 >  >  3404
 >  >  
 >  >  -- 
 >  >  OBATA Akio / obache@NetBSD.org
 >  >  
 >  > 
 >  > 
 >  > Received: from DB3PR07MB171.eurprd07.prod.outlook.com (10.242.132.149) by
 >  >  DB3PR07MB169.eurprd07.prod.outlook.com (10.242.132.141) with Microsoft SMTP
 >  >  Server (TLS) id 15.0.775.9 via Mailbox Transport; Wed, 2 Oct 2013 11:25:09
 >  >  +0000
 >  > Received: from DB3PR07CA009.eurprd07.prod.outlook.com (10.242.134.49) by
 >  >  DB3PR07MB171.eurprd07.prod.outlook.com (10.242.132.149) with Microsoft SMTP
 >  >  Server (TLS) id 15.0.775.9; Wed, 2 Oct 2013 11:25:07 +0000
 >  > Received: from AM1FFO11FD017.protection.gbl (2a01:111:f400:7e00::124) by
 >  >  DB3PR07CA009.outlook.office365.com (2a01:111:e400:9814::49) with Microsoft
 >  >  SMTP Server (TLS) id 15.0.775.9 via Frontend Transport; Wed, 2 Oct 2013
 >  >  11:25:07 +0000
 >  > Received: from e002.nagler-company.com (212.185.86.227) by
 >  >  AM1FFO11FD017.mail.protection.outlook.com (10.174.64.206) with Microsoft SMTP
 >  >  Server (TLS) id 15.0.785.10 via Frontend Transport; Wed, 2 Oct 2013 11:25:06
 >  >  +0000
 >  > Received: from mollari.NetBSD.org (blog.netbsd.org [149.20.53.80])	by
 >  >  e002.nagler-company.com (8.14.5/8.14.5) with ESMTP id r92BP2js014397	for
 >  >  <Wolfgang.Stukenbrock@nagler-company.com>; Wed, 2 Oct 2013 13:25:06 +0200
 >  >  (CEST)
 >  > Received: by mollari.NetBSD.org (Postfix, from userid 31008)	id 612697100A;
 >  >  Wed,  2 Oct 2013 11:25:01 +0000 (UTC)
 >  > From: OBATA Akio <obache@NetBSD.org>
 >  > To: <pkg-manager@NetBSD.org>, <gnats-admin@NetBSD.org>,
 >  > 	<pkgsrc-bugs@NetBSD.org>, <Wolfgang.Stukenbrock@nagler-company.com>
 >  > Reply-To: <gnats-bugs@NetBSD.org>
 >  > Subject: Re: pkg/48258: mysql-server startup files may try to set to high
 >  >  fd-limit in pkgsrc-startup-file
 >  > References: <pr-pkg-48258@gnats.netbsd.org>
 >  >   <20131002105744.E5864123B93@test-s0.nagler-company.com>
 >  > X-Gnats-Was-Stupid: no
 >  > CC:
 >  > Message-ID: <20131002112501.612697100A@mollari.NetBSD.org>
 >  > Date: Wed, 2 Oct 2013 11:25:01 +0000
 >  > Return-Path: gnats@NetBSD.org
 >  > X-MS-Exchange-Organization-MessageDirectionality: Incoming
 >  > X-Forefront-Antispam-Report: CIP:212.185.86.227;CTRY:DE;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(24454002)(189002)(199002)(43066001)(81342001)(47776003)(20776003)(63696002)(47446002)(74662001)(74502001)(16796002)(50466002)(81542001)(6806004)(77982001)(83072001)(46386002)(45336002)(44976005)(52956002)(42186004)(33656001)(51856001)(83322001)(19580405001)(19580395003)(80976001)(74876001)(70486001)(54356001)(47976001)(76482001)(54316002)(50986001)(49866001)(56776001)(4396001)(47736001)(81686001)(79102001)(81816001)(48376002)(74706001)(59766001)(56816003)(76786001)(77096001)(46102001)(76796001)(69226001)(80022001)(65816001)(74366001)(42262001);DIR:INB;SFP:;SCL:1;SRVR:DB3PR07MB171;H:e002.nagler-company.com;CLIP:212.185.86.227;FPR:;RD:e002.nagler-company.com;MX:1;A:1;LANG:en;
 >  > Content-Type: text/plain
 >  > X-MS-Exchange-Organization-Network-Message-Id: 83c85e0a-9996-4672-2882-08d08d792ecc
 >  > X-MS-Exchange-Organization-AVStamp-Service: 1.0
 >  > Received-SPF: None (: NetBSD.org does not designate permitted sender hosts)
 >  > X-MS-Exchange-Organization-SCL: 1
 >  > X-MS-Exchange-Organization-AuthSource: AM1FFO11FD017.protection.gbl
 >  > X-MS-Exchange-Organization-AuthAs: Anonymous
 >  > MIME-Version: 1.0
 >  > 
 >  > The following reply was made to PR pkg/48258; it has been noted by GNATS.
 >  > 
 >  > From: "OBATA Akio" <obache@netbsd.org>
 >  > To: gnats-bugs@netbsd.org
 >  > Cc: 
 >  > Subject: Re: pkg/48258: mysql-server startup files may try to set to high
 >  >  fd-limit in pkgsrc-startup-file
 >  > Date: Wed, 02 Oct 2013 20:19:35 +0900
 >  > 
 >  >  On Wed, 02 Oct 2013 20:00:00 +0900, <Wolfgang.Stukenbrock@nagler-company.com> wrote:
 >  >  
 >  >  >> How-To-Repeat:
 >  >  > 	setup a fresh system (e.g. amd64), log in and run "ulimit -Hn". It will report 3404.
 >  >  > 	And so setting 4096 in the rc-file will (silently) fail and the server will stay at 128 fd's.
 >  >  
 >  >  I cannot reproduce it on NetBSD-5.1.2-i386, soft limit will be up to the hard limit:
 >  >  
 >  >  # ulimit -Hn
 >  >  3404
 >  >  # ulimit -Sn
 >  >  128
 >  >  # ulimit -n 4096
 >  >  # ulimit -Hn
 >  >  3404
 >  >  # ulimit -Sn
 >  >  3404
 >  >  
 >  >  -- 
 >  >  OBATA Akio / obache@NetBSD.org
 >  >  
 >  > 
 >  
 >  
 >  -- 
 >  
 >  
 >  Dr. Nagler & Company GmbH
 >  Hauptstraße 9
 >  92253 Schnaittenbach
 >  
 >  Tel. +49 9622/71 97-42
 >  Fax +49 9622/71 97-50
 >  
 >  Wolfgang.Stukenbrock@nagler-company.com
 >  http://www.nagler-company.com
 >  
 >  
 >  Hauptsitz: Schnaittenbach
 >  Handelregister: Amberg HRB
 >  Gerichtsstand: Amberg
 >  Steuernummer: 201/118/51825
 >  USt.-ID-Nummer: DE 273143997
 >  Geschäftsführer: Dr. Martin Nagler
 >  
 >  
 > 
 > 
 > Received: from AMXPR07MB165.eurprd07.prod.outlook.com (10.242.68.150) by
 >  DB3PR07MB169.eurprd07.prod.outlook.com (10.242.132.141) with Microsoft SMTP
 >  Server (TLS) id 15.0.775.9 via Mailbox Transport; Wed, 2 Oct 2013 12:35:18
 >  +0000
 > Received: from AMXPR07CA001.eurprd07.prod.outlook.com (10.242.64.41) by
 >  AMXPR07MB165.eurprd07.prod.outlook.com (10.242.68.150) with Microsoft SMTP
 >  Server (TLS) id 15.0.775.9; Wed, 2 Oct 2013 12:35:14 +0000
 > Received: from AM1FFO11FD009.protection.gbl (2a01:111:f400:7e00::107) by
 >  AMXPR07CA001.outlook.office365.com (2a01:111:e400:1000::41) with Microsoft
 >  SMTP Server (TLS) id 15.0.785.10 via Frontend Transport; Wed, 2 Oct 2013
 >  12:35:13 +0000
 > Received: from e002.nagler-company.com (212.185.86.227) by
 >  AM1FFO11FD009.mail.protection.outlook.com (10.174.65.98) with Microsoft SMTP
 >  Server (TLS) id 15.0.785.10 via Frontend Transport; Wed, 2 Oct 2013 12:35:11
 >  +0000
 > Received: from mollari.NetBSD.org (mollari.netbsd.org [149.20.53.80])	by
 >  e002.nagler-company.com (8.14.5/8.14.5) with ESMTP id r92CZ3v4016739	for
 >  <Wolfgang.Stukenbrock@nagler-company.com>; Wed, 2 Oct 2013 14:35:06 +0200
 >  (CEST)
 > Received: by mollari.NetBSD.org (Postfix, from userid 31008)	id A2F2F7100A;
 >  Wed,  2 Oct 2013 12:35:00 +0000 (UTC)
 > From: Wolfgang Stukenbrock <wolfgang.stukenbrock@nagler-company.com>
 > To: <pkg-manager@NetBSD.org>, <gnats-admin@NetBSD.org>,
 > 	<pkgsrc-bugs@NetBSD.org>, <Wolfgang.Stukenbrock@nagler-company.com>
 > Reply-To: <gnats-bugs@NetBSD.org>
 > Subject: Re: pkg/48258: mysql-server startup files may try to set to high fd-limit in pkgsrc-startup-file
 > References: <pr-pkg-48258@gnats.netbsd.org>
 >   <20131002105744.E5864123B93@test-s0.nagler-company.com>
 > X-Gnats-Was-Stupid: no
 > CC:
 > Message-ID: <20131002123500.A2F2F7100A@mollari.NetBSD.org>
 > Date: Wed, 2 Oct 2013 12:35:00 +0000
 > Return-Path: gnats@NetBSD.org
 > X-MS-Exchange-Organization-MessageDirectionality: Incoming
 > X-Forefront-Antispam-Report: CIP:212.185.86.227;CTRY:DE;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(51704005)(199002)(189002)(24454002)(52034003)(54316002)(56776001)(45336002)(47446002)(79102001)(43066001)(74662001)(47776003)(63696002)(74876001)(20776003)(33656001)(74366001)(77982001)(59766001)(74706001)(50466002)(48376002)(52956002)(65816001)(80976001)(6806004)(16601075003)(81816001)(81686001)(44976005)(51856001)(19580405001)(77096001)(83072001)(76786001)(76796001)(56816003)(49866001)(70486001)(15975445006)(15202345003)(46386002)(69226001)(81542001)(16796002)(81342001)(19580395003)(83322001)(47736001)(4396001)(46102001)(54356001)(47976001)(50986001)(42186004)(24704002)(42882001);DIR:INB;SFP:;SCL:1;SRVR:AMXPR07MB165;H:e002.nagler-company.com;CLIP:212.185.86.227;FPR:;RD:e002.nagler-company.com;A:1;MX:1;LANG:en;
 > Content-Type: text/plain
 > X-MS-Exchange-Organization-Network-Message-Id: 696f0db6-0bd2-47cd-afb9-08d08d82fa62
 > X-MS-Exchange-Organization-AVStamp-Service: 1.0
 > Received-SPF: None (: NetBSD.org does not designate permitted sender hosts)
 > X-MS-Exchange-Organization-SCL: 1
 > X-MS-Exchange-Organization-AuthSource: AM1FFO11FD009.protection.gbl
 > X-MS-Exchange-Organization-AuthAs: Anonymous
 > MIME-Version: 1.0
 > 
 > The following reply was made to PR pkg/48258; it has been noted by GNATS.
 > 
 > From: Wolfgang Stukenbrock <wolfgang.stukenbrock@nagler-company.com>
 > To: gnats-bugs@NetBSD.org
 > Cc: pkg-manager@NetBSD.org, gnats-admin@NetBSD.org, pkgsrc-bugs@NetBSD.org
 > Subject: Re: pkg/48258: mysql-server startup files may try to set to high fd-limit in pkgsrc-startup-file
 > Date: Wed, 02 Oct 2013 14:32:37 +0200
 > 
 >  Hi - OK, I haven't tested that again on NetBSD.
 >  
 >  On Solaris ulimit with a to large value will give an error. (tested 
 >  again in /bin/sh and with setrlimit() for some minutes.)
 >  
 >  On NetBSD there seems to be (now) the feature that ulimit in /bin/sh and 
 >  setrlimit() will clamp the parameter passed to the maximum - the hard-limit.
 >  
 >  So for NetBSD this is working, but for any other system that does not 
 >  silently clamp the value it doesn't.
 >  I'm not shure about the set of OS's that is affected. At least Solaris 8 is.
 >  
 >  pkgsrc is for more than "only" NetBSD, so I think it would be better not 
 >  to "hope" that the system will truncate to the max.
 >  Sorry for not explicitly testing on NetBSD prior sending the report.
 >  
 >  By The way, I have had this problem with the FD-limit with mysqld in the 
 >  past, so that I have added some commandline options in my automated 
 >  DB-setup scripts that are executed during system installation, but I'm 
 >  not shure about the NetBSD version where I've added this (3.x or 4.x). 
 >  It is still in there, even it is (perhaps) now no longer needed.
 >  And I remember that my main DB-server has crashed when I try to set a 
 >  larger value as the kernel supports in the DB-server-config file - e.g. 
 >  when I boot a GENERIC for some reasons - I've increased the hard-limit 
 >  in the "normal" kernel for this system. That system currently runs 
 >  NetBSD 4.x.
 >  
 >  just for information (till now):
 >  I'm debugging an other problem with the delivered rc-files for 
 >  mysql-server 5.5, because the DB-server crashes during startup when 
 >  started during system startup on NetBSD 6.1. Calling "/etc/rc.d/mysqld 
 >  start" by hand later will bring the deamon up.
 >  (It seems to be either mysql 5.5 related or is a problem with NetBSD 
 >  6.1, because mysql 5.1 on NetBSD 5.1.2 does not show this problem on 
 >  several installations.)
 >  Still not found what it is. Without additional debugging inserted the 
 >  DB-server runs into SEGV after setting up the socket and prior the 
 >  message that it is now listening in the error log. But when started 
 >  under ktrace it still does not start, but it now looks like "something" 
 >  is shutting down the server during startup (no SEGV anymore), but the 
 >  normal shutdown messages are in the error-log file of the DB-server. 
 >  Very strange till now ...
 >  
 >  best regards
 >  
 >  W. Stukenbrock
 >  
 >  OBATA Akio wrote:
 >  
 >  > The following reply was made to PR pkg/48258; it has been noted by GNATS.
 >  > 
 >  > From: "OBATA Akio" <obache@netbsd.org>
 >  > To: gnats-bugs@netbsd.org
 >  > Cc: 
 >  > Subject: Re: pkg/48258: mysql-server startup files may try to set to high
 >  >  fd-limit in pkgsrc-startup-file
 >  > Date: Wed, 02 Oct 2013 20:19:35 +0900
 >  > 
 >  >  On Wed, 02 Oct 2013 20:00:00 +0900, <Wolfgang.Stukenbrock@nagler-company.com> wrote:
 >  >  
 >  >  >> How-To-Repeat:
 >  >  > 	setup a fresh system (e.g. amd64), log in and run "ulimit -Hn". It will report 3404.
 >  >  > 	And so setting 4096 in the rc-file will (silently) fail and the server will stay at 128 fd's.
 >  >  
 >  >  I cannot reproduce it on NetBSD-5.1.2-i386, soft limit will be up to the hard limit:
 >  >  
 >  >  # ulimit -Hn
 >  >  3404
 >  >  # ulimit -Sn
 >  >  128
 >  >  # ulimit -n 4096
 >  >  # ulimit -Hn
 >  >  3404
 >  >  # ulimit -Sn
 >  >  3404
 >  >  
 >  >  -- 
 >  >  OBATA Akio / obache@NetBSD.org
 >  >  
 >  > 
 >  > 
 >  > Received: from DB3PR07MB171.eurprd07.prod.outlook.com (10.242.132.149) by
 >  >  DB3PR07MB169.eurprd07.prod.outlook.com (10.242.132.141) with Microsoft SMTP
 >  >  Server (TLS) id 15.0.775.9 via Mailbox Transport; Wed, 2 Oct 2013 11:25:09
 >  >  +0000
 >  > Received: from DB3PR07CA009.eurprd07.prod.outlook.com (10.242.134.49) by
 >  >  DB3PR07MB171.eurprd07.prod.outlook.com (10.242.132.149) with Microsoft SMTP
 >  >  Server (TLS) id 15.0.775.9; Wed, 2 Oct 2013 11:25:07 +0000
 >  > Received: from AM1FFO11FD017.protection.gbl (2a01:111:f400:7e00::124) by
 >  >  DB3PR07CA009.outlook.office365.com (2a01:111:e400:9814::49) with Microsoft
 >  >  SMTP Server (TLS) id 15.0.775.9 via Frontend Transport; Wed, 2 Oct 2013
 >  >  11:25:07 +0000
 >  > Received: from e002.nagler-company.com (212.185.86.227) by
 >  >  AM1FFO11FD017.mail.protection.outlook.com (10.174.64.206) with Microsoft SMTP
 >  >  Server (TLS) id 15.0.785.10 via Frontend Transport; Wed, 2 Oct 2013 11:25:06
 >  >  +0000
 >  > Received: from mollari.NetBSD.org (blog.netbsd.org [149.20.53.80])	by
 >  >  e002.nagler-company.com (8.14.5/8.14.5) with ESMTP id r92BP2js014397	for
 >  >  <Wolfgang.Stukenbrock@nagler-company.com>; Wed, 2 Oct 2013 13:25:06 +0200
 >  >  (CEST)
 >  > Received: by mollari.NetBSD.org (Postfix, from userid 31008)	id 612697100A;
 >  >  Wed,  2 Oct 2013 11:25:01 +0000 (UTC)
 >  > From: OBATA Akio <obache@NetBSD.org>
 >  > To: <pkg-manager@NetBSD.org>, <gnats-admin@NetBSD.org>,
 >  > 	<pkgsrc-bugs@NetBSD.org>, <Wolfgang.Stukenbrock@nagler-company.com>
 >  > Reply-To: <gnats-bugs@NetBSD.org>
 >  > Subject: Re: pkg/48258: mysql-server startup files may try to set to high
 >  >  fd-limit in pkgsrc-startup-file
 >  > References: <pr-pkg-48258@gnats.netbsd.org>
 >  >   <20131002105744.E5864123B93@test-s0.nagler-company.com>
 >  > X-Gnats-Was-Stupid: no
 >  > CC:
 >  > Message-ID: <20131002112501.612697100A@mollari.NetBSD.org>
 >  > Date: Wed, 2 Oct 2013 11:25:01 +0000
 >  > Return-Path: gnats@NetBSD.org
 >  > X-MS-Exchange-Organization-MessageDirectionality: Incoming
 >  > X-Forefront-Antispam-Report: CIP:212.185.86.227;CTRY:DE;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(24454002)(189002)(199002)(43066001)(81342001)(47776003)(20776003)(63696002)(47446002)(74662001)(74502001)(16796002)(50466002)(81542001)(6806004)(77982001)(83072001)(46386002)(45336002)(44976005)(52956002)(42186004)(33656001)(51856001)(83322001)(19580405001)(19580395003)(80976001)(74876001)(70486001)(54356001)(47976001)(76482001)(54316002)(50986001)(49866001)(56776001)(4396001)(47736001)(81686001)(79102001)(81816001)(48376002)(74706001)(59766001)(56816003)(76786001)(77096001)(46102001)(76796001)(69226001)(80022001)(65816001)(74366001)(42262001);DIR:INB;SFP:;SCL:1;SRVR:DB3PR07MB171;H:e002.nagler-company.com;CLIP:212.185.86.227;FPR:;RD:e002.nagler-company.com;MX:1;A:1;LANG:en;
 >  > Content-Type: text/plain
 >  > X-MS-Exchange-Organization-Network-Message-Id: 83c85e0a-9996-4672-2882-08d08d792ecc
 >  > X-MS-Exchange-Organization-AVStamp-Service: 1.0
 >  > Received-SPF: None (: NetBSD.org does not designate permitted sender hosts)
 >  > X-MS-Exchange-Organization-SCL: 1
 >  > X-MS-Exchange-Organization-AuthSource: AM1FFO11FD017.protection.gbl
 >  > X-MS-Exchange-Organization-AuthAs: Anonymous
 >  > MIME-Version: 1.0
 >  > 
 >  > The following reply was made to PR pkg/48258; it has been noted by GNATS.
 >  > 
 >  > From: "OBATA Akio" <obache@netbsd.org>
 >  > To: gnats-bugs@netbsd.org
 >  > Cc: 
 >  > Subject: Re: pkg/48258: mysql-server startup files may try to set to high
 >  >  fd-limit in pkgsrc-startup-file
 >  > Date: Wed, 02 Oct 2013 20:19:35 +0900
 >  > 
 >  >  On Wed, 02 Oct 2013 20:00:00 +0900, <Wolfgang.Stukenbrock@nagler-company.com> wrote:
 >  >  
 >  >  >> How-To-Repeat:
 >  >  > 	setup a fresh system (e.g. amd64), log in and run "ulimit -Hn". It will report 3404.
 >  >  > 	And so setting 4096 in the rc-file will (silently) fail and the server will stay at 128 fd's.
 >  >  
 >  >  I cannot reproduce it on NetBSD-5.1.2-i386, soft limit will be up to the hard limit:
 >  >  
 >  >  # ulimit -Hn
 >  >  3404
 >  >  # ulimit -Sn
 >  >  128
 >  >  # ulimit -n 4096
 >  >  # ulimit -Hn
 >  >  3404
 >  >  # ulimit -Sn
 >  >  3404
 >  >  
 >  >  -- 
 >  >  OBATA Akio / obache@NetBSD.org
 >  >  
 >  > 
 >  
 >  
 >  -- 
 >  
 >  
 >  Dr. Nagler & Company GmbH
 >  Hauptstraße 9
 >  92253 Schnaittenbach
 >  
 >  Tel. +49 9622/71 97-42
 >  Fax +49 9622/71 97-50
 >  
 >  Wolfgang.Stukenbrock@nagler-company.com
 >  http://www.nagler-company.com
 >  
 >  
 >  Hauptsitz: Schnaittenbach
 >  Handelregister: Amberg HRB
 >  Gerichtsstand: Amberg
 >  Steuernummer: 201/118/51825
 >  USt.-ID-Nummer: DE 273143997
 >  Geschäftsführer: Dr. Martin Nagler
 >  
 >  
 > 


 -- 


 Dr. Nagler & Company GmbH
 Hauptstraße 9
 92253 Schnaittenbach

 Tel. +49 9622/71 97-42
 Fax +49 9622/71 97-50

 Wolfgang.Stukenbrock@nagler-company.com
 http://www.nagler-company.com


 Hauptsitz: Schnaittenbach
 Handelregister: Amberg HRB
 Gerichtsstand: Amberg
 Steuernummer: 201/118/51825
 USt.-ID-Nummer: DE 273143997
 Geschäftsführer: Dr. Martin Nagler


From: Wolfgang Stukenbrock <wolfgang.stukenbrock@nagler-company.com>
To: gnats-bugs@NetBSD.org
Cc: pkg-manager@NetBSD.org, gnats-admin@NetBSD.org, pkgsrc-bugs@NetBSD.org
Subject: Re: pkg/48258: mysql-server startup files may try to set to high fd-limit in pkgsrc-startup-file
Date: Fri, 04 Oct 2013 11:13:56 +0200

 Hi,

 first one additional remark to my startup problem:
 It is related to the fact that SIGPIPE is not ignored in mysqld_safe.
 I will open a new report for that one.


 Now back to the reported problem in this PR:

 Useing ulimit in the rc-skript for the number of filedescriptors is
 a redundant aproach to modify this value.
 Instead of dooing this by calling ulimit, --open-files-limit commandline 
 options can or should be used. mysqld_safe will set the limit, if called 
 as root and this should be alway true during system boot.
 Additionaly the manual of mysqld say, that if this option is not set, 
 than mysqld calculates it by itself - e.g. 961 on my system.
 By setting the comand-line-option mysqld still compares this value with 
 the calculating the default value, so a small value does not hurt.
 (at least version 5.5.x does this.)
 (remark: the hard-limit will be set by mysqld too.)

 Now I'm not shure why the fd-limit setup has been integrated into the 
 rc-file, because it looks like it is not realy needed there. Or is there 
 a problem in the calculation of mysqld and we need some additonal fd's, 
 that mysqld does not know about? If this is true, setting the fd-limit 
 in the rc-script may be called a workaround that may fail on "large" 
 systems where the calculated value is larger than the value set in the 
 rc-file.
 I've had a look into the source of mysql 5.5 and implementation in 
 sql/mysqld.cc seems to handle everything in a correct and suitable way. 
 Also the "truncation" of the value that should be set is handled.
 The only thing that may be a source for problems is the fact that mysqld 
 sets the hard-limit too. This is not done if the durrent soft-limit is 
 bejong the durrent need and even the current value is not truncated in 
 this case.

 So I think, setting the fd-limit should be removed (at least for 5.5) 
 from the rc-file. Perhaps a comment about the --open-files-limit options 
 may make sence to point to the suggested way of mysql to set this value.

 One remaining "problem" in the way mysqld is setting the limits is, that 
 the requested value is not checked against the current hard-limit. The 
 implementations expects that the value is truncated if bejong the 
 allowed range, even for the hard-limit - I wrote before that at least 
 Solaris 8 does not do this and this implentation will fail. Just the 
 same as just trying to set the value by calling ulimit in the rc-file at 
 the moment.

 (remark: setting the fd-limit value in mysqld_safe looks like a relict 
 to me, because it is later done by mysqld again. So this does not realy 
 make sence in mysqld_safe. But this should be changed by the mysql 
 developer, it is not a pkgsrc-task for me.)


 By the way: if you try to setup the environment for "real" usage there 
 are two other limit values that mysqld (or mysqld_safe) does not set itself.
 Theese are the data-size and the stack-size.

 The following lines maybe a good idea in the startupfile to support 
 large "real-world" DB-server.
 ulimit -s `ulimit -Hs`
 ulimit -d `ulimit -Hd`

 The normal limit values for data- and stacksize are good for most 
 "toy"-application, such as all web stuff installed from pkgsrc, but are 
 insufficent for enterprise DB-server.

 Best regards.

 W. Stukenbrock


 Wolfgang Stukenbrock wrote:

 > The following reply was made to PR pkg/48258; it has been noted by GNATS.
 > 
 > From: Wolfgang Stukenbrock <wolfgang.stukenbrock@nagler-company.com>
 > To: gnats-bugs@NetBSD.org
 > Cc: pkg-manager@NetBSD.org, gnats-admin@NetBSD.org, pkgsrc-bugs@NetBSD.org
 > Subject: Re: pkg/48258: mysql-server startup files may try to set to high fd-limit in pkgsrc-startup-file
 > Date: Wed, 02 Oct 2013 16:56:10 +0200
 > 
 >  Hi again,
 >  
 >  I've just found "my" problem why the mysqld does not start during boot.
 >  
 >  The problem is "located" in mysqld_safe.
 >  
 >  Prior the logging is realy setup, a message is send by log_notice (or 
 >  similar) to the stdout. (Same happens if I try not to all the 
 >  shell-funtion and just echo the line.)
 >  
 >  It looks like the login process on the console has already started and 
 >  all previous fd's to /dev/console has been revoked. Why this simply 
 >  kills the shell I still don't know. And why writing to stdout later is 
 >  ignored without crashing the shell is also a little bit strange.
 >  If I "disable" this output (e.g. by setting the true command in front of 
 >  the line) further output is redirected to the log-file of syslog (not 
 >  tested, but should work too) and the DB-server comes up.
 >  
 >  This is very very bad !!!!!
 >  We seems to have a timing problem during startup here.
 >  
 >  The only known workaround to me is to add a sleep in the rc-file after 
 >  backgrounding mysqld_save. Not very smart and not realy relyable.
 >  
 >  For my system a "sleep 1" is good for all my startup tries (till now). 
 >  So a "sleep 5" should do it for this system with excactly this set of 
 >  programs started during boot.
 >  But this is no sollution - just try, error and hope it wil not break ...
 >  
 >  I try to get the syscall that kills the shell by starting ktrace short 
 >  time in front of the location of the problem - but cannot say how much 
 >  time I need to get a sollution.
 >  The current startup script simply does not work on NetBSD 6.1. With the 
 >  sleep mentioned above the problem can be worked around for unknown reasons.
 >  
 >  best regards
 >  
 >  W. Stukenbrock
 >  
 >  Wolfgang Stukenbrock wrote:
 >  
 >  > The following reply was made to PR pkg/48258; it has been noted by GNATS.
 >  > 
 >  > From: Wolfgang Stukenbrock <wolfgang.stukenbrock@nagler-company.com>
 >  > To: gnats-bugs@NetBSD.org
 >  > Cc: pkg-manager@NetBSD.org, gnats-admin@NetBSD.org, pkgsrc-bugs@NetBSD.org
 >  > Subject: Re: pkg/48258: mysql-server startup files may try to set to high fd-limit in pkgsrc-startup-file
 >  > Date: Wed, 02 Oct 2013 14:32:37 +0200
 >  > 
 >  >  Hi - OK, I haven't tested that again on NetBSD.
 >  >  
 >  >  On Solaris ulimit with a to large value will give an error. (tested 
 >  >  again in /bin/sh and with setrlimit() for some minutes.)
 >  >  
 >  >  On NetBSD there seems to be (now) the feature that ulimit in /bin/sh and 
 >  >  setrlimit() will clamp the parameter passed to the maximum - the hard-limit.
 >  >  
 >  >  So for NetBSD this is working, but for any other system that does not 
 >  >  silently clamp the value it doesn't.
 >  >  I'm not shure about the set of OS's that is affected. At least Solaris 8 is.
 >  >  
 >  >  pkgsrc is for more than "only" NetBSD, so I think it would be better not 
 >  >  to "hope" that the system will truncate to the max.
 >  >  Sorry for not explicitly testing on NetBSD prior sending the report.
 >  >  
 >  >  By The way, I have had this problem with the FD-limit with mysqld in the 
 >  >  past, so that I have added some commandline options in my automated 
 >  >  DB-setup scripts that are executed during system installation, but I'm 
 >  >  not shure about the NetBSD version where I've added this (3.x or 4.x). 
 >  >  It is still in there, even it is (perhaps) now no longer needed.
 >  >  And I remember that my main DB-server has crashed when I try to set a 
 >  >  larger value as the kernel supports in the DB-server-config file - e.g. 
 >  >  when I boot a GENERIC for some reasons - I've increased the hard-limit 
 >  >  in the "normal" kernel for this system. That system currently runs 
 >  >  NetBSD 4.x.
 >  >  
 >  >  just for information (till now):
 >  >  I'm debugging an other problem with the delivered rc-files for 
 >  >  mysql-server 5.5, because the DB-server crashes during startup when 
 >  >  started during system startup on NetBSD 6.1. Calling "/etc/rc.d/mysqld 
 >  >  start" by hand later will bring the deamon up.
 >  >  (It seems to be either mysql 5.5 related or is a problem with NetBSD 
 >  >  6.1, because mysql 5.1 on NetBSD 5.1.2 does not show this problem on 
 >  >  several installations.)
 >  >  Still not found what it is. Without additional debugging inserted the 
 >  >  DB-server runs into SEGV after setting up the socket and prior the 
 >  >  message that it is now listening in the error log. But when started 
 >  >  under ktrace it still does not start, but it now looks like "something" 
 >  >  is shutting down the server during startup (no SEGV anymore), but the 
 >  >  normal shutdown messages are in the error-log file of the DB-server. 
 >  >  Very strange till now ...
 >  >  
 >  >  best regards
 >  >  
 >  >  W. Stukenbrock
 >  >  
 >  >  OBATA Akio wrote:
 >  >  
 >  >  > The following reply was made to PR pkg/48258; it has been noted by GNATS.
 >  >  > 
 >  >  > From: "OBATA Akio" <obache@netbsd.org>
 >  >  > To: gnats-bugs@netbsd.org
 >  >  > Cc: 
 >  >  > Subject: Re: pkg/48258: mysql-server startup files may try to set to high
 >  >  >  fd-limit in pkgsrc-startup-file
 >  >  > Date: Wed, 02 Oct 2013 20:19:35 +0900
 >  >  > 
 >  >  >  On Wed, 02 Oct 2013 20:00:00 +0900, <Wolfgang.Stukenbrock@nagler-company.com> wrote:
 >  >  >  
 >  >  >  >> How-To-Repeat:
 >  >  >  > 	setup a fresh system (e.g. amd64), log in and run "ulimit -Hn". It will report 3404.
 >  >  >  > 	And so setting 4096 in the rc-file will (silently) fail and the server will stay at 128 fd's.
 >  >  >  
 >  >  >  I cannot reproduce it on NetBSD-5.1.2-i386, soft limit will be up to the hard limit:
 >  >  >  
 >  >  >  # ulimit -Hn
 >  >  >  3404
 >  >  >  # ulimit -Sn
 >  >  >  128
 >  >  >  # ulimit -n 4096
 >  >  >  # ulimit -Hn
 >  >  >  3404
 >  >  >  # ulimit -Sn
 >  >  >  3404
 >  >  >  
 >  >  >  -- 
 >  >  >  OBATA Akio / obache@NetBSD.org
 >  >  >  
 >  >  > 
 >  >  > 
 >  >  > Received: from DB3PR07MB171.eurprd07.prod.outlook.com (10.242.132.149) by
 >  >  >  DB3PR07MB169.eurprd07.prod.outlook.com (10.242.132.141) with Microsoft SMTP
 >  >  >  Server (TLS) id 15.0.775.9 via Mailbox Transport; Wed, 2 Oct 2013 11:25:09
 >  >  >  +0000
 >  >  > Received: from DB3PR07CA009.eurprd07.prod.outlook.com (10.242.134.49) by
 >  >  >  DB3PR07MB171.eurprd07.prod.outlook.com (10.242.132.149) with Microsoft SMTP
 >  >  >  Server (TLS) id 15.0.775.9; Wed, 2 Oct 2013 11:25:07 +0000
 >  >  > Received: from AM1FFO11FD017.protection.gbl (2a01:111:f400:7e00::124) by
 >  >  >  DB3PR07CA009.outlook.office365.com (2a01:111:e400:9814::49) with Microsoft
 >  >  >  SMTP Server (TLS) id 15.0.775.9 via Frontend Transport; Wed, 2 Oct 2013
 >  >  >  11:25:07 +0000
 >  >  > Received: from e002.nagler-company.com (212.185.86.227) by
 >  >  >  AM1FFO11FD017.mail.protection.outlook.com (10.174.64.206) with Microsoft SMTP
 >  >  >  Server (TLS) id 15.0.785.10 via Frontend Transport; Wed, 2 Oct 2013 11:25:06
 >  >  >  +0000
 >  >  > Received: from mollari.NetBSD.org (blog.netbsd.org [149.20.53.80])	by
 >  >  >  e002.nagler-company.com (8.14.5/8.14.5) with ESMTP id r92BP2js014397	for
 >  >  >  <Wolfgang.Stukenbrock@nagler-company.com>; Wed, 2 Oct 2013 13:25:06 +0200
 >  >  >  (CEST)
 >  >  > Received: by mollari.NetBSD.org (Postfix, from userid 31008)	id 612697100A;
 >  >  >  Wed,  2 Oct 2013 11:25:01 +0000 (UTC)
 >  >  > From: OBATA Akio <obache@NetBSD.org>
 >  >  > To: <pkg-manager@NetBSD.org>, <gnats-admin@NetBSD.org>,
 >  >  > 	<pkgsrc-bugs@NetBSD.org>, <Wolfgang.Stukenbrock@nagler-company.com>
 >  >  > Reply-To: <gnats-bugs@NetBSD.org>
 >  >  > Subject: Re: pkg/48258: mysql-server startup files may try to set to high
 >  >  >  fd-limit in pkgsrc-startup-file
 >  >  > References: <pr-pkg-48258@gnats.netbsd.org>
 >  >  >   <20131002105744.E5864123B93@test-s0.nagler-company.com>
 >  >  > X-Gnats-Was-Stupid: no
 >  >  > CC:
 >  >  > Message-ID: <20131002112501.612697100A@mollari.NetBSD.org>
 >  >  > Date: Wed, 2 Oct 2013 11:25:01 +0000
 >  >  > Return-Path: gnats@NetBSD.org
 >  >  > X-MS-Exchange-Organization-MessageDirectionality: Incoming
 >  >  > X-Forefront-Antispam-Report: CIP:212.185.86.227;CTRY:DE;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(24454002)(189002)(199002)(43066001)(81342001)(47776003)(20776003)(63696002)(47446002)(74662001)(74502001)(16796002)(50466002)(81542001)(6806004)(77982001)(83072001)(46386002)(45336002)(44976005)(52956002)(42186004)(33656001)(51856001)(83322001)(19580405001)(19580395003)(80976001)(74876001)(70486001)(54356001)(47976001)(76482001)(54316002)(50986001)(49866001)(56776001)(4396001)(47736001)(81686001)(79102001)(81816001)(48376002)(74706001)(59766001)(56816003)(76786001)(77096001)(46102001)(76796001)(69226001)(80022001)(65816001)(74366001)(42262001);DIR:INB;SFP:;SCL:1;SRVR:DB3PR07MB171;H:e002.nagler-company.com;CLIP:212.185.86.227;FPR:;RD:e002.nagler-company.com;MX:1;A:1;LANG:en;
 >  >  > Content-Type: text/plain
 >  >  > X-MS-Exchange-Organization-Network-Message-Id: 83c85e0a-9996-4672-2882-08d08d792ecc
 >  >  > X-MS-Exchange-Organization-AVStamp-Service: 1.0
 >  >  > Received-SPF: None (: NetBSD.org does not designate permitted sender hosts)
 >  >  > X-MS-Exchange-Organization-SCL: 1
 >  >  > X-MS-Exchange-Organization-AuthSource: AM1FFO11FD017.protection.gbl
 >  >  > X-MS-Exchange-Organization-AuthAs: Anonymous
 >  >  > MIME-Version: 1.0
 >  >  > 
 >  >  > The following reply was made to PR pkg/48258; it has been noted by GNATS.
 >  >  > 
 >  >  > From: "OBATA Akio" <obache@netbsd.org>
 >  >  > To: gnats-bugs@netbsd.org
 >  >  > Cc: 
 >  >  > Subject: Re: pkg/48258: mysql-server startup files may try to set to high
 >  >  >  fd-limit in pkgsrc-startup-file
 >  >  > Date: Wed, 02 Oct 2013 20:19:35 +0900
 >  >  > 
 >  >  >  On Wed, 02 Oct 2013 20:00:00 +0900, <Wolfgang.Stukenbrock@nagler-company.com> wrote:
 >  >  >  
 >  >  >  >> How-To-Repeat:
 >  >  >  > 	setup a fresh system (e.g. amd64), log in and run "ulimit -Hn". It will report 3404.
 >  >  >  > 	And so setting 4096 in the rc-file will (silently) fail and the server will stay at 128 fd's.
 >  >  >  
 >  >  >  I cannot reproduce it on NetBSD-5.1.2-i386, soft limit will be up to the hard limit:
 >  >  >  
 >  >  >  # ulimit -Hn
 >  >  >  3404
 >  >  >  # ulimit -Sn
 >  >  >  128
 >  >  >  # ulimit -n 4096
 >  >  >  # ulimit -Hn
 >  >  >  3404
 >  >  >  # ulimit -Sn
 >  >  >  3404
 >  >  >  
 >  >  >  -- 
 >  >  >  OBATA Akio / obache@NetBSD.org
 >  >  >  
 >  >  > 
 >  >  
 >  >  
 >  >  -- 
 >  >  
 >  >  
 >  >  Dr. Nagler & Company GmbH
 >  >  Hauptstraße 9
 >  >  92253 Schnaittenbach
 >  >  
 >  >  Tel. +49 9622/71 97-42
 >  >  Fax +49 9622/71 97-50
 >  >  
 >  >  Wolfgang.Stukenbrock@nagler-company.com
 >  >  http://www.nagler-company.com
 >  >  
 >  >  
 >  >  Hauptsitz: Schnaittenbach
 >  >  Handelregister: Amberg HRB
 >  >  Gerichtsstand: Amberg
 >  >  Steuernummer: 201/118/51825
 >  >  USt.-ID-Nummer: DE 273143997
 >  >  Geschäftsführer: Dr. Martin Nagler
 >  >  
 >  >  
 >  > 
 >  > 
 >  > Received: from AMXPR07MB165.eurprd07.prod.outlook.com (10.242.68.150) by
 >  >  DB3PR07MB169.eurprd07.prod.outlook.com (10.242.132.141) with Microsoft SMTP
 >  >  Server (TLS) id 15.0.775.9 via Mailbox Transport; Wed, 2 Oct 2013 12:35:18
 >  >  +0000
 >  > Received: from AMXPR07CA001.eurprd07.prod.outlook.com (10.242.64.41) by
 >  >  AMXPR07MB165.eurprd07.prod.outlook.com (10.242.68.150) with Microsoft SMTP
 >  >  Server (TLS) id 15.0.775.9; Wed, 2 Oct 2013 12:35:14 +0000
 >  > Received: from AM1FFO11FD009.protection.gbl (2a01:111:f400:7e00::107) by
 >  >  AMXPR07CA001.outlook.office365.com (2a01:111:e400:1000::41) with Microsoft
 >  >  SMTP Server (TLS) id 15.0.785.10 via Frontend Transport; Wed, 2 Oct 2013
 >  >  12:35:13 +0000
 >  > Received: from e002.nagler-company.com (212.185.86.227) by
 >  >  AM1FFO11FD009.mail.protection.outlook.com (10.174.65.98) with Microsoft SMTP
 >  >  Server (TLS) id 15.0.785.10 via Frontend Transport; Wed, 2 Oct 2013 12:35:11
 >  >  +0000
 >  > Received: from mollari.NetBSD.org (mollari.netbsd.org [149.20.53.80])	by
 >  >  e002.nagler-company.com (8.14.5/8.14.5) with ESMTP id r92CZ3v4016739	for
 >  >  <Wolfgang.Stukenbrock@nagler-company.com>; Wed, 2 Oct 2013 14:35:06 +0200
 >  >  (CEST)
 >  > Received: by mollari.NetBSD.org (Postfix, from userid 31008)	id A2F2F7100A;
 >  >  Wed,  2 Oct 2013 12:35:00 +0000 (UTC)
 >  > From: Wolfgang Stukenbrock <wolfgang.stukenbrock@nagler-company.com>
 >  > To: <pkg-manager@NetBSD.org>, <gnats-admin@NetBSD.org>,
 >  > 	<pkgsrc-bugs@NetBSD.org>, <Wolfgang.Stukenbrock@nagler-company.com>
 >  > Reply-To: <gnats-bugs@NetBSD.org>
 >  > Subject: Re: pkg/48258: mysql-server startup files may try to set to high fd-limit in pkgsrc-startup-file
 >  > References: <pr-pkg-48258@gnats.netbsd.org>
 >  >   <20131002105744.E5864123B93@test-s0.nagler-company.com>
 >  > X-Gnats-Was-Stupid: no
 >  > CC:
 >  > Message-ID: <20131002123500.A2F2F7100A@mollari.NetBSD.org>
 >  > Date: Wed, 2 Oct 2013 12:35:00 +0000
 >  > Return-Path: gnats@NetBSD.org
 >  > X-MS-Exchange-Organization-MessageDirectionality: Incoming
 >  > X-Forefront-Antispam-Report: CIP:212.185.86.227;CTRY:DE;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(51704005)(199002)(189002)(24454002)(52034003)(54316002)(56776001)(45336002)(47446002)(79102001)(43066001)(74662001)(47776003)(63696002)(74876001)(20776003)(33656001)(74366001)(77982001)(59766001)(74706001)(50466002)(48376002)(52956002)(65816001)(80976001)(6806004)(16601075003)(81816001)(81686001)(44976005)(51856001)(19580405001)(77096001)(83072001)(76786001)(76796001)(56816003)(49866001)(70486001)(15975445006)(15202345003)(46386002)(69226001)(81542001)(16796002)(81342001)(19580395003)(83322001)(47736001)(4396001)(46102001)(54356001)(47976001)(50986001)(42186004)(24704002)(42882001);DIR:INB;SFP:;SCL:1;SRVR:AMXPR07MB165;H:e002.nagler-company.com;CLIP:212.185.86.227;FPR:;RD:e002.nagler-company.com;A:1;MX:1;LANG:en;
 >  > Content-Type: text/plain
 >  > X-MS-Exchange-Organization-Network-Message-Id: 696f0db6-0bd2-47cd-afb9-08d08d82fa62
 >  > X-MS-Exchange-Organization-AVStamp-Service: 1.0
 >  > Received-SPF: None (: NetBSD.org does not designate permitted sender hosts)
 >  > X-MS-Exchange-Organization-SCL: 1
 >  > X-MS-Exchange-Organization-AuthSource: AM1FFO11FD009.protection.gbl
 >  > X-MS-Exchange-Organization-AuthAs: Anonymous
 >  > MIME-Version: 1.0
 >  > 
 >  > The following reply was made to PR pkg/48258; it has been noted by GNATS.
 >  > 
 >  > From: Wolfgang Stukenbrock <wolfgang.stukenbrock@nagler-company.com>
 >  > To: gnats-bugs@NetBSD.org
 >  > Cc: pkg-manager@NetBSD.org, gnats-admin@NetBSD.org, pkgsrc-bugs@NetBSD.org
 >  > Subject: Re: pkg/48258: mysql-server startup files may try to set to high fd-limit in pkgsrc-startup-file
 >  > Date: Wed, 02 Oct 2013 14:32:37 +0200
 >  > 
 >  >  Hi - OK, I haven't tested that again on NetBSD.
 >  >  
 >  >  On Solaris ulimit with a to large value will give an error. (tested 
 >  >  again in /bin/sh and with setrlimit() for some minutes.)
 >  >  
 >  >  On NetBSD there seems to be (now) the feature that ulimit in /bin/sh and 
 >  >  setrlimit() will clamp the parameter passed to the maximum - the hard-limit.
 >  >  
 >  >  So for NetBSD this is working, but for any other system that does not 
 >  >  silently clamp the value it doesn't.
 >  >  I'm not shure about the set of OS's that is affected. At least Solaris 8 is.
 >  >  
 >  >  pkgsrc is for more than "only" NetBSD, so I think it would be better not 
 >  >  to "hope" that the system will truncate to the max.
 >  >  Sorry for not explicitly testing on NetBSD prior sending the report.
 >  >  
 >  >  By The way, I have had this problem with the FD-limit with mysqld in the 
 >  >  past, so that I have added some commandline options in my automated 
 >  >  DB-setup scripts that are executed during system installation, but I'm 
 >  >  not shure about the NetBSD version where I've added this (3.x or 4.x). 
 >  >  It is still in there, even it is (perhaps) now no longer needed.
 >  >  And I remember that my main DB-server has crashed when I try to set a 
 >  >  larger value as the kernel supports in the DB-server-config file - e.g. 
 >  >  when I boot a GENERIC for some reasons - I've increased the hard-limit 
 >  >  in the "normal" kernel for this system. That system currently runs 
 >  >  NetBSD 4.x.
 >  >  
 >  >  just for information (till now):
 >  >  I'm debugging an other problem with the delivered rc-files for 
 >  >  mysql-server 5.5, because the DB-server crashes during startup when 
 >  >  started during system startup on NetBSD 6.1. Calling "/etc/rc.d/mysqld 
 >  >  start" by hand later will bring the deamon up.
 >  >  (It seems to be either mysql 5.5 related or is a problem with NetBSD 
 >  >  6.1, because mysql 5.1 on NetBSD 5.1.2 does not show this problem on 
 >  >  several installations.)
 >  >  Still not found what it is. Without additional debugging inserted the 
 >  >  DB-server runs into SEGV after setting up the socket and prior the 
 >  >  message that it is now listening in the error log. But when started 
 >  >  under ktrace it still does not start, but it now looks like "something" 
 >  >  is shutting down the server during startup (no SEGV anymore), but the 
 >  >  normal shutdown messages are in the error-log file of the DB-server. 
 >  >  Very strange till now ...
 >  >  
 >  >  best regards
 >  >  
 >  >  W. Stukenbrock
 >  >  
 >  >  OBATA Akio wrote:
 >  >  
 >  >  > The following reply was made to PR pkg/48258; it has been noted by GNATS.
 >  >  > 
 >  >  > From: "OBATA Akio" <obache@netbsd.org>
 >  >  > To: gnats-bugs@netbsd.org
 >  >  > Cc: 
 >  >  > Subject: Re: pkg/48258: mysql-server startup files may try to set to high
 >  >  >  fd-limit in pkgsrc-startup-file
 >  >  > Date: Wed, 02 Oct 2013 20:19:35 +0900
 >  >  > 
 >  >  >  On Wed, 02 Oct 2013 20:00:00 +0900, <Wolfgang.Stukenbrock@nagler-company.com> wrote:
 >  >  >  
 >  >  >  >> How-To-Repeat:
 >  >  >  > 	setup a fresh system (e.g. amd64), log in and run "ulimit -Hn". It will report 3404.
 >  >  >  > 	And so setting 4096 in the rc-file will (silently) fail and the server will stay at 128 fd's.
 >  >  >  
 >  >  >  I cannot reproduce it on NetBSD-5.1.2-i386, soft limit will be up to the hard limit:
 >  >  >  
 >  >  >  # ulimit -Hn
 >  >  >  3404
 >  >  >  # ulimit -Sn
 >  >  >  128
 >  >  >  # ulimit -n 4096
 >  >  >  # ulimit -Hn
 >  >  >  3404
 >  >  >  # ulimit -Sn
 >  >  >  3404
 >  >  >  
 >  >  >  -- 
 >  >  >  OBATA Akio / obache@NetBSD.org
 >  >  >  
 >  >  > 
 >  >  > 
 >  >  > Received: from DB3PR07MB171.eurprd07.prod.outlook.com (10.242.132.149) by
 >  >  >  DB3PR07MB169.eurprd07.prod.outlook.com (10.242.132.141) with Microsoft SMTP
 >  >  >  Server (TLS) id 15.0.775.9 via Mailbox Transport; Wed, 2 Oct 2013 11:25:09
 >  >  >  +0000
 >  >  > Received: from DB3PR07CA009.eurprd07.prod.outlook.com (10.242.134.49) by
 >  >  >  DB3PR07MB171.eurprd07.prod.outlook.com (10.242.132.149) with Microsoft SMTP
 >  >  >  Server (TLS) id 15.0.775.9; Wed, 2 Oct 2013 11:25:07 +0000
 >  >  > Received: from AM1FFO11FD017.protection.gbl (2a01:111:f400:7e00::124) by
 >  >  >  DB3PR07CA009.outlook.office365.com (2a01:111:e400:9814::49) with Microsoft
 >  >  >  SMTP Server (TLS) id 15.0.775.9 via Frontend Transport; Wed, 2 Oct 2013
 >  >  >  11:25:07 +0000
 >  >  > Received: from e002.nagler-company.com (212.185.86.227) by
 >  >  >  AM1FFO11FD017.mail.protection.outlook.com (10.174.64.206) with Microsoft SMTP
 >  >  >  Server (TLS) id 15.0.785.10 via Frontend Transport; Wed, 2 Oct 2013 11:25:06
 >  >  >  +0000
 >  >  > Received: from mollari.NetBSD.org (blog.netbsd.org [149.20.53.80])	by
 >  >  >  e002.nagler-company.com (8.14.5/8.14.5) with ESMTP id r92BP2js014397	for
 >  >  >  <Wolfgang.Stukenbrock@nagler-company.com>; Wed, 2 Oct 2013 13:25:06 +0200
 >  >  >  (CEST)
 >  >  > Received: by mollari.NetBSD.org (Postfix, from userid 31008)	id 612697100A;
 >  >  >  Wed,  2 Oct 2013 11:25:01 +0000 (UTC)
 >  >  > From: OBATA Akio <obache@NetBSD.org>
 >  >  > To: <pkg-manager@NetBSD.org>, <gnats-admin@NetBSD.org>,
 >  >  > 	<pkgsrc-bugs@NetBSD.org>, <Wolfgang.Stukenbrock@nagler-company.com>
 >  >  > Reply-To: <gnats-bugs@NetBSD.org>
 >  >  > Subject: Re: pkg/48258: mysql-server startup files may try to set to high
 >  >  >  fd-limit in pkgsrc-startup-file
 >  >  > References: <pr-pkg-48258@gnats.netbsd.org>
 >  >  >   <20131002105744.E5864123B93@test-s0.nagler-company.com>
 >  >  > X-Gnats-Was-Stupid: no
 >  >  > CC:
 >  >  > Message-ID: <20131002112501.612697100A@mollari.NetBSD.org>
 >  >  > Date: Wed, 2 Oct 2013 11:25:01 +0000
 >  >  > Return-Path: gnats@NetBSD.org
 >  >  > X-MS-Exchange-Organization-MessageDirectionality: Incoming
 >  >  > X-Forefront-Antispam-Report: CIP:212.185.86.227;CTRY:DE;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(24454002)(189002)(199002)(43066001)(81342001)(47776003)(20776003)(63696002)(47446002)(74662001)(74502001)(16796002)(50466002)(81542001)(6806004)(77982001)(83072001)(46386002)(45336002)(44976005)(52956002)(42186004)(33656001)(51856001)(83322001)(19580405001)(19580395003)(80976001)(74876001)(70486001)(54356001)(47976001)(76482001)(54316002)(50986001)(49866001)(56776001)(4396001)(47736001)(81686001)(79102001)(81816001)(48376002)(74706001)(59766001)(56816003)(76786001)(77096001)(46102001)(76796001)(69226001)(80022001)(65816001)(74366001)(42262001);DIR:INB;SFP:;SCL:1;SRVR:DB3PR07MB171;H:e002.nagler-company.com;CLIP:212.185.86.227;FPR:;RD:e002.nagler-company.com;MX:1;A:1;LANG:en;
 >  >  > Content-Type: text/plain
 >  >  > X-MS-Exchange-Organization-Network-Message-Id: 83c85e0a-9996-4672-2882-08d08d792ecc
 >  >  > X-MS-Exchange-Organization-AVStamp-Service: 1.0
 >  >  > Received-SPF: None (: NetBSD.org does not designate permitted sender hosts)
 >  >  > X-MS-Exchange-Organization-SCL: 1
 >  >  > X-MS-Exchange-Organization-AuthSource: AM1FFO11FD017.protection.gbl
 >  >  > X-MS-Exchange-Organization-AuthAs: Anonymous
 >  >  > MIME-Version: 1.0
 >  >  > 
 >  >  > The following reply was made to PR pkg/48258; it has been noted by GNATS.
 >  >  > 
 >  >  > From: "OBATA Akio" <obache@netbsd.org>
 >  >  > To: gnats-bugs@netbsd.org
 >  >  > Cc: 
 >  >  > Subject: Re: pkg/48258: mysql-server startup files may try to set to high
 >  >  >  fd-limit in pkgsrc-startup-file
 >  >  > Date: Wed, 02 Oct 2013 20:19:35 +0900
 >  >  > 
 >  >  >  On Wed, 02 Oct 2013 20:00:00 +0900, <Wolfgang.Stukenbrock@nagler-company.com> wrote:
 >  >  >  
 >  >  >  >> How-To-Repeat:
 >  >  >  > 	setup a fresh system (e.g. amd64), log in and run "ulimit -Hn". It will report 3404.
 >  >  >  > 	And so setting 4096 in the rc-file will (silently) fail and the server will stay at 128 fd's.
 >  >  >  
 >  >  >  I cannot reproduce it on NetBSD-5.1.2-i386, soft limit will be up to the hard limit:
 >  >  >  
 >  >  >  # ulimit -Hn
 >  >  >  3404
 >  >  >  # ulimit -Sn
 >  >  >  128
 >  >  >  # ulimit -n 4096
 >  >  >  # ulimit -Hn
 >  >  >  3404
 >  >  >  # ulimit -Sn
 >  >  >  3404
 >  >  >  
 >  >  >  -- 
 >  >  >  OBATA Akio / obache@NetBSD.org
 >  >  >  
 >  >  > 
 >  >  
 >  >  
 >  >  -- 
 >  >  
 >  >  
 >  >  Dr. Nagler & Company GmbH
 >  >  Hauptstraße 9
 >  >  92253 Schnaittenbach
 >  >  
 >  >  Tel. +49 9622/71 97-42
 >  >  Fax +49 9622/71 97-50
 >  >  
 >  >  Wolfgang.Stukenbrock@nagler-company.com
 >  >  http://www.nagler-company.com
 >  >  
 >  >  
 >  >  Hauptsitz: Schnaittenbach
 >  >  Handelregister: Amberg HRB
 >  >  Gerichtsstand: Amberg
 >  >  Steuernummer: 201/118/51825
 >  >  USt.-ID-Nummer: DE 273143997
 >  >  Geschäftsführer: Dr. Martin Nagler
 >  >  
 >  >  
 >  > 
 >  
 >  
 >  -- 
 >  
 >  
 >  Dr. Nagler & Company GmbH
 >  Hauptstraße 9
 >  92253 Schnaittenbach
 >  
 >  Tel. +49 9622/71 97-42
 >  Fax +49 9622/71 97-50
 >  
 >  Wolfgang.Stukenbrock@nagler-company.com
 >  http://www.nagler-company.com
 >  
 >  
 >  Hauptsitz: Schnaittenbach
 >  Handelregister: Amberg HRB
 >  Gerichtsstand: Amberg
 >  Steuernummer: 201/118/51825
 >  USt.-ID-Nummer: DE 273143997
 >  Geschäftsführer: Dr. Martin Nagler
 >  
 >  
 > 
 > 
 > 
 > 


 -- 


 Dr. Nagler & Company GmbH
 Hauptstraße 9
 92253 Schnaittenbach

 Tel. +49 9622/71 97-42
 Fax +49 9622/71 97-50

 Wolfgang.Stukenbrock@nagler-company.com
 http://www.nagler-company.com


 Hauptsitz: Schnaittenbach
 Handelregister: Amberg HRB
 Gerichtsstand: Amberg
 Steuernummer: 201/118/51825
 USt.-ID-Nummer: DE 273143997
 Geschäftsführer: Dr. Martin Nagler


>Unformatted:

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.