Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

WaitForSingleObject crash

Posted on 2013-06-28
4
Medium Priority
?
1,327 Views
Last Modified: 2016-02-25
I have a windows service (running on XP) which has run for years until recently, whereby the service crashes on a particualr machine when calling

      DWORD waitErr = WaitForSingleObject(hClient,INFINITE);

where I can confirm at time of calling that hClient is not null.

      hClient = CreateThread(0, 0, (LPTHREAD_START_ROUTINE)ClientThread, 0, 0, &clientThreadID);
      
I cannot even wrap a try/catch around it, as it blows as soon as WaitForSingleObject is called.

The only error I can find is in the Windows Event logs:
Faulting application myservice.exe, version 3.20.0.0, faulting module swi_ifslsp.dll, version 3.2.100.0, fault address 0x0000349a.

swi_ifslsp.dll is reported as part of sophos AV products, however I have disabled all services relating to sophos and the error still occurs.

How can I resolve this implosion?.
0
Comment
Question by:brenlex
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 86

Expert Comment

by:jkr
ID: 39284610
Can you check if that DLL is listed under 'AppInit_DLLs' as described in http://support.microsoft.com/kb/197571 ("Working with the AppInit_DLLs registry value")? If so, it is probably used for API hooking and that mechanism interferes with your wait operation. Try to rename the registry entry to prevent it from loading.
0
 
LVL 35

Expert Comment

by:sarabande
ID: 39294121
it is more likely that the client thread function is crashing. a crash in the thread would also crash the main thread depending on the severity. also if the thread corrupted some memory it could have effects on the call stack and that could spoil the call of WaitForSingleObject.

you could add a sleep at the begin of the thread proc such that the wait call in the main thread happens earlier. if it crashes after sleep you might add log messages yourself to the client thread to narrow the issue.

note, if the machine is a multi-core or even multi-processor computer, your issues may come from code that is not thread-safe. if it runs ok before, it could be due by other factors such that the machine is more or less busy.

Sara
0
 

Accepted Solution

by:
brenlex earned 0 total points
ID: 39299798
In the end it was indeed the Sophos LSP dll causing the problem!

Command line: netsh winsock show catalog highlighted its presence as part of a Web Intelligence service.

Customer disabled and problem disappeared.
0
 

Author Closing Comment

by:brenlex
ID: 39309772
Specific to Sophos.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

If you have done a reformat of your hard drive and proceeded to do a successful Windows XP installation, you may notice that a choice between two operating systems when you start up the machine. Here is how to get rid of this: Click Start Clic…
Article by: evilrix
Looking for a way to avoid searching through large data sets for data that doesn't exist? A Bloom Filter might be what you need. This data structure is a probabilistic filter that allows you to avoid unnecessary searches when you know the data defin…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

618 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