[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [Qemu-block] segfault in parallel blockjobs (iotest 30)
From: |
Alberto Garcia |
Subject: |
Re: [Qemu-devel] [Qemu-block] segfault in parallel blockjobs (iotest 30) |
Date: |
Tue, 21 Nov 2017 16:31:46 +0100 |
User-agent: |
Notmuch/0.18.2 (http://notmuchmail.org) Emacs/24.4.1 (i586-pc-linux-gnu) |
On Tue 21 Nov 2017 04:18:13 PM CET, Anton Nefedov wrote:
>>> Or, perhaps another approach, keep BlockJob referenced while it is
>>> paused (by block_job_pause/resume_all()). That should prevent it
>>> from deleting the BB.
>>
>> Yes, I tried this and it actually solves the issue. But I still think
>> that the problem is that block jobs are allowed to finish when they
>> are paused.
>
> Agree, but
>
>> Adding block_job_pause_point(&s->common) at the end of stream_run()
>> fixes the problem too.
>
> would be a nice fix, but it only works unless the job is already
> deferred, right?
Right, I didn't mean to propose it as the proper solution (it would
still leave mirror job vulnerable because it's already paused by the
time it calls defer_to_main_loop()).
> This:
>
> >> keep BlockJob referenced while it is
> >> paused (by block_job_pause/resume_all()). That should prevent it from
> >> deleting the BB.
>
> looks kind of hacky; maybe referencing in block_job_pause() (and not
> just pause_all) seems more correct? I think it didn't work for me
> right away though. But I can look more.
You have to be careful when you unref the block job because you may
destroy it, and therefore block_job_next() in block_job_resume_all()
would be using freed memory.
Berto
- Re: [Qemu-devel] [Qemu-block] segfault in parallel blockjobs (iotest 30), (continued)
Re: [Qemu-devel] [Qemu-block] segfault in parallel blockjobs (iotest 30), Alberto Garcia, 2017/11/09
- Re: [Qemu-devel] [Qemu-block] segfault in parallel blockjobs (iotest 30), Fam Zheng, 2017/11/09
- Re: [Qemu-devel] [Qemu-block] segfault in parallel blockjobs (iotest 30), Alberto Garcia, 2017/11/15
- Re: [Qemu-devel] [Qemu-block] segfault in parallel blockjobs (iotest 30), Anton Nefedov, 2017/11/15
- Re: [Qemu-devel] [Qemu-block] segfault in parallel blockjobs (iotest 30), Alberto Garcia, 2017/11/16
- Re: [Qemu-devel] [Qemu-block] segfault in parallel blockjobs (iotest 30), Anton Nefedov, 2017/11/16
- Re: [Qemu-devel] [Qemu-block] segfault in parallel blockjobs (iotest 30), Alberto Garcia, 2017/11/21
- Re: [Qemu-devel] [Qemu-block] segfault in parallel blockjobs (iotest 30), Anton Nefedov, 2017/11/21
- Re: [Qemu-devel] [Qemu-block] segfault in parallel blockjobs (iotest 30),
Alberto Garcia <=
- Re: [Qemu-devel] [Qemu-block] segfault in parallel blockjobs (iotest 30), John Snow, 2017/11/21
Re: [Qemu-devel] [Qemu-block] segfault in parallel blockjobs (iotest 30), Alberto Garcia, 2017/11/22
Re: [Qemu-devel] [Qemu-block] segfault in parallel blockjobs (iotest 30), John Snow, 2017/11/22
Re: [Qemu-devel] [Qemu-block] segfault in parallel blockjobs (iotest 30), John Snow, 2017/11/16
Re: [Qemu-devel] [Qemu-block] segfault in parallel blockjobs (iotest 30), Alberto Garcia, 2017/11/17
Re: [Qemu-devel] [Qemu-block] segfault in parallel blockjobs (iotest 30), Alberto Garcia, 2017/11/22