Bug 194089 - tgkill(2) tgid of -1 is described contrarily in tkill(2) and tgkill(2) man pages
Summary: tgkill(2) tgid of -1 is described contrarily in tkill(2) and tgkill(2) man pages
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel (Show other bugs)
(Show other bugs)
Version: 5
Hardware: All Linux
Target Milestone: ---
Assignee: Ingo Molnar
QA Contact: Brian Brock
Whiteboard: bzcl34nup
Depends On:
TreeView+ depends on / blocked
Reported: 2006-06-05 18:07 UTC by William Kucharski
Modified: 2008-05-06 21:06 UTC (History)
4 users (show)

Fixed In Version: fc7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-05-06 15:58:54 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description William Kucharski 2006-06-05 18:07:26 UTC
Description of problem:
tgkill is documented in the tkill(2) and tgkill(2) man pages inconsistantly.

The man page for tkill(2) states:

       The tgkill() call improves on tkill() by allowing the caller to specify
       the  thread  group ID of the thread to be signalled, protecting against
       TID reuse. If the tgid is specified as -1,  tgkill()  degenerates  into

But the man page for tgkill(2) states:

              tgkill returns this error if pid or tgid  are  less  than  zero.
              This call is only valid for single tasks.

Testing the call with a tgid of -1 shows it does return -1 with errno set to

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

All, tested on 2.6.16-1.2122_FC5 for x86.

How reproducible:

Call the tgkill syscall with a tgid of -1.

Steps to Reproduce:
1.  Call the tgkill() syscall with a tgid of -1
2.  Watch it return -1 and set errno to EINVAL

Actual results:

Call returns -1 with errno set to EINVAL.

Expected results:

Correct according to the tgkill(2) man page, incorrect behavior according
to the tkill(2) man page.

Additional info:
It needs to be determined whether the syscall should work as documented in
tkill(2) or tgkill(2) and the documentation modified accordingly.  If the
documentation for tkill(2) is to be followed, the syscall needs to be modified
to support the documented method of operation and the man page for tgkill(2)
should be corrected.

If this is determined to be a documentation bug only, the "component" field
should be changed, but ONLY after determining that it is the tkill(2) man page
that is incorrect.

Comment 1 Dave Jones 2006-10-16 20:26:27 UTC
A new kernel update has been released (Version: 2.6.18-1.2200.fc5)
based upon a new upstream kernel release.

Please retest against this new kernel, as a large number of patches
go into each upstream release, possibly including changes that
may address this problem.

This bug has been placed in NEEDINFO state.
Due to the large volume of inactive bugs in bugzilla, if this bug is
still in this state in two weeks time, it will be closed.

Should this bug still be relevant after this period, the reporter
can reopen the bug at any time. Any other users on the Cc: list
of this bug can request that the bug be reopened by adding a
comment to the bug.

In the last few updates, some users upgrading from FC4->FC5
have reported that installing a kernel update has left their
systems unbootable. If you have been affected by this problem
please check you only have one version of device-mapper & lvm2
installed.  See bug 207474 for further details.

If this bug is a problem preventing you from installing the
release this version is filed against, please see bug 169613.

If this bug has been fixed, but you are now experiencing a different
problem, please file a separate bug for the new problem.

Thank you.

Comment 2 William Kucharski 2006-10-17 02:10:56 UTC
The discrepancy in documentation still exists today, and this program still
returns EINVAL run against 2.6.18-1.2200.fc5smp:

#include <syscall.h>

        if (syscall(SYS_tgkill, -1, getpid(), 9) < 0)

Comment 3 Kylene J Hall 2006-12-05 18:51:14 UTC
This is also a bug in RHEL5 Beta2

Comment 4 Bug Zapper 2008-04-04 03:02:27 UTC
Fedora apologizes that these issues have not been resolved yet. We're
sorry it's taken so long for your bug to be properly triaged and acted
on. We appreciate the time you took to report this issue and want to
make sure no important bugs slip through the cracks.

If you're currently running a version of Fedora Core between 1 and 6,
please note that Fedora no longer maintains these releases. We strongly
encourage you to upgrade to a current Fedora release. In order to
refocus our efforts as a project we are flagging all of the open bugs
for releases which are no longer maintained and closing them.

If this bug is still open against Fedora Core 1 through 6, thirty days
from now, it will be closed 'WONTFIX'. If you can reporduce this bug in
the latest Fedora version, please change to the respective version. If
you are unable to do this, please add a comment to this bug requesting
the change.

Thanks for your help, and we apologize again that we haven't handled
these issues to this point.

The process we are following is outlined here:

We will be following the process here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping to ensure this
doesn't happen again.

And if you'd like to join the bug triage team to help make things
better, check out http://fedoraproject.org/wiki/BugZappers

Comment 5 Bug Zapper 2008-05-06 15:58:52 UTC
This bug is open for a Fedora version that is no longer maintained and
will not be fixed by Fedora. Therefore we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen thus bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 6 William Kucharski 2008-05-06 21:06:41 UTC
The man page for tkill(2) has been modified such that it no longer references
tgkill(2), resolving the discrepancy.

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