ContextSwitchDeadlock was detected - VB .Net

Hi,

I have developed a VB .Net application that calls a Oracle stored procedure (l_cmdSetting.ExecuteNonQuery) which takes about 10 mins to complete and return focus to the application. During this time the app waits for the SP to complete and displays the message

"ContextSwitchDeadlock was detected
Message: The CLR has been unable to transition from COM context 0x1b0778 to COM context 0x1b08e8 for 60 seconds. The thread that owns the destination context/apartment is most likely either doing a non pumping wait or processing a very long running operation without pumping Windows messages. This situation generally has a negative performance impact and may even lead to the application becoming non responsive or memory usage accumulating continually over time. To avoid this problem, all single threaded apartment (STA) threads should use pumping wait primitives (such as CoWaitForMultipleHandles) and routinely pump messages during long running operations.
"

I need the SP to complete before carrying on with application processing.

1) What does this mean?
2) Can I ignore this issue?
3) Do I need to code a fix and if 'yes' what should this be?

Thanks Ian



LVL 1
ISCAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
Bob LearnedConnect With a Mentor Commented:
This is a big problem, and really depends on a lot of different factors.  I usually get this error when I wait too long looking at code when the IDE is in break-mode.  

Another possibility is referenced in this article:

Why you sometimes get a bogus ContextSwitchDeadLock MDA under the debugger
http://blogs.msdn.com/jmstall/archive/2005/11/11/ContextSwitchDeadLock.aspx

It talks about debugging managed code that includes unmanaged code.

Here is another possibility:

contextSwitchDeadlock MDA
http://msdn2.microsoft.com/en-us/library/ms172233.aspx

Bob
0
 
Computer101Commented:
Forced accept.

Computer101
EE Admin
0
All Courses

From novice to tech pro — start learning today.