Bug 314461 - bash using incorrect block size with limits
Summary: bash using incorrect block size with limits
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: bash
Version: 8
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Roman Rakus
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-10-01 18:41 UTC by Daniel Qarras
Modified: 2014-01-13 00:06 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2008-06-25 12:29:36 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Daniel Qarras 2007-10-01 18:41:31 UTC
On a Fedora 7 I have set following limits (only) on /etc/security/limits.conf:

*               soft    core            0
*               hard    core            32768

When I use bash I get this:

$ ulimit -Hc
32768

But with zsh I get this:

$ ulimit -Hc
65536

Reading the standards below it seems unambiguous that the correct block size
should be 512:

http://www.opengroup.org/onlinepubs/000095399/utilities/ulimit.html
http://www.opengroup.org/onlinepubs/009695399/functions/ulimit.html

However, http://ftp.gnu.org/gnu/bash/bash-3.2.tar.gz has the following in
bash-3.2/builtins/ulimit.def:

static RESOURCE_LIMITS limits[] = {
#ifdef RLIMIT_CORE
  { 'c',        RLIMIT_CORE,  1024,     "core file size",      
"blocks" },
#endif

Same goes for several other limits.

FWIW, zsh and ksh are using 512 and bash and tcsh are using 1024. I think bash
should be fixed. I'll open another case against tcsh.

Comment 1 Daniel Qarras 2007-10-01 18:44:44 UTC
The bug against tcsh is Bug 314471.

Comment 2 Daniel Qarras 2007-10-01 18:58:04 UTC
Actually, when reading /etc/security/limits.conf it says:

#<item> can be one of the following:
#        - core - limits the core file size (KB)

So tcsh is working correctly here, only bash is incorrect here.

Comment 3 Pete Graner 2007-10-01 19:06:03 UTC
Looks like a bug, however to be sure I've sent a query to the upstream
maintainers to get their take on it. More once I have it.

Comment 4 Daniel Qarras 2007-10-12 20:53:12 UTC
Thanks for the info. Would be nice to get this fixed for F8.

Comment 5 Daniel Qarras 2007-12-29 16:15:37 UTC
Still exists in Fedora 8. Upstream will be probably fixed in the next version
according to mailing list discussions.

Comment 6 Roman Rakus 2008-06-25 12:29:36 UTC
Yep. As in Comment #5 -> close upstream


Note You need to log in before you can comment on or make changes to this bug.