Bug 2650

Summary: fork observer fails with handleUnblock not handled in state detached
Product: frysk Reporter: Stan Cox <scox>
Component: generalAssignee: Andrew Cagney <cagney>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: P1    
Version: unspecified   
Target Milestone: ---   
Host: Target:
Build: Last reconfirmed:

Description Stan Cox 2006-05-10 21:42:01 UTC
To reproduce the error:
{frysk.proc.LinuxTask@31b8b7b5,pid=22252,tid=22252,state=detached} in state
"detached" 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)

FryskGui -> select Bash process -> add Fork Observer
(in bash process) ls
Comment 1 Stan Cox 2006-05-15 18:31:41 UTC
This seems to fix the symptoms in FryskGui (not committed/no core test yet):

@@ -191,6 +191,13 @@ class TaskState
                task.sendAttach ();
                return attaching;
            }
+           TaskState handleUnblock (Task task,
+                                    TaskObserver observer)
+           {
+               logger.log (Level.FINE, "{0} handleUnblock\n", task);
+               return detached;
+           }
        };

     /**
Comment 2 Andrew Cagney 2006-05-17 13:38:55 UTC
FYI, something else is likely wrong.  I don't think the GUI code would
deliberatly unblock a detached task - such a task, by definition, has no
observers so could never be blocked.

A modification of that patch so that it notifies that the operation failed (call
observer.addFailed is a little screwie but probably ok) would make sense.
Comment 3 Stan Cox 2006-05-19 20:39:30 UTC

*** This bug has been marked as a duplicate of 2628 ***