Solved

Urgent Thread active problem.

Posted on 2002-04-18
9
192 Views
Last Modified: 2013-11-20
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
Comment
Question by:job_s
  • 3
  • 2
  • 2
  • +1
9 Comments
 
LVL 23

Expert Comment

by:Roshan Davis
ID: 6952886
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
 
LVL 3

Author Comment

by:job_s
ID: 6952978
Do u have any idea that how much time it may take to complete the opertaion like pending IO ????
0
 
LVL 23

Expert Comment

by:Roshan Davis
ID: 6953073
If u r not closing a kernel object in user mode not properly, this may cause problems....


Roshmon
0
Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

 
LVL 49

Expert Comment

by:DanRollins
ID: 6959149
Sometimes you can call CancelIO( handle ).  It is not availble on Win 95.

-- Dan
0
 
LVL 3

Author Comment

by:job_s
ID: 6962773
hi frieds,

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

job_s
0
 
LVL 3

Author Comment

by:job_s
ID: 6962780
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
 
LVL 49

Expert Comment

by:DanRollins
ID: 6963585
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
 
LVL 5

Accepted Solution

by:
Netminder earned 0 total points
ID: 11428682
PAQed, with points refunded (200)

Netminder
EE Admin
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Replacement selected text 2 61
sumHeights  challenge 17 70
How to convert MFC::CString to UTF8 wchar_t* 10 201
unix example issues 18 89
Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now