Asked by:

Service stop failes with Error 109 pipe has been ended on Windows 2008 R2

Question

My product installs around 5 services out of which 2 services don't stop normally rest stops normally. Service stop is being done manually using service manager stop user interface. Error message thrown by Service Manager is "Error 109 Pipe has been ended"
and when i look at event log I can see APPCRASH event. This behavior is occurring only on Windows 2008 R2. These 2 failing services have socket communication code through ACE library. When I debugged my code I can see whole of my code gets executed from
start to the end point but call never returns from StartServiceCtrlDispatcher() function which is a system call. Application crashes when control is inside this function.

I mean to say that base_controller::class_main_static() executes successfully.

Following Error is displayed and logged in application log when MYSERVICE is stopped from service panel"Windows could not stop the MYSERVICE service on local computerError 109: The pipe has been ended "

Came across this article while searching for solutionhttp://support.microsoft.com/kb/2279689. This article is about terminal serviceso it can't solve this problem but surely provides some clue about win2008 r2and ACE lib combination.