Bug 584154 - ps <pid> does not work if <pid> belongs to a lwp
Summary: ps <pid> does not work if <pid> belongs to a lwp
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: procps-ng
Version: 23
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Jaromír Cápík
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-04-20 20:32 UTC by Elliott Forney
Modified: 2016-12-20 12:02 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-12-20 12:02:43 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Elliott Forney 2010-04-20 20:32:39 UTC
Description of problem:

ps <pid> does not show anything if <pid> belongs to a light weight process. 
Same is true for

ps -p <pid>

and

ps --pid <pid>

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

procps-3.2.8-3

How reproducible:

Always.

Steps to Reproduce:
1.  Start a job that spawns a lwp
2.  Identify pid of lwp with top or ps -Lelf | grep <command>
3.  Run ps -p <pid>
  
Actual results:

Shows nothing.

Expected results:

Process information.

Additional info:

I'm pretty sure this used to work at some point because I have a script that identifies processes this way and renices them when appropriate.  It used to get light weight processes too but I realized that it now only gets heavy weight processes.  Thanks!

Comment 1 Elliott Forney 2010-04-20 21:10:48 UTC
So it looks like ps may have never behaved like I expected, at least not any time recently.  I just tried it on RHEL 5 with procps-3.2.7 and it doesn't show lwp's there either.  My apologies.  However, I do think it would make sense for ps to behave as described, at least when the -L option is given.

Comment 2 Fedora Admin XMLRPC Client 2010-05-20 12:30:24 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 3 Bug Zapper 2010-11-03 16:41:47 UTC
This message is a reminder that Fedora 12 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 12.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '12'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 12's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 12 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 4 Jan Görig 2010-12-02 13:48:56 UTC
Moving to Rawhide.

Comment 5 Fedora Admin XMLRPC Client 2011-05-12 08:56:32 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 6 Jaromír Cápík 2012-05-11 12:03:00 UTC
Hello Eliott.

Sorry for no response for a long time.
I quickly analysed the issue and it seems that LWP processes are not exported in the /proc filesystem by the kernel. 

Just try to type the following file with cat (and replace the <pid> placeholder with the LWP pid):

  cat /proc/<pid>/stat

or simply check if the /proc/<pid> directory exists ... 

So ... this doesn't look like a procps issue. This could be understood as a new procps feature if any way how to get the information from /proc exists. Maybe you would like to change the component to kernel ?

Please, let me know.

Regards,
Jaromir.

Comment 7 Jaromír Cápík 2012-05-11 12:07:13 UTC
Sorry for the typo in your name.

Comment 8 Jaromír Cápík 2012-06-29 18:15:39 UTC
Hello Elliott.

I just found, that this is a bit tricky. Directory listing of /proc doesn't show LWPs, but if you try to read from /proc/<LWP>/stat, the file exists and is readable. So, the path needs to be fully specified by hand without autocompletion with TAB. I'll try to continue with the investigation.

Regards,
Jaromir.

Comment 9 Fedora End Of Life 2013-04-03 20:05:17 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 19 development cycle.
Changing version to '19'.

(As we did not run this process for some time, it could affect also pre-Fedora 19 development
cycle bugs. We are very sorry. It will help us with cleanup during Fedora 19 End Of Life. Thank you.)

More information and reason for this action is here:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora19

Comment 10 Fedora End Of Life 2015-01-09 21:43:28 UTC
This message is a notice that Fedora 19 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 19. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained. Approximately 4 (four) weeks from now this bug will
be closed as EOL if it remains open with a Fedora 'version' of '19'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 19 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 11 Fedora End Of Life 2015-02-18 13:26:26 UTC
Fedora 19 changed to end-of-life (EOL) status on 2015-01-06. Fedora 19 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

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

Comment 12 Jan Kurik 2015-07-15 15:19:39 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 23 development cycle.
Changing version to '23'.

(As we did not run this process for some time, it could affect also pre-Fedora 23 development
cycle bugs. We are very sorry. It will help us with cleanup during Fedora 23 End Of Life. Thank you.)

More information and reason for this action is here:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora23

Comment 13 Fedora End Of Life 2016-11-24 10:27:23 UTC
This message is a reminder that Fedora 23 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 23. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '23'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 23 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 14 Fedora End Of Life 2016-12-20 12:02:43 UTC
Fedora 23 changed to end-of-life (EOL) status on 2016-12-20. Fedora 23 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

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


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