This is the mail archive of the mailing list for the frysk project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: testExecSyscall mystery

Mark Wielaard wrote:

On Thu, 2006-09-21 at 15:57 +0200, Mark Wielaard wrote:
I did this because I hoped it would help me debug a test failure I am

1)testExecSyscall(frysk.proc.TestTaskSyscallObserver)junit.framework.AssertionFailedError: inSyscall

But why that suddenly fails is still a bit of a mystery. It used to pass
and I cannot see what recently changed that could make it fail. The
logic in TaskState seems flawed though. It assumes that when we get an
ptrace exec event then we must be running inside a syscall. We have a
couple of states for this special case. But according to my logs this is
wrong. At least now I do get syscall exec enter and exit events plus an

I don't know why this worked before. I asked on irc and it seems nobody
else is seeing this failure. But if I rework the TaskState to not assume
an exec event means an insyscall state transition the test works for me.
I am going to clean up TaskState to not have any special exec-event
TaskStates (blockedInExecSyscall) unless someone knows of a reason for
keeping this.

Tim said he is also seeing this failure. But I have not gotten much further with it. It seems it is a combination of issues. It seems the state machine can be just plain confused and start tracing syscalls with a syscall event indicating exit, which it interprets as an enter. And I do seem to get a execve syscall event, an execed event and then an execve syscall event again. While we assume execve doesn't return so we shouldn't get the second execve syscall event.

I think the case you're looking at might occure when a new process is created. The sequence is something like:

- requestCreateAttachedChild (observer)
-> observer gets notified of child at first instruction
-> add syscall observers -> state machine updated to now expect an exit from that exec it is still sitting in
-> resume


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]