RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1607938 - documentation of WCOREDUMP() vs. setrlimit()
Summary: documentation of WCOREDUMP() vs. setrlimit()
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: man-pages
Version: 7.5
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Nikola Forró
QA Contact: BaseOS QE - Apps
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-07-24 15:02 UTC by Eric Blake
Modified: 2021-02-15 07:40 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-02-15 07:40:53 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Sourceware 23449 0 None None None 2019-08-07 13:00:33 UTC

Description Eric Blake 2018-07-24 15:02:15 UTC
Description of problem:
From an IRC conversation:
<eblake> does anyone know if waitpid()'s WCOREDUMP() macro reports core dump even when setrlimit() has disabled core dumps (aka 'ulimit -c 0')?
<ajax> eblake: yes it does. see fs/coredump.c:zap_threads() for the details, but in short WCOREDUMP() means whether the signal _would_ produce a core if possible.
<eblake> ajax: thanks. 'man waitpid' and 'man getrlimit' did not make that obvious
<eblake> nor 'man core'
<ajax> yeah, i had to read the kernel to be sure
<ajax> it's a bad habit. i should probably submit a doc patch every time i have to do that

Version-Release number of selected component (if applicable):


How reproducible:
100%

Steps to Reproduce:
1.
2.
3.

Actual results:
no mention of getrlimit near WCOREDUMP in the man pages

Expected results:
document that WCOREDUMP is reliable for detecting if a process would have dumped core, even when no core file was created

Additional info:

Comment 2 Eric Blake 2018-07-24 15:07:33 UTC
<eblake> $ ulimit -S -c 0
<eblake> $ cat foo.c
<eblake> int main(int argc, char **argv) {
<eblake>   return *argv[1];
<eblake> }
<eblake> $ gcc -o foo -Wall foo.c
<eblake> $ ./foo 1
<eblake> $ ./foo
<eblake> Segmentation fault (core dumped)
<eblake> $ 
<eblake> looks like bash detected core dump, even with it disabled

Comment 3 Florian Weimer 2018-07-24 15:11:20 UTC
I submitted this upstream.  Note that a change to the manual pages will have to be requested through the manpages-dev package (the manual pages are completely separate).

Comment 4 Eric Blake 2018-07-24 19:30:41 UTC
(In reply to Florian Weimer from comment #3)
> I submitted this upstream.  Note that a change to the manual pages will have
> to be requested through the manpages-dev package (the manual pages are
> completely separate).

reassigning from glibc to man-pages, then

Comment 5 Eric Blake 2018-07-31 12:12:10 UTC
Hmm - according to this mail:

https://lists.gnu.org/archive/html/qemu-devel/2018-07/msg05842.html

WCOREDUMP() may not be completely reliable on whether a core dump will occur, depending on kernel settings.  I wonder if this bug also needs to be cloned to the kernel to actually make the bit reliable regardless of 'ulimit -c 0'.

Comment 8 RHEL Program Management 2021-02-15 07:40:53 UTC
After evaluating this issue, there are no plans to address it further or fix it in an upcoming release.  Therefore, it is being closed.  If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened.


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