Re: [libvirt] [PATCH] lxc_monitor: Avoid AB / BA lock race

2018-09-25 Thread Michal Privoznik
On 09/25/2018 04:31 PM, Mark Asselstine wrote: > On Tuesday, September 25, 2018 5:20:26 AM EDT Michal Privoznik wrote: >> On 09/24/2018 05:11 PM, Mark Asselstine wrote: > > Here is my read, again I have to caveat that this code is rather new to me. > > The object poisoning in virObjectUnref()

Re: [libvirt] [PATCH] lxc_monitor: Avoid AB / BA lock race

2018-09-25 Thread Mark Asselstine
On Tuesday, September 25, 2018 5:20:26 AM EDT Michal Privoznik wrote: > On 09/24/2018 05:11 PM, Mark Asselstine wrote: > > A deadlock situation can occur when autostarting a LXC domain 'guest' > > due to two threads attempting to take opposing locks while holding > > opposing locks (AB BA

Re: [libvirt] [PATCH] lxc_monitor: Avoid AB / BA lock race

2018-09-25 Thread Michal Privoznik
On 09/24/2018 05:11 PM, Mark Asselstine wrote: > A deadlock situation can occur when autostarting a LXC domain 'guest' > due to two threads attempting to take opposing locks while holding > opposing locks (AB BA problem). Thread A takes and holds the 'vm' lock > while attempting to take the

[libvirt] [PATCH] lxc_monitor: Avoid AB / BA lock race

2018-09-24 Thread Mark Asselstine
A deadlock situation can occur when autostarting a LXC domain 'guest' due to two threads attempting to take opposing locks while holding opposing locks (AB BA problem). Thread A takes and holds the 'vm' lock while attempting to take the 'client' lock, meanwhile, thread B takes and holds the