Re: deadlock when using iothread during backup_clean()

2023-11-03 Thread Fiona Ebner
Am 20.10.23 um 15:52 schrieb Fiona Ebner: > And I found that with drive-mirror, the issue during starting seems to > manifest with the bdrv_open() call. Adding a return before it, the guest > IO didn't get stuck in my testing, but adding a return after it, it can > get stuck. I'll try to see if I c

Re: deadlock when using iothread during backup_clean()

2023-10-20 Thread Fiona Ebner
Am 19.10.23 um 15:53 schrieb Fiona Ebner: > Am 19.10.23 um 14:14 schrieb Kevin Wolf: >> Am 18.10.2023 um 11:42 hat Fiona Ebner geschrieben: >>> Am 17.10.23 um 16:20 schrieb Kevin Wolf: Am 17.10.2023 um 15:37 hat Fiona Ebner geschrieben: > Am 17.10.23 um 14:12 schrieb Kevin Wolf: >> Am

Re: deadlock when using iothread during backup_clean()

2023-10-19 Thread Fiona Ebner
Am 19.10.23 um 14:14 schrieb Kevin Wolf: > Am 18.10.2023 um 11:42 hat Fiona Ebner geschrieben: >> Am 17.10.23 um 16:20 schrieb Kevin Wolf: >>> Am 17.10.2023 um 15:37 hat Fiona Ebner geschrieben: Am 17.10.23 um 14:12 schrieb Kevin Wolf: > Am 17.10.2023 um 12:18 hat Fiona Ebner geschrieben:

Re: deadlock when using iothread during backup_clean()

2023-10-19 Thread Kevin Wolf
Am 18.10.2023 um 11:42 hat Fiona Ebner geschrieben: > Am 17.10.23 um 16:20 schrieb Kevin Wolf: > > Am 17.10.2023 um 15:37 hat Fiona Ebner geschrieben: > >> Am 17.10.23 um 14:12 schrieb Kevin Wolf: > >>> Am 17.10.2023 um 12:18 hat Fiona Ebner geschrieben: > I ran into similar issues now with mi

Re: deadlock when using iothread during backup_clean()

2023-10-18 Thread Fiona Ebner
Am 17.10.23 um 16:20 schrieb Kevin Wolf: > Am 17.10.2023 um 15:37 hat Fiona Ebner geschrieben: >> Am 17.10.23 um 14:12 schrieb Kevin Wolf: >>> Am 17.10.2023 um 12:18 hat Fiona Ebner geschrieben: I ran into similar issues now with mirror, (both deadlocks and stuck guest IO at other times),

Re: deadlock when using iothread during backup_clean()

2023-10-17 Thread Kevin Wolf
Am 17.10.2023 um 15:37 hat Fiona Ebner geschrieben: > Am 17.10.23 um 14:12 schrieb Kevin Wolf: > > Am 17.10.2023 um 12:18 hat Fiona Ebner geschrieben: > >> I ran into similar issues now with mirror, (both deadlocks and stuck > >> guest IO at other times), and interestingly, also during job start. >

Re: deadlock when using iothread during backup_clean()

2023-10-17 Thread Fiona Ebner
Am 17.10.23 um 14:12 schrieb Kevin Wolf: > Am 17.10.2023 um 12:18 hat Fiona Ebner geschrieben: >> I ran into similar issues now with mirror, (both deadlocks and stuck >> guest IO at other times), and interestingly, also during job start. >> >> Also had a backtrace similar to [0] once, so I took a c

Re: deadlock when using iothread during backup_clean()

2023-10-17 Thread Kevin Wolf
Am 17.10.2023 um 12:18 hat Fiona Ebner geschrieben: > Am 06.10.23 um 14:18 schrieb Fiona Ebner: > > Am 04.10.23 um 19:08 schrieb Vladimir Sementsov-Ogievskiy: > >> On 28.09.23 11:06, Fiona Ebner wrote: > >>> For fixing the backup cancel deadlock, I tried the following: > >>> > diff --git a/blo

Re: deadlock when using iothread during backup_clean()

2023-10-17 Thread Fiona Ebner
Am 06.10.23 um 14:18 schrieb Fiona Ebner: > Am 04.10.23 um 19:08 schrieb Vladimir Sementsov-Ogievskiy: >> On 28.09.23 11:06, Fiona Ebner wrote: >>> For fixing the backup cancel deadlock, I tried the following: >>> diff --git a/blockjob.c b/blockjob.c index 58c5d64539..fd6132ebfe 100644 >>

Re: deadlock when using iothread during backup_clean()

2023-10-06 Thread Fiona Ebner
Am 04.10.23 um 19:08 schrieb Vladimir Sementsov-Ogievskiy: > On 28.09.23 11:06, Fiona Ebner wrote: >> For fixing the backup cancel deadlock, I tried the following: >> >>> diff --git a/blockjob.c b/blockjob.c >>> index 58c5d64539..fd6132ebfe 100644 >>> --- a/blockjob.c >>> +++ b/blockjob.c >>> @@ -1

Re: deadlock when using iothread during backup_clean()

2023-10-04 Thread Vladimir Sementsov-Ogievskiy
On 28.09.23 11:06, Fiona Ebner wrote: Am 05.09.23 um 13:42 schrieb Paolo Bonzini: On 9/5/23 12:01, Fiona Ebner wrote: Can we assume block_job_remove_all_bdrv() to always hold the job's AioContext? I think so, see job_unref_locked(), job_prepare_locked() and job_finalize_single_locked().  Thes

Re: deadlock when using iothread during backup_clean()

2023-10-04 Thread Vladimir Sementsov-Ogievskiy
On 05.09.23 14:25, Fiona Ebner wrote: Am 05.09.23 um 12:01 schrieb Fiona Ebner: Can we assume block_job_remove_all_bdrv() to always hold the job's AioContext? And if yes, can we just tell bdrv_graph_wrlock() that it needs to release that before polling to fix the deadlock? I tried a doing so

Re: deadlock when using iothread during backup_clean()

2023-09-28 Thread Fiona Ebner
Am 05.09.23 um 13:42 schrieb Paolo Bonzini: > On 9/5/23 12:01, Fiona Ebner wrote: >> Can we assume block_job_remove_all_bdrv() to always hold the job's >> AioContext? > > I think so, see job_unref_locked(), job_prepare_locked() and > job_finalize_single_locked().  These call the callbacks that ult

Re: deadlock when using iothread during backup_clean()

2023-09-05 Thread Paolo Bonzini
On 9/5/23 12:01, Fiona Ebner wrote: Can we assume block_job_remove_all_bdrv() to always hold the job's AioContext? I think so, see job_unref_locked(), job_prepare_locked() and job_finalize_single_locked(). These call the callbacks that ultimately get to block_job_remove_all_bdrv().

Re: deadlock when using iothread during backup_clean()

2023-09-05 Thread Fiona Ebner
Am 05.09.23 um 12:01 schrieb Fiona Ebner: > > Can we assume block_job_remove_all_bdrv() to always hold the job's > AioContext? And if yes, can we just tell bdrv_graph_wrlock() that it > needs to release that before polling to fix the deadlock? > I tried a doing something similar as a proof-of-co

deadlock when using iothread during backup_clean()

2023-09-05 Thread Fiona Ebner
Hi, as the title says, a deadlock is possible in backup_clean() when using a drive with an IO thread. The main thread keeps waiting in bdrv_graph_wrlock() for reader_count() to become 0, while the IO thread waits for its AioContext lock, which the main thread holds (because it also is the backup j