Bug 4092 - Make fcatch work with multithreaded programs.
Summary: Make fcatch work with multithreaded programs.
Alias: None
Product: frysk
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Mike Cvet
Depends on:
Blocks: 3361
  Show dependency treegraph
Reported: 2007-02-22 22:32 UTC by Mike Cvet
Modified: 2007-02-23 15:09 UTC (History)
0 users

See Also:
Last reconfirmed:


Note You need to log in before you can comment on or make changes to this bug.
Description Mike Cvet 2007-02-22 22:32:29 UTC
Right now, it only grabs the one signaled thread because /proc becomes 
unreadable before a TerminatingObserver updates.
Comment 1 Mike Cvet 2007-02-23 15:09:09 UTC
2007-02-23  Mike Cvet  <mcvet@redhat.com>

	* FCatch.java (Blocker): Added. TaskObserver.Instruction blocking
	observer class.
	(signalObserver): Added. Add the same SignalObserver to each of the
	(generateStackTrace): Decrement the numTasks counter.
	(removeObservers): Removed.
	(handleTaskBlock): Added. Switches on the signal value to appropriate 
	update the stack trace StringBuffer. If all the tasks of the process 
	have passed through, prints the StringBuffer and unblocks all the tasks.
	Fixes #3932.
	(CatchObserver.updateAttached): Initialize the global SignalObserver if 
	it is null, and add to each task that passes through.
	(CatchObserver.updateTerminating): Removed eventloop stopping code.
	(CatchObserver.updateTerminated): Requests a stop from the eventloop if 
	all the Tasks have completed stack tracing and are unblocked and
	terminated. Fixes #3932.
	(SignalObserver.updateSignaled): Assign some global variables from the 
	signaled Task. Moved switch statement and stack trace calls to 
	handleTaskBlock(). Block each of the threads of the process with an
	InstructionObserver. Fixes #4092.