473,799 Members | 3,017 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 26640

"Ian Semmel" <is***********@ NOKUNKrocketcom p.com.au> wrote in message
news:Op******** ******@TK2MSFTN GP09.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***********@ NOKUNKrocketcom p.com.au> wrote in message
news:Op******** ******@TK2MSFTN GP09.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.BeginIn voke.
Another option is to use a console application for this kind of batch
process.

Willy.


"Ian Semmel" <is***********@ NOKUNKrocketcom p.com.au> wrote in message
news:uZ******** *****@TK2MSFTNG P09.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***********@ NOKUNKrocketcom p.com.au> wrote in message
| > news:Op******** ******@TK2MSFTN GP09.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.BeginIn voke.
Another option is to use a console application for this kind of batch
process.

Willy.


"Ian Semmel" <is***********@ NOKUNKrocketcom p.com.au> wrote in message
news:uZ******** *****@TK2MSFTNG P09.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***********@ NOKUNKrocketcom p.com.au> wrote in message
| > news:Op******** ******@TK2MSFTN GP09.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
6078
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 load. The statement is DELETE from userlogins WHERE numlogins <= 0 the schema for the userlogins table is
1
3042
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 like your inputs and comments. 1) TX log truncate: In the existing environment, there are scheduled jobs to truncate transaction log of each database in the server and shrink them back to a desired size, say 1G. These jobs are all scheduled...
2
8280
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 messages in the database log file: NOTICE: _sc_id=0, _add_flag=0, _itemcount=0, _i_id=597, _pp_i_id=159, c_id=32760 ERROR: deadlock detected WARNING: Error occurred while executing PL/pgSQL function shopping_cart WARNING: line 311 at SQL...
1
3690
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 "access_log", the referential integrity triggers generate these queries: SELECT 1 FROM ONLY "public"."application_type" x
2
8968
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 I understand is to wait for however long it takes to acquire a lock. Also there are other processes that have acquired row level exclusive locks on the table A when this error happened.Is DB2 throwing this error as a pre-emptive measure.
1
5658
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 -- our application then retrieves the data from the Cache -- the cache is set to expire in approximately 25 minutes -- but since the Crawler populates the cache every 10 minutes with the new data -- thus it never expires. In above scenario --...
3
17375
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
7600
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 able to find a solution for this besides the fact of just try the operation again at a later time. I did try it again and again throughout the day, but get the same error every single time.
1
7695
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 more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
0
9685
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9538
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10219
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10025
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9068
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7563
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5584
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4138
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2937
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.