Questions tagged [deadlock]

Situation where two (or more) operations need overlapping sets of resources, and neither can complete because they cannot obtain all locks necessary to complete an operation and release their locks.

Filter by
Sorted by
Tagged with
0 votes
0 answers
8 views

Deadlock occur in laptop or mobile

I have to give presentation on deadlock In OS and I have so many questions to ask. If deadlock occurs in laptop, how I(user) knows? Deadlock occuring means application freezing? If deadlock occurs so ...
Visha Nazz's user avatar
0 votes
1 answer
44 views

Go program works with the single channel and runs into a deadlock with the introduction of a new channel

I am new to the go channels, I am trying to learn go channels by constructing a mock kernel and processes interaction through channels. The aim of this sample program is have multiple processes (2) ...
DDStackoverflow's user avatar
0 votes
0 answers
77 views

What can explain a deadlock only occuring with virtual threads?

I am encountering a deadlock when using an executor based on virtual threads. The issue arises when I am using 50 threads but not at 20. The issue does not shows up when I am not using virtual threads....
Abbadon's user avatar
  • 2,533
0 votes
1 answer
137 views

I have a deadlock between 2 threads, and I am really not sure why there's a deadlock

All, Software/Tech: Winforms application on .net framework 4.8 Build Configuration: Debug Build Synchronization construct used where deadlock occurs: Monitor using a privately scoped object to the ...
ActiveX's user avatar
  • 1,071
3 votes
0 answers
161 views

Why does my time.Ticker work fine for 6 months then suddenly stop sending ticks?

I haven't been able to find any mention of this really weird issue after searching for a while. It's very rare but not the first time I've seen it happen. I have written a simple Go program (compiled ...
geniass's user avatar
  • 399
0 votes
0 answers
43 views

MySQL Dealing with Nested Transactional Stored Procedures [8.0.34]

UPDATE 11.22.2023 Helpful documentation confirming a deadlock always nullifies the entire transaction. https://dev.mysql.com/doc/refman/8.0/en/innodb-error-handling.html Still haven't found a rock-...
Floobinator's user avatar
0 votes
1 answer
11 views

SpringJPA + Hibernate application causing MySQL Deadlock issue

We are facing an issue which might by caused of resource exausted on AWS RDS. As we checked the AWS RDS performance insights, we got several sql which have very high latency(even more thant 1 hour) ...
Gavin Gu's user avatar
1 vote
1 answer
24 views

I'm having problems accessing a category from a question bank in Moodle

I'm having problems accessing a category from a question bank in Moodle. I'm using Moodle in version 4.0 and PHP in version 7.4. When I try to access a category from a question bank in Moodle this ...
Aristides Evandro's user avatar
1 vote
2 answers
75 views

Strange deadlock while sync with TaskCompletionSource and AutoResetEvent

While running the following C# program, I randomly got two different results. Result 1 (occurred frequently) is actually deadlocked. Please explain to me why this happened. I am not expecting the ...
Sky Nano's user avatar
0 votes
1 answer
32 views

MySQL UPDATE / DELETE deadlock using modulo

I have a table with an column user_id, which is an integer index. There's a number of processes that have to pick non-conflicting users and do some processing. I am using modulo for this, so at some ...
Ecuador's user avatar
  • 1,046
1 vote
0 answers
59 views

Deadlock MySQL with Django's get_or_create on shared lock on creation

I am running a script on my database that has multiple threads running at the same time. They are running this code: with transaction.atomic(): ( aggregated_report, ...
Antonio Cruz's user avatar
1 vote
0 answers
55 views

how to deliberately cause deadlock in test cases to guard concurrent bug steadily?

Imagine I have a complex test case which can cause two threads deadlock occasionally. It's not suiteable, I think, to run in CI for guarding concurrent bugs. I want to write a simple test case to ...
Lewis Chan's user avatar
0 votes
0 answers
120 views

Deadlock while debugging using HttpClient

I have to query a external webservice using HttpClient (sending hundreds of requests). I made a classic async await loop using HttpClient but, while debugging, about 5-10% of the time Visual Studio ...
LeBigCat's user avatar
  • 1,737
0 votes
1 answer
73 views

function is not returning after creating a new class of an asynchronous timer

I have a class that is creating an asynchronous timer that should run on the background. I have created a timer class that creates an object with its individual thread and should run in the background....
newww's user avatar
  • 69
1 vote
0 answers
51 views

Notify when all thread loops ended their iteration in main thread

I've the following code: #include <mutex> #include <condition_variable> #include <thread> #include <iostream> #include <vector> #include <syncstream> int main() { ...
Jepessen's user avatar
  • 11.9k
0 votes
0 answers
46 views

Python GIL and deadlock detection?

When using Python a multi-threaded environment, it is quite easy to deadlock as we need to lock the Python GIL. While trying to lock the GIL, we may hold other locks and the Python thread holding the ...
Jan Wielemaker's user avatar
0 votes
1 answer
50 views

Unable to simulate deadlock in java with nested synchronized

I was playing around with threads in Java and decided to simulate deadlock situation but was unable do it. Following code couldn't result in deadlock situation before adding statement between nested ...
Java_dev_dev's user avatar
1 vote
0 answers
104 views

for loop causing a deadlock in c# and stored procedure

I've spent long time try to solve this deadlock. The daedlock is in the _dbcontext.DeleteTags(tag); The AddTags and DeleteTags goes to the same graphtable (this is the reason that I can't use EF to ...
user22144337's user avatar
0 votes
0 answers
57 views

PostgreSQL's processes blocking each other are not detected as deadlock

PostgreSQL's version: 13.10 Configuration: deadlock_timeout: 1s, log_lock_waits: off I found in the logs some detected deadlocks: 2023-09-22 16:54:19.425 UTC 650dc6ba.5732 497942 22322 ERROR: ...
xoip's user avatar
  • 51
0 votes
1 answer
41 views

deadlock, when different fields of a mutex guarded struct are accessed accross multiple methods

How to avoid deadlock when different fields of a mutex guarded struct are accessed across multiple functions like below use std::sync::Mutex; #[derive(Default)] struct InnerData { ia: i32, ib:...
Harry's user avatar
  • 2,269
0 votes
0 answers
21 views

Deadlock between two non-related tables

Sometimes happens deadlock on 2 tables, but I dont see any relation between them. They have the same column name that called 'Code' but there is no relation between these 2 columns. No triggers on ...
Maria's user avatar
  • 13
1 vote
0 answers
19 views

Likely deadlock to my request to payment provider

I have translated the code from an console project and seem to get a deadlock since the code doesnt send a request to the server, their logs show nothing. Nothing happens when i debug, its just ...
Jimmy's user avatar
  • 285
1 vote
1 answer
66 views

golang: deadlock occurs maybe at compiler time?

I am trying implementing a Iterator with golang. I wrote the Iterator interface just like this: type Iterator[Item any] interface { HasNext() bool Next() Item Iter() Iter[Item, Iterator[...
Misonoi's user avatar
  • 29
0 votes
0 answers
47 views

Full-text index populate deadlock

I have a large table with a full-text index. Sometimes I get deadlocks when reading data from this table. Hypothesis: this occurs because the full-text index is updated slowly. But maybe there are ...
Maxim B's user avatar
0 votes
1 answer
64 views

Postgres seldom deadlock diaglostics

In Postgres running on AWS RDS sometimes (once per 3 month) deadlock happens. Symptoms: application stop normally work, DBLoadCPU increased few times comparing to normal. Application reboot doesn't ...
Sandre's user avatar
  • 528
3 votes
1 answer
98 views

How does std::lock work with std::unique_lock objects instead of directly with std::mutex?

I'm working with a piece of multithreading code that involves bank account transfers. The goal is to safely transfer money between accounts without running into race conditions. I'm using std::mutex ...
Sami's user avatar
  • 606
0 votes
2 answers
31 views

Potential deadlock using Proc SQL Update in SAS

I am trying to update a variable 'clnwash' in a dataset based on multiple conditions in a different dataset using prog sql update. I'm new to SAS and I'm having a hard time getting the following code ...
Dominique Medaglio's user avatar
0 votes
1 answer
91 views

Aws postgres Deadlock not written to server log

I am seeing deadlocks on aurora postgres monitoring metrics. However when searching for the deadlock in the postgres log files, the information cannot be found. Is this an issue arising from ...
gdba's user avatar
  • 37
0 votes
0 answers
66 views

Printf causes deadlock.. but why?

I was messing around with mutexes in C and found that the following program eventually deadlocks in the parent process if and only if there is a call to printf within the critical section in the child ...
user2543740's user avatar
0 votes
0 answers
77 views

why this will cause core dump or deadlock

I am writing a code for implement thread-safe and thread-unsafe progrm for deadlock. If everything works well, the there is no problem running it. #include <iostream> #include <thread> #...
Yunhan Tang's user avatar
0 votes
0 answers
76 views

Fractional truncation into deadlock SSMS

In short: I need to write data for the past 8 years to a database per quarter. Every quarter will be written in 9 batches. When I try to run the script over the 32 quarters (8*4) it randomly errors at ...
Hestaron's user avatar
  • 300
0 votes
0 answers
107 views

DeadLock issue on primary key index

I am reviewing my ASP.NET application and found that the deadlock issue occurs quite often (twice and more in a week). I am seeking for help to found out why deadlock happen and how to solve it. ...
Kenneth.F's user avatar
0 votes
1 answer
40 views

Why is deadlock-safe example with identityHashCode valid in Concurrency in Practice book?

Why is using identityHashCode in listing 10.3 is valid. If there is two simultaneous requests: A: transferMoney(myAccount, yourAccount, 10); B: transferMoney(yourAccount, myAccount, 20); then, there ...
Belenot's user avatar
  • 281
0 votes
1 answer
30 views

Update progressbar from Task.Run generate deadlock

I am not experienced about WinForm so probably my understanding is wrong. But I think I have implemented all the syncronization needed to syncronize the worker thread with UI thread, despite that at ...
Skary's user avatar
  • 1,332
1 vote
1 answer
76 views

Deadlocks caused by concurrent deletes on different rows on SQL Server

I need some help to understand this deadlock scenario. We have concurrent deletes on a table. The operations deletes a record and insert a new one in a transaction (other tables are involved but no ...
Tiago Schumann's user avatar
1 vote
1 answer
58 views

How thread-safe is the SQL operation DELETE FROM my_table WHERE ctid IN (SELECT ctid FROM my_table WHERE some_condition)?

Motivation I am using a database table as a persistent queue. The purpose is to implement a pop operation on a queue: take any record fulfilling a condition from the queue, remove it from the queue, ...
Honza Zidek's user avatar
  • 11.4k
1 vote
1 answer
41 views

WinForm Task.Wait : why is it blocking the UI?

I guess this kind of things should not be done in general, but I would like to understand why this code is getting the UI blocked, not returning from the await taskMain: using System.Diagnostics; ...
rortegax2's user avatar
  • 507
1 vote
1 answer
102 views

Guarantee order in UPDATE FROM to avoid deadlocks

A query executes concurrently to atomically increment some counters with an aggregate numeric value: WITH data ( id, delta ) AS ( VALUES(1,1.2),(2,2.0),(2,0.5) ), agg_data AS ( SELECT ...
Alechko's user avatar
  • 1,456
0 votes
0 answers
202 views

LiteDB Deadlocks - I may be using LiteDB wrong

So I am writing a server in C#. It has a LiteDB database to store messages in. Every time the server receives a message, it stores the message in the DB, and sends a copy to the proper destination. ...
Idra's user avatar
  • 163
0 votes
0 answers
108 views

Deadlocks in a server that uses LiteDB

So I am writing a server in C#. It has a LiteDB database to store messages in. When I start up the server, I also launch an async task to delete expired messages from the DB (messages that are older ...
Idra's user avatar
  • 163
0 votes
1 answer
96 views

Is this implementation correct?

I was wondering if this implementation is correct. The scenario is: one overseer unknown number of workers (0-n) overseer only needs to convey resume work or production has stopped signals to the ...
JayC667's user avatar
  • 2,525
0 votes
0 answers
71 views

AsyncReaderWriterLock for a server that uses LiteDB

So I am writing a server in C#. It has a LiteDB database to store messages in. When I start up the server, I also launch an async task to delete expired messages from the DB (messages that are older ...
Idra's user avatar
  • 163
0 votes
0 answers
126 views

design pattern to avoid deadlock with mutex in golang

What would the appropriate design pattern to avoid deadlock when several functions use the same mutex ? It is quite easy to forget what method uses the lock and so it happens that you call a function ...
cylon86's user avatar
  • 570
1 vote
1 answer
40 views

Infrequent deadlock in MySQL DB

I'm having Aurora MySQL V2 RDS server. Following is my issue having table. `CREATE TABLE `my_tbl` ( `id` int(11) NOT NULL AUTO_INCREMENT, `col1` datetime DEFAULT NULL, `col2` varchar(20) NOT ...
Nuwan Madushanka's user avatar
0 votes
1 answer
114 views

Difference between starvation, livelock, deadlock

Is this table a correct way to summarize difference between starvation, livelock and deadlock? Mainly I am asking about "thread is active", "how many threads", "nr of ...
bridgemnc's user avatar
  • 191
0 votes
0 answers
57 views

MySQL Insert on duplicate key causes DEADLOCK

I am using MySQL in my program and going to use insert on duplicate key update statement. Many information shows that this statement may cause a deadlock. There's the bug report about MySQL: https://...
user avatar
1 vote
2 answers
78 views

I used sync package but I get Deadlock error in Golang ;(

I was so excited that I wrote a Go code to learn goroutine. And then In the process of learning goroutine, I applied the sync package and channel to generate the following code. package main import ( ...
한준범's user avatar
0 votes
1 answer
79 views

Deadlock when accessing HashSet unless Tokio mutex is used

I'm getting deadlocked, and I cannot figure out what's the issue. The code doesn't work if I use std::Mutex (or parking_lot::Mutex), but it works when Tokio's async mutex is used. My understanding is ...
hyperN's user avatar
  • 2,684
0 votes
0 answers
17 views

Why is not there a dead lock in MemoryChannel of DataX

https://github.com/alibaba/DataX I would like to ask a question. In the MemoryChannel of DataX, both doPullAll and doPushAll will lock. Why does it no cause a deadlock? For example, under the initial ...
Lucien Evans's user avatar
2 votes
2 answers
120 views

How to avoid and handle Neo.TransientError.Transaction.DeadlockDetected?

When doing load testing, I am seeing Deadlock errors happening occasionally, I added retries and its been working well. However, how do I know how to improve? The errors are quite vague so I cannot ...
Jiew Meng's user avatar
  • 85.1k

1
2 3 4 5
70