pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pkg/48258: mysql-server startup files may try to set to high fd-limit in pkgsrc-startup-file



The following reply was made to PR pkg/48258; it has been noted by GNATS.

From: Wolfgang Stukenbrock <wolfgang.stukenbrock%nagler-company.com@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: pkg-manager%NetBSD.org@localhost, gnats-admin%NetBSD.org@localhost, 
pkgsrc-bugs%NetBSD.org@localhost
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@localhost>
 > To: gnats-bugs%NetBSD.org@localhost
 > Cc: pkg-manager%NetBSD.org@localhost, gnats-admin%NetBSD.org@localhost, 
 > pkgsrc-bugs%NetBSD.org@localhost
 > 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@localhost>
 >  > To: gnats-bugs%NetBSD.org@localhost
 >  > Cc: pkg-manager%NetBSD.org@localhost, gnats-admin%NetBSD.org@localhost, 
 > pkgsrc-bugs%NetBSD.org@localhost
 >  > 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@localhost>
 >  >  > To: gnats-bugs%netbsd.org@localhost
 >  >  > 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@localhost> 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@localhost
 >  >  >  
 >  >  > 
 >  >  > 
 >  >  > 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@localhost>; 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@localhost>
 >  >  > To: <pkg-manager%NetBSD.org@localhost>, 
 > <gnats-admin%NetBSD.org@localhost>,
 >  >  >        <pkgsrc-bugs%NetBSD.org@localhost>, 
 > <Wolfgang.Stukenbrock%nagler-company.com@localhost>
 >  >  > Reply-To: <gnats-bugs%NetBSD.org@localhost>
 >  >  > 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@localhost>
 >  >  >   <20131002105744.E5864123B93%test-s0.nagler-company.com@localhost>
 >  >  > X-Gnats-Was-Stupid: no
 >  >  > CC:
 >  >  > Message-ID: <20131002112501.612697100A%mollari.NetBSD.org@localhost>
 >  >  > Date: Wed, 2 Oct 2013 11:25:01 +0000
 >  >  > Return-Path: gnats%NetBSD.org@localhost
 >  >  > 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@localhost>
 >  >  > To: gnats-bugs%netbsd.org@localhost
 >  >  > 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@localhost> 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@localhost
 >  >  >  
 >  >  > 
 >  >  
 >  >  
 >  >  -- 
 >  >  
 >  >  
 >  >  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@localhost
 >  >  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@localhost>; 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@localhost>
 >  > To: <pkg-manager%NetBSD.org@localhost>, 
 > <gnats-admin%NetBSD.org@localhost>,
 >  >   <pkgsrc-bugs%NetBSD.org@localhost>, 
 > <Wolfgang.Stukenbrock%nagler-company.com@localhost>
 >  > Reply-To: <gnats-bugs%NetBSD.org@localhost>
 >  > 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@localhost>
 >  >   <20131002105744.E5864123B93%test-s0.nagler-company.com@localhost>
 >  > X-Gnats-Was-Stupid: no
 >  > CC:
 >  > Message-ID: <20131002123500.A2F2F7100A%mollari.NetBSD.org@localhost>
 >  > Date: Wed, 2 Oct 2013 12:35:00 +0000
 >  > Return-Path: gnats%NetBSD.org@localhost
 >  > 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@localhost>
 >  > To: gnats-bugs%NetBSD.org@localhost
 >  > Cc: pkg-manager%NetBSD.org@localhost, gnats-admin%NetBSD.org@localhost, 
 > pkgsrc-bugs%NetBSD.org@localhost
 >  > 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@localhost>
 >  >  > To: gnats-bugs%netbsd.org@localhost
 >  >  > 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@localhost> 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@localhost
 >  >  >  
 >  >  > 
 >  >  > 
 >  >  > 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@localhost>; 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@localhost>
 >  >  > To: <pkg-manager%NetBSD.org@localhost>, 
 > <gnats-admin%NetBSD.org@localhost>,
 >  >  >        <pkgsrc-bugs%NetBSD.org@localhost>, 
 > <Wolfgang.Stukenbrock%nagler-company.com@localhost>
 >  >  > Reply-To: <gnats-bugs%NetBSD.org@localhost>
 >  >  > 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@localhost>
 >  >  >   <20131002105744.E5864123B93%test-s0.nagler-company.com@localhost>
 >  >  > X-Gnats-Was-Stupid: no
 >  >  > CC:
 >  >  > Message-ID: <20131002112501.612697100A%mollari.NetBSD.org@localhost>
 >  >  > Date: Wed, 2 Oct 2013 11:25:01 +0000
 >  >  > Return-Path: gnats%NetBSD.org@localhost
 >  >  > 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@localhost>
 >  >  > To: gnats-bugs%netbsd.org@localhost
 >  >  > 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@localhost> 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@localhost
 >  >  >  
 >  >  > 
 >  >  
 >  >  
 >  >  -- 
 >  >  
 >  >  
 >  >  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@localhost
 >  >  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@localhost
 >  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@localhost
 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
 
 


Home | Main Index | Thread Index | Old Index