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



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




Home | Main Index | Thread Index | Old Index