NetBSD Problem Report #53907

From www@NetBSD.org  Fri Jan 25 08:39:43 2019
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 45ACE7A1B5
	for <gnats-bugs@gnats.NetBSD.org>; Fri, 25 Jan 2019 08:39:43 +0000 (UTC)
Message-Id: <20190125083942.70B117A20B@mollari.NetBSD.org>
Date: Fri, 25 Jan 2019 08:39:42 +0000 (UTC)
From: dmarquess@gmail.com
Reply-To: dmarquess@gmail.com
To: gnats-bugs@NetBSD.org
Subject: Default (commented-out) stacksize-cur in /etc/login.conf is too low
X-Send-Pr-Version: www-1.0

>Number:         53907
>Category:       misc
>Synopsis:       Default (commented-out) stacksize-cur in /etc/login.conf is too low
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    misc-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Jan 25 08:40:00 +0000 2019
>Last-Modified:  Fri Jan 25 20:10:01 +0000 2019
>Originator:     Dustin Marquess
>Release:        8.99.31
>Organization:
>Environment:
NetBSD pine64 8.99.31 NetBSD 8.99.31 (GENERIC64) #0: Thu Jan 24 13:05:59 UTC 2019  mkrepro@mkrepro.NetBSD.org:/usr/src/sys/arch/evbarm/compile/GENERIC64 evbarm
>Description:
If somebody edits the default installed /etc/login.conf to uncomment all of the values and then runs cap_mkdb on it, the following output will be seen on the console:

Jan 25 08:25:43 pine64 su: default: setting resource limit stacksize: Invalid argument
Jan 25 08:30:00 pine64 cron[784]: default: setting resource limit stacksize: Invalid argument

This seems to be because the default has ":stacksize-cur=4M:" for the default class and the default stack size that a user gets when they login appears to be 8MB.  Since the limit in login.conf is smaller, the above error gets generated.

I know the values are commented out by default and not used, but I'm a believer that the values in there should be considered examples and should work (and preferably match close to stock).
>How-To-Repeat:
Uncomment the values in /etc/login.conf
>Fix:
Changing the default (commented-out) value to 8M seems to resolve the issue.

>Audit-Trail:
From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@NetBSD.org
Cc: misc-bug-people@netbsd.org, gnats-admin@netbsd.org,
	netbsd-bugs@netbsd.org
Subject: Re: misc/53907: Default (commented-out) stacksize-cur in
 /etc/login.conf is too low
Date: Fri, 25 Jan 2019 09:49:42 +0100

 On Fri, Jan 25, 2019 at 08:40:00AM +0000, dmarquess@gmail.com wrote:

 > I know the values are commented out by default and not used, but I'm
 > a believer that the values in there should be considered examples and
 > should work (and preferably match close to stock).

 The stack size is quite architecture dependend.

 Maybe add a comment to check -current default values before editing
 that file (with pointers to "ulimit" or "limit" sh/csh builtins)?

 Martin

From: Dustin Marquess <dmarquess@gmail.com>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: misc/53907: Default (commented-out) stacksize-cur in
 /etc/login.conf is too low
Date: Fri, 25 Jan 2019 03:07:02 -0600

 That seems fine with me!

 Sorry if this is considered noise.  I've been using those values for
 years, and it never even occurred to me to check first.

 On Fri, Jan 25, 2019 at 2:50 AM Martin Husemann <martin@duskware.de> wrote:
 >
 > The following reply was made to PR misc/53907; it has been noted by GNATS.
 >
 > From: Martin Husemann <martin@duskware.de>
 > To: gnats-bugs@NetBSD.org
 > Cc: misc-bug-people@netbsd.org, gnats-admin@netbsd.org,
 >         netbsd-bugs@netbsd.org
 > Subject: Re: misc/53907: Default (commented-out) stacksize-cur in
 >  /etc/login.conf is too low
 > Date: Fri, 25 Jan 2019 09:49:42 +0100
 >
 >  On Fri, Jan 25, 2019 at 08:40:00AM +0000, dmarquess@gmail.com wrote:
 >
 >  > I know the values are commented out by default and not used, but I'm
 >  > a believer that the values in there should be considered examples and
 >  > should work (and preferably match close to stock).
 >
 >  The stack size is quite architecture dependend.
 >
 >  Maybe add a comment to check -current default values before editing
 >  that file (with pointers to "ulimit" or "limit" sh/csh builtins)?
 >
 >  Martin
 >

From: David Holland <dholland-bugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: misc/53907: Default (commented-out) stacksize-cur in
 /etc/login.conf is too low
Date: Fri, 25 Jan 2019 17:08:36 +0000

 On Fri, Jan 25, 2019 at 08:40:00AM +0000, dmarquess@gmail.com wrote:
  > Jan 25 08:25:43 pine64 su: default: setting resource limit stacksize: Invalid argument
  > Jan 25 08:30:00 pine64 cron[784]: default: setting resource limit stacksize: Invalid argument
  > 
  > This seems to be because the default has ":stacksize-cur=4M:" for
  > the default class and the default stack size that a user gets when
  > they login appears to be 8MB.  Since the limit in login.conf is
  > smaller, the above error gets generated.

 It should be able to make the stack size smaller. It's larger that one
 would expect to fail. Are you sure there isn't something else going on?

 -- 
 David A. Holland
 dholland@netbsd.org

From: Dustin Marquess <dmarquess@gmail.com>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: misc/53907: Default (commented-out) stacksize-cur in
 /etc/login.conf is too low
Date: Fri, 25 Jan 2019 14:06:23 -0600

 If I change the 4M to 8M and rerun cap_mkdb, then the errors disappear.

 So far I only noticed it on evbarm, but it could be because the stack
 size is different than on amd64?

 On Fri, Jan 25, 2019 at 11:10 AM David Holland <dholland-bugs@netbsd.org> wrote:
 >
 > The following reply was made to PR misc/53907; it has been noted by GNATS.
 >
 > From: David Holland <dholland-bugs@netbsd.org>
 > To: gnats-bugs@NetBSD.org
 > Cc:
 > Subject: Re: misc/53907: Default (commented-out) stacksize-cur in
 >  /etc/login.conf is too low
 > Date: Fri, 25 Jan 2019 17:08:36 +0000
 >
 >  On Fri, Jan 25, 2019 at 08:40:00AM +0000, dmarquess@gmail.com wrote:
 >   > Jan 25 08:25:43 pine64 su: default: setting resource limit stacksize: Invalid argument
 >   > Jan 25 08:30:00 pine64 cron[784]: default: setting resource limit stacksize: Invalid argument
 >   >
 >   > This seems to be because the default has ":stacksize-cur=4M:" for
 >   > the default class and the default stack size that a user gets when
 >   > they login appears to be 8MB.  Since the limit in login.conf is
 >   > smaller, the above error gets generated.
 >
 >  It should be able to make the stack size smaller. It's larger that one
 >  would expect to fail. Are you sure there isn't something else going on?
 >
 >  --
 >  David A. Holland
 >  dholland@netbsd.org
 >

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.43 2018/01/16 07:36:43 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.