[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 220
  • Last Modified:

Urgent Thread active problem.

I have one MFC application. Some time on one Win 2000 Sp2 machine showing one problem.
Problem is after exiting my app some Treads remaining active.The process is not active on taskmanager but pslist showing the process as active. Any idea ??????
0
job_s
Asked:
job_s
  • 3
  • 2
  • 2
  • +1
1 Solution
 
Roshan DavisCommented:
MSDN Says

SYMPTOMS
A process continues to exist after a call to the TerminateProcess function on that process has successfully returned.

CAUSE
When there is a request to terminate a process through the TerminateProcess function, Windows stops all the user-mode activity of the target process. However, the target process cannot actually exit until all kernel-mode activity specific to that process is complete. This means that the target process continues to exist until all of its threads have left kernel-mode and all pending IO has been canceled.

This situation occurs as the result of a device driver not releasing a thread or not canceling IO. The process continues to exist until the IO completes and all threads in the process are released from kernel mode.

GOOD LUCK
0
 
job_sAuthor Commented:
Do u have any idea that how much time it may take to complete the opertaion like pending IO ????
0
 
Roshan DavisCommented:
If u r not closing a kernel object in user mode not properly, this may cause problems....


Roshmon
0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
DanRollinsCommented:
Sometimes you can call CancelIO( handle ).  It is not availble on Win 95.

-- Dan
0
 
job_sAuthor Commented:
hi frieds,

    Thanks for Ur responses.I have find out the problem myself .

job_s
0
 
job_sAuthor Commented:
I have find out the solution my self.
The problem was because of teminal services running on that system.When another terminal user runs that APP.It will be shown as a proces on the pslist.

0
 
DanRollinsCommented:
Good info.  I suggest that you post to Community Support and ask to have your points refunded since you found the answer yourself.  

I recommend that this NOT be deleted, but rather saved as a PAQ.

-- Dan
0
 
NetminderCommented:
PAQed, with points refunded (200)

Netminder
EE Admin
0

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

  • 3
  • 2
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now