Bug 3932 - fcatch may not exit on some programs
Summary: fcatch may not exit on some 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-01-29 18:10 UTC by Phil Muldoon
Modified: 2007-02-23 15:09 UTC (History)
0 users

See Also:
Last reconfirmed:

The rather evil little segfaulter, added as an attachment. (729 bytes, text/plain)
2007-01-29 18:11 UTC, Phil Muldoon

Note You need to log in before you can comment on or make changes to this bug.
Description Phil Muldoon 2007-01-29 18:10:38 UTC
[pmuldoon@localhost bindir]$ gcc -g  ~/segfault.c -o ~/segfault -lpthread
[pmuldoon@localhost bindir]$ fcatch ~/segfault
Print Entry Thread 1
Print Entry Thread 2
SIGSEGV detected: dumping stack trace
#0 0x804851f in main () from: /home/pmuldoon/segfault.c#36
#1 0x4da7ff2c in __libc_start_main ()
#2 0x8048411 in _start ()

fcatch does not exit, but seems to sit waiting hanging at the console.

System is Fedora Core 6

[pmuldoon@localhost frysk_bin]$ uname -a
Linux localhost.localdomain 2.6.19-1.2895.fc6 #1 SMP Wed Jan 10 19:28:18 EST
2007 i686 i686 i386 GNU/Linux
Comment 1 Phil Muldoon 2007-01-29 18:11:23 UTC
Created attachment 1524 [details]
The rather evil little segfaulter, added as an attachment.
Comment 2 Mike Cvet 2007-02-23 15:09:03 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.