Operating System - HP-UX
1756906 Members
3927 Online
108857 Solutions
New Discussion юеВ

Same pid, different user?

 
linuxfan
Honored Contributor

Re: Same pid, different user?

Hi Shawn,

The faulty patch was PHCO_10096 (which resulted in top showing incorrect usernames) which was resolved by PHCO_14306 but the latest patch is PHCO_22556

-Ramesh
They think they know but don't. At least I know I don't know - Socrates
Jordan Bean
Honored Contributor

Re: Same pid, different user?

Silly me. Yes, I meant .

Perhaps top is reporting the owner of the tty to which the process is bound rather than the effective uid. This isn't unusual when su is used.

Or perhaps top the defunct process is mangling the search.
Mladen Despic
Honored Contributor

Re: Same pid, different user?

Shawn,

I do not know if it is possible that two different users own the same PID at the same time. I have never seen that happen. If there is no reason for that to happen, then it probably shouldn't.

So, I'm thinking that at least one of the two programs, that report different owners for the same PID, is somehow getting incorrect information about the process. What could be causing this?

Well, it could be a number of things. So, instead of trying to think of all possible reasons, I would try a few commands (as suggested above) and if something unusual does show up, that could be a lead.

Just brainstorming ... Mladen

Les Schuettpelz
Frequent Advisor

Re: Same pid, different user?

Dave Fargo using Les's ITRC login.

The -o option of useradd allows creation of ID's with non-unique UID's. Even if this was done, the who, ps and top programs should work the same in regards to which ID would be returned for a UID.

This problem doesn't appear to have anything to do with non-unique UIDs, but rather PID's which are by definition non-unique, and not in any way "reserved" or "assigned" to a UID. They are assigned when a process is created, only for the life of that process, and then "recycled" sequentially as the PID hits the maximum and wraps around to 1.

It may not seem likely, but in this case, what may have happened is, you looked at a process run by asookraj that had a specific PID, and that process ended, and by the time you looked at that PID again, a process run by georgep had started that re-used that specific PID.