473,408 Members | 2,832 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

Context Switch Deadlock Was Detected

I am doing a length operation reading access database and creating a sql
database when I get this message.

What am I supposed to do to get around it ?

Thanks
Mar 22 '06 #1
4 26617

"Ian Semmel" <is***********@NOKUNKrocketcomp.com.au> wrote in message
news:Op**************@TK2MSFTNGP09.phx.gbl...
|I am doing a length operation reading access database and creating a sql
| database when I get this message.
|
| What am I supposed to do to get around it ?
|
| Thanks

Will need some context to answer this question, what kind of application is
this (Console, windows, service, other). How many threads and kind of...

Willy.
Mar 22 '06 #2
Well, I'm new to C# and Winforms etc but ..

It is a windows application, which (in part), reads an Access dataset and
creates an sql server dataset. Nothing much else is going on except a progress
bar updating. There are no threads.

I've discovered it works outside of VS so it's not too bad.

Willy Denoyette [MVP] wrote:
"Ian Semmel" <is***********@NOKUNKrocketcomp.com.au> wrote in message
news:Op**************@TK2MSFTNGP09.phx.gbl...
|I am doing a length operation reading access database and creating a sql
| database when I get this message.
|
| What am I supposed to do to get around it ?
|
| Thanks

Will need some context to answer this question, what kind of application is
this (Console, windows, service, other). How many threads and kind of...

Willy.

Mar 23 '06 #3
The point that it doesn't show up is because the possible deadlock detection
is switched 'off' in a release build and 'on' when running in the debugger.
But it's bad, don't let there be any mistake about it. You problem relates
to the time the UI thread is blocked when accessing Access before returning,
or more precisely, the period of time in which no messages are getting
dispatched from the UI thread's message queue is way too long, the CLR
considers this as a possible deadlock. What you should do is move this task
to an other thread and update the progress bar using Control.Invoke or
Control.BeginInvoke.
Another option is to use a console application for this kind of batch
process.

Willy.


"Ian Semmel" <is***********@NOKUNKrocketcomp.com.au> wrote in message
news:uZ*************@TK2MSFTNGP09.phx.gbl...
| Well, I'm new to C# and Winforms etc but ..
|
| It is a windows application, which (in part), reads an Access dataset and
| creates an sql server dataset. Nothing much else is going on except a
progress
| bar updating. There are no threads.
|
| I've discovered it works outside of VS so it's not too bad.
|
| Willy Denoyette [MVP] wrote:
| > "Ian Semmel" <is***********@NOKUNKrocketcomp.com.au> wrote in message
| > news:Op**************@TK2MSFTNGP09.phx.gbl...
| > |I am doing a length operation reading access database and creating a
sql
| > | database when I get this message.
| > |
| > | What am I supposed to do to get around it ?
| > |
| > | Thanks
| >
| > Will need some context to answer this question, what kind of application
is
| > this (Console, windows, service, other). How many threads and kind of...
| >
| > Willy.
| >
| >
Mar 23 '06 #4
Yes, I see your point. This is a once-only job so I might leave it.

I also get this error when debugging the program. I would have thought that the
rts would have been able to avoid it but it seems not.

However, is there a way (without using threads) that I can tell the system that
I'm still alive or can I increase the 60 seconds value that the environment uses
before it craps out ?

Willy Denoyette [MVP] wrote:
The point that it doesn't show up is because the possible deadlock detection
is switched 'off' in a release build and 'on' when running in the debugger.
But it's bad, don't let there be any mistake about it. You problem relates
to the time the UI thread is blocked when accessing Access before returning,
or more precisely, the period of time in which no messages are getting
dispatched from the UI thread's message queue is way too long, the CLR
considers this as a possible deadlock. What you should do is move this task
to an other thread and update the progress bar using Control.Invoke or
Control.BeginInvoke.
Another option is to use a console application for this kind of batch
process.

Willy.


"Ian Semmel" <is***********@NOKUNKrocketcomp.com.au> wrote in message
news:uZ*************@TK2MSFTNGP09.phx.gbl...
| Well, I'm new to C# and Winforms etc but ..
|
| It is a windows application, which (in part), reads an Access dataset and
| creates an sql server dataset. Nothing much else is going on except a
progress
| bar updating. There are no threads.
|
| I've discovered it works outside of VS so it's not too bad.
|
| Willy Denoyette [MVP] wrote:
| > "Ian Semmel" <is***********@NOKUNKrocketcomp.com.au> wrote in message
| > news:Op**************@TK2MSFTNGP09.phx.gbl...
| > |I am doing a length operation reading access database and creating a
sql
| > | database when I get this message.
| > |
| > | What am I supposed to do to get around it ?
| > |
| > | Thanks
| >
| > Will need some context to answer this question, what kind of application
is
| > this (Console, windows, service, other). How many threads and kind of...
| >
| > Willy.
| >
| >

Mar 23 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Robert Brown | last post by:
I have a deadlock that's happening on one oracle instance but cannot be reproduced on any other. It is always caused by the same SQL statement colliding with itself and only happens under very high...
1
by: New MSSQL DBA | last post by:
I have recently been assigned to take over several MSSQL environments and found some of the existing practice confusing. As most of my previous experiences are on Oracle and Unix platform so would...
2
by: Jenny Zhang | last post by:
I am running OSDL-dbt1 - an e-commerce workload (http://www.osdl.org/lab_activities/kernel_testing/osdl_database_test_suite/osdl_dbt-1/) against PostgreSQL: 7.3.3. During the test, I saw a lot of...
1
by: Grant McLean | last post by:
Hi First a simple question ... I have a table "access_log" that has foreign keys "app_id" and "app_user_id" that reference the "application_type" and "app_user" tables. When I insert into...
2
by: Sumanth | last post by:
Hi , I am trying to acquire a lock on a table A in exclusive mode, and this statement gives an error indicating a deadlock or timeout has been detected. The lock timeout value is set to 0 which...
1
by: Zubair.NET! | last post by:
In our web application we are calling different XML Webservices and make approximately 25 calls every 10 minutes. We use a separate thread to call a the webservice (Crawler) and populate our cache...
3
by: kavin | last post by:
hi, can any one help me in detecting a deadlock and to clear the deadlock when it occours? how to monitor the databases for deadlocks?
4
by: raccoon | last post by:
keep getting an ora-04020: deadlock detected while trying to lock object XDB. XDNDBKDJjilnd The statement I'm trying to issue is: REVOKE execute on abc."descript_T" FROM PUBLIC; I am not...
1
by: Olav | last post by:
Does anyone know what this means? Olav ISAPI 'c:\windows\microsoft.net\framework\v2.0.50727\aspnet_isapi.dll' reported itself as unhealthy for the following reason: 'Deadlock detected'. For...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.