[libvirt] [PATCH] cgroup: be robust against cgroup movement races

Eric Blake eblake at redhat.com
Tue May 21 17:39:35 UTC 2013


On 05/21/2013 03:43 AM, Daniel P. Berrange wrote:
> On Mon, May 20, 2013 at 09:07:17PM -0600, Eric Blake wrote:
>> https://bugzilla.redhat.com/show_bug.cgi?id=965169 documents a
>> problem starting domains when cgroups are enabled; I was able
>> to reliably reproduce the race about 5% of the time when I added
>> hooks to domain startup by 3 seconds (as that seemed to be about
>> the length of time that qemu created and then closed a temporary
>> thread, probably related to aio handling of initially opening
>> a disk image).
>>

>> * src/util/vircgroup.c (virCgroupAddTaskStrController): Ignore
>> ESRCH, because a thread ended between read and write attempts.
>> (virCgroupMoveTask): Loop until all threads have moved.
>>
> 
> ACK, this looks like the best we can do here.

Thanks; pushed.  I'm also in the process of backporting it to various
maint branches (at least v0.10.2-maint, since the mentioned BZ was
tagged against Fedora 18) - problem was introduced in 0.10.0, in commit
9102829.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 621 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20130521/935836fa/attachment-0001.sig>


More information about the libvir-list mailing list