Bug 4399 - Continue/Stop in Source WIndow causes ptrace to backtrace
Summary: Continue/Stop in Source WIndow causes ptrace to backtrace
Status: RESOLVED FIXED
Alias: None
Product: frysk
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Mike Cvet
URL:
Keywords:
Depends on:
Blocks: 1633 4193
  Show dependency treegraph
 
Reported: 2007-04-20 14:44 UTC by Rick Moseley
Modified: 2007-04-23 16:01 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 2007-04-20 14:44:58 UTC
After adding a new executable to the source window via the "Run Executable"
option off of the "File" menu, a backtrace is "occasionally" generated when I do
a "Continue" and then a "Stop".  The following backtrace occurs:

Call stack is broken - couldn't unwind!
ptrace: No such process (pt 0xc, pid 2232, addr 0x0, data 0x20bc1e8)
   at frysk.sys.Ptrace$RegisterSet.get(Ptrace.cxx:159)
   at frysk.sys.PtraceServer$RegisterSetRequest.execute(PtraceServer.java:199)
   at frysk.sys.Server.run(Server.java:142)
java.lang.NullPointerException
   at frysk.rt.StackFrame.getSymbol(StackFrame.java:244)
   at frysk.gui.srcwin.SourceWindow.populateStackBrowser(SourceWindow.java:609)
   at frysk.gui.srcwin.SourceWindow$LockObserver$37.run(SourceWindow.java:2867)
   at org.gnu.glib.CustomEvents.runEvents(libgtkjava-2.8.so)
   at org.gnu.gtk.Gtk.gtk_main(libgtkjava-2.8.so)
   at org.gnu.gtk.Gtk.main(libgtkjava-2.8.so)
   at frysk.gui.Gui.gui(Gui.java:244)
   at frysk.gui.FryskGui.main(FryskGui.java:59)
Comment 1 Rick Moseley 2007-04-20 14:46:51 UTC
Ooops.  Put wrong blocker on.
Comment 2 Mike Cvet 2007-04-23 17:01:11 UTC
2007-04-23  Mike Cvet  <mcvet@redhat.com>

	* SteppingEngine.java (contextMap): Changed to synchronized HashMap.
	(tasks, stateProc, taskStepCount, current): Removed.
	(threadsList): Added. List of Tasks to be blocked.
	(setProc): Heavily cleaned up, fixed to use threadsList.
	(setProcs): Ditto.
	(addProc): Dito.
	(stepInstruction): Ditto. Uses contextMap to keep track of number of
	stepping threads.
	(setUpLineStep): Removed reference to taskStepCount.
	(setUpStepNextInstruction): Ditto.
	(setUpStepOver): Ditto.
	(setUpStepOut): Ditto.
	(continueExecution): Removed reference to old Tasks array.
	(stop): Ditto. Ensure that Tasks don't get added to threadsList
	more than once. Synchronized on threadsList.
	(blockTask): Removed.
	(executeTasks): Made use of threadsList.
	(isProcRunning): Assume if Task no longer exists in SteppingEngine
	data structures, it has exited and thus not running. Fixes #4401.
	(isTaskRunning): Ditto.
	(updateExecuted): Check number of remaining Tasks to be blocked before
	notifying any Observers. Update the number of remaining Tasks in the
	contextMap. If there are Tasks to be blocked, block them and return.
	Fixes #4399.
	(requestAdd): Rewritten. Faster, empties Tasks out of threadsList and
	blocks each as individual Tasks rather than threads of a process.
	(ThreadLifeObservable): Initialize threadsList.
	(ThreadLifeObservable.updateClonedOffspring): Don't explicitly block
	new Tasks with the steppingObserver. Update contextMap with new Task
	and put new Task in threadsList. Fixes #4399.