Bug 2804 - When an observer fires for gedit process - Frysk traps it, but then exceptions
Summary: When an observer fires for gedit process - Frysk traps it, but then exceptions
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: 1553
  Show dependency treegraph
 
Reported: 2006-06-19 18:32 UTC by Len DiMaggio
Modified: 2008-10-21 21:40 UTC (History)
0 users

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


Attachments
Screen shot 1 (142.30 KB, image/png)
2006-06-19 18:33 UTC, Len DiMaggio
Details
Screen shot 2 (172.03 KB, image/png)
2006-06-19 18:33 UTC, Len DiMaggio
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Len DiMaggio 2006-06-19 18:32:35 UTC
When an observer fires for gedit process - Frysk traps it, but then exceptions

Related to: http://www.sourceware.org/bugzilla/show_bug.cgi?id=2803

If an observer (e.g., exit notification) is configured to gedit, the observer
correctly traps the process exiting (see attachment 1 [details]). 

If the user opts to block the exit, this exception is raised:

{frysk.proc.LinuxTask@69169c0,pid=16894,tid=16894,state=destroyed} in state
"destroyed" did not handle handleUnblock

frysk.proc.State.unhandled(FryskGui)
frysk.proc.TaskState.handleUnblock(FryskGui)
frysk.proc.Task$2.execute(FryskGui)
frysk.event.EventLoop.runEventLoop(FryskGui)
frysk.event.EventLoop.run(FryskGui)
frysk.gui.Gui$3.run(FryskGui)
java.lang.Thread.run(libgcj.so.7)

If the user opts to continue and not block the exit, this exception is raised
(in a Dialog):

{frysk.proc.LinuxTask@636540,pid=16916,tid=16916,state=destroyed} in state
"destroyed" did not handle handleUnblock

frysk.proc.State.unhandled(FryskGui)
frysk.proc.TaskState.handleUnblock(FryskGui)
frysk.proc.Task$2.execute(FryskGui)
frysk.event.EventLoop.runEventLoop(FryskGui)
frysk.event.EventLoop.run(FryskGui)
frysk.gui.Gui$3.run(FryskGui)
java.lang.Thread.run(libgcj.so.7)

And a large number of these exceptions are written to the console from which
Frysk was started:
java.lang.RuntimeException: Observer [frysk.gui.monitor.ListView@13179b0] is
trying to add itself twice
   at frysk.gui.monitor.GuiObservable.addObserver(FryskGui)
   at frysk.gui.monitor.ListView.add(FryskGui)
   at frysk.gui.monitor.ListView.add(FryskGui)
   at frysk.gui.monitor.ListView$ItemAddedObserver.update(FryskGui)
   at java.util.Observable.notifyObservers(libgcj.so.7)
   at frysk.gui.monitor.GuiObservable.notifyObservers(FryskGui)
   at frysk.gui.monitor.ObservableLinkedList.add(FryskGui)
   at frysk.gui.monitor.GuiProc.add(FryskGui)
   at frysk.gui.sessions.DebugProcess.removeProc(FryskGui)
   at frysk.gui.sessions.DebugProcess$2.update(FryskGui)
   at java.util.Observable.notifyObservers(libgcj.so.7)
   at frysk.gui.monitor.GuiObservable.notifyObservers(FryskGui)
   at frysk.gui.monitor.ObservableLinkedList.remove(FryskGui)
   at
frysk.gui.monitor.datamodels.FlatProcObservableLinkedList$ProcDestroyedObserver$2.run(FryskGui)
   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(FryskGui)
   at frysk.gui.FryskGui.main(FryskGui)

(see attachment 2 [details])
Comment 1 Len DiMaggio 2006-06-19 18:33:34 UTC
Created attachment 1104 [details]
Screen shot 1
Comment 2 Len DiMaggio 2006-06-19 18:33:52 UTC
Created attachment 1105 [details]
Screen shot 2
Comment 3 Len DiMaggio 2006-06-23 13:50:59 UTC
Additional note - the user is also presented with a series of dialogs asking him
to continue or quit - you have to respond to several of these in sequence to
clear the problem.
Comment 4 Phil Muldoon 2006-06-23 14:03:54 UTC
As of this morning I do not see the (Jun 23):

And a large number of these exceptions are written to the console from which
Frysk was started:
java.lang.RuntimeException: Observer [frysk.gui.monitor.ListView@13179b0] is
trying to add itself twice
   at frysk.gui.monitor.GuiObservable.addObserver(FryskGui)

I do see the unhandled core state issues though
Comment 5 Len DiMaggio 2006-06-23 15:52:54 UTC
Update - Frysk as built from CVS on June 21 - on FC5 - when gedit is closed, the
exit notification is trapped, the user is presented with a dialog to block or to
close the process, accepting to close gedit results in a dialog with this being
 displayed: 

{frysk.proc.LinuxTask@d41f60,pid=9103,tid=9103,state=destroyed} in state
"destroyed" did not handle handleUnblock

frysk.proc.State.unhandled(FryskGui)
frysk.proc.TaskState.handleUnblock(FryskGui)
frysk.proc.Task$2.execute(FryskGui)
frysk.event.EventLoop.runEventLoop(FryskGui)
frysk.event.EventLoop.run(FryskGui)
frysk.gui.Gui$3.run(FryskGui)
java.lang.Thread.run(libgcj.so.7)
Comment 6 Len DiMaggio 2006-06-23 16:01:43 UTC
I'm also seeing the same behavior in comment #5 on RHEL4
Comment 7 Len DiMaggio 2006-07-05 15:56:33 UTC
Verified that this bug is fixed - the exception is not raied - as of Frysk built
from CVS head on 20060629.
Comment 8 Andrew Cagney 2006-07-11 15:56:21 UTC
Fixed by this:

2006-06-27  Andrew Cagney  <cagney@redhat.com>
            Phil Muldoon  <pmuldoon@redhat.com>
            Sami Wagiaalla  <swagiaal@redhat.com>

        * TestTaskObserverBlocked.java
        (testRefreshAfterUnblockedForkExits): New test.
        * TaskState.java: In "detachedBlocked" state, remember to
        transition to "detached" when the last blocking observer is
        removed.

Comment 9 Stepan Kasal 2007-02-07 19:44:29 UTC
No, the change quoted in comment #8, cannot by itself be the fix.

The problem has been reproduced on RHEL 4 with 2006-06-28 build, which contained
the change. But it did not manifest itself on an FC5 system. (Reported by Len.)

Since then, the RHEL 4 rpm contains a workaround patch (by Sami).

It seems this should be verified once more, with a ``clean'' build on RHEL 4.