Bug 3088 - differing proc lists between proc picker for debug session and proc picker for source window
Summary: differing proc lists between proc picker for debug session and proc picker fo...
Status: NEW
Alias: None
Product: frysk
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Unassigned
URL:
Keywords:
Depends on:
Blocks: 1633 3401
  Show dependency treegraph
 
Reported: 2006-08-18 13:01 UTC by Rick Moseley
Modified: 2008-03-18 14:57 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rick Moseley 2006-08-18 13:01:36 UTC
When I ssh into frysk-boston.redhat.com using "ssh -X" and start frysk I get
differing results when I bring up process lists.  When I try to define a new
debug session by clicking on the "New" button I get no processes in the "Process
Groups" pane to select for monitoring.  If I go back to the startup window and
try to bring up a process to debug with a source window I get a list of
processes that I own.

I would think these 2 lists would be generated close to the same way.  Not sure
what is going on.
Comment 1 Sami Wagiaalla 2007-03-19 20:02:09 UTC
Although the "debug list" is no longer present. I think this can be attributed
to the fact that that list was too optimistic.

Does the process list miss any processies which are actually debuggable ?

the smaller list relys on this -strict- function to figure out what processes
are debuggable:

/**
	 * Returns wether this user owns this process
	 * or not.
     * Checks uid and gid.
     * Checks if the given process is this frysk process if so
     * returns false.
     * Also checks that the user has acces to /pro/exe if not
     * false is returned.
	 * @return boolean; true of the user owns this
	 * process, and can debug it false otherwise;
	 */
	public boolean isOwned(){
		boolean owned = false;
		try {
			owned = (this.proc.getUID() == Manager.host.getSelf().getUID() ||
					this.proc.getGID() == Manager.host.getSelf().getGID());
                    
            if (owned)
              if (this.proc.getPid() == Manager.host.getSelf().getPid())
                      owned = false;
            
            try{
              proc.getExe();
            }catch(Exception e){
              owned = false;
              return owned;
            }
		} catch (Exception e) {
			errorLog.log(Level.WARNING, "GuiProc.isOwned: Error checking host/proc
ownership",e);
		}
		
		return owned;
	}