Bug 3147 - Syscall observers fail to attach to some processes
Summary: Syscall observers fail to attach to some processes
Status: RESOLVED FIXED
Alias: None
Product: frysk
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Mark Wielaard
URL:
Keywords:
Depends on:
Blocks: 1524
  Show dependency treegraph
 
Reported: 2006-08-29 15:57 UTC by Phil Muldoon
Modified: 2006-11-22 17:08 UTC (History)
1 user (show)

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


Attachments
Frysk Core Event Log (3.87 KB, text/x-log)
2006-08-29 19:30 UTC, Phil Muldoon
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Phil Muldoon 2006-08-29 15:57:11 UTC
I get this stack trace:

{frysk.proc.LinuxTask@754d7e0,pid=4173,tid=4173,state=runningInSyscall} in state
"runningInSyscall" did not handle handleAddObserver

frysk.proc.State.unhandled(FryskGui)
frysk.proc.TaskState.handleAddObserver(FryskGui)
frysk.proc.Task.handleAddObserver(FryskGui)
frysk.proc.TaskObservation.handleAdd(FryskGui)
frysk.proc.ProcState$3.handleAddObservation(FryskGui)
frysk.proc.Proc.handleAddObservation(FryskGui)
frysk.proc.Proc$6.execute(FryskGui)
frysk.event.EventLoop.runEventLoop(FryskGui)
frysk.event.EventLoop.run(FryskGui)
frysk.gui.Gui$4.run(FryskGui)
java.lang.Thread.run(libgcj.so.7rh)

which relates to this process:

ps -ax | grep 4173

 4173 ?        S      0:00 /bin/sh /usr/lib/firefox-1.5.0.6/run-mozilla.sh
/usr/lib/firefox-1.5.0.6/firefox-bin -UILocale en-US

It seems to happen 3 out of 5 times
Comment 1 Phil Muldoon 2006-08-29 19:21:38 UTC
Sami mentioned something along the lines that this change may have been a side
effect of some recent commits made into SysCall that may have been made by you?
Can you take a look Mark, and see?
Comment 2 Phil Muldoon 2006-08-29 19:28:26 UTC
Unfortunatley I had to reboot my machine, so disgregard PIDS above. In the UI
add a syscall observer to a PID. (I did this via a session). The below exception
is thrown from the core, and handed to the ui.

{frysk.proc.LinuxTask@873240,pid=4151,tid=4151,state=runningInSyscall} in state
"runningInSyscall" did not handle handleAddObserver

frysk.proc.State.unhandled(FryskGui)
frysk.proc.TaskState.handleAddObserver(FryskGui)
frysk.proc.Task.handleAddObserver(FryskGui)
frysk.proc.TaskObservation.handleAdd(FryskGui)
frysk.proc.ProcState$3.handleAddObservation(FryskGui)
frysk.proc.Proc.handleAddObservation(FryskGui)
frysk.proc.Proc$6.execute(FryskGui)
frysk.event.EventLoop.runEventLoop(FryskGui)
frysk.event.EventLoop.run(FryskGui)
frysk.gui.Gui$4.run(FryskGui)
java.lang.Thread.run(libgcj.so.7rh)

ps -ax | grep 4151

4151 ?        S      0:00 /bin/sh /usr/lib/firefox-1.5.0.6/firefox -UILocale en-US
Comment 3 Phil Muldoon 2006-08-29 19:30:29 UTC
Created attachment 1263 [details]
Frysk Core Event Log
Comment 4 Mark Wielaard 2006-08-29 20:32:36 UTC
I cannot immediately see which recent change could have caused this to happen.
But I do see how to solve it.

What do you exactly do when you trigger it?
Did this work reliably a few days ago?
Comment 5 Phil Muldoon 2006-08-30 14:19:49 UTC
Reproducers:

1) Open a brand new session
2) Add BASH or your shell that you use (Bash makes lots of syscalls)
3) Add the Syscall observer from the next page
4) Launch the session
5) Observer the failure in the stacktrace posted in #2 (does not happen all the
time, but most of the time it seems)
6) Look at the logs as posted in comment #3
Comment 6 Mark Wielaard 2006-08-31 15:49:43 UTC
The logs in comment #3 make clear that what happens is that a syscall observer
fires on entry of the syscall, it gets blocked, then it gets unblocked and it
runs inside the syscall, before the syscall exits a new observer is added. The
runningInSyscall state doesn't handle addObserver so we get the unhandled exception.

I cannot reproduce it with the instructions of comment #5 myself (FC5 x86_64
machine). But I should be able to write a testcase that replicates the events above.
Comment 7 Mark Wielaard 2006-09-01 12:34:30 UTC
Hopefully fixed by:

2006-09-01  Mark Wielaard  <mark@klomp.org>

    * TaskState.java (runningInSyscall): Handle adding of Observer and
    SyscallObserver.
    * TestSyscallRunning.java: New file.

2006-09-01  Mark Wielaard  <mark@klomp.org>

        * funit-syscall-running.c: New test prog.
Comment 8 Phil Muldoon 2006-09-18 16:12:41 UTC
Marks changes have fixed the issue in the UI.