Re: Update: WIndows process table and process image.



Thanks Jeff,

Last week I changed how the processes are killed and for several days our QA
did not see this bug any more.

What I changed is the order the process tree is killed. My app killed
child processes before the parent process.
Now it kills the parent process before the child processes.
Because the parent process holds hanldes of the child processes I feel it
may be better to kill it first.
The new code seems fixed the bug.

My understanding of the OS is that the order should not be a matter. Killed
processes should go away once all handles to it are closed.
If the order of killing is significant then something is wrong in the OS, I
think.

I'll follow your suggestion and debug it using windbg if the bug happens
again.

Thanks,
Chris


""Jeffrey Tan[MSFT]"" <jetan@xxxxxxxxxxxxxxxxxxxx> wrote in message
news:NtJdKVsjGHA.764@xxxxxxxxxxxxxxxxxxxxxxxx
Hi Chris,

Thanks for your feedback!

Yes, I know about this background information. However, I do not think
this
is the root cause. The structures the CSRSS process maintained reside in
kernel mode. Kernel mode code normally do not reference to other kernel
object through handle.(Handle is an abstract concept designed for
user-mode
code to refer kernel-mode objects)

Regarding your problem, I hope you can first follow my original suggestion
to see if there are still any threads alive in the dead process with
Process Explorer. Second, to troubleshoot handle leak, you'd better use
!htrace extension command. This command will display stack trace
information for the leaking handle.
Since the leaking handle is in CSRSS process, I think you have to use this
command in kernel-mode debugging. Please refer to windbg help for the
usage
of !htrace.

Hope this helps!

Best regards,
Jeffrey Tan
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no
rights.



.



Relevant Pages