[libvirt] [PATCH v5 3/3] libvirtd: fix crash on termination
Nikolay Shirokovskiy
nshirokovskiy at virtuozzo.com
Fri Dec 22 14:17:25 UTC 2017
On 22.12.2017 17:13, John Ferlan wrote:
> [...]
>
>>>
>>> Still adding the "virHashRemoveAll(dmn->servers);" into
>>> virNetDaemonClose doesn't help the situation as I can still either crash
>>> randomly or hang, so I'm less convinced this would really fix anything.
>>> It does change the "nature" of the hung thread stack trace though, as
>>> the second thread is now:
>>
>> virHashRemoveAll is not enough now. Due to unref reordeing last ref to @srv is
>> unrefed after virStateCleanup. So we need to virObjectUnref(srv|srvAdm) before
>> virStateCleanup. Or we can call virThreadPoolFree from virNetServerClose (
>> as in the first version of the patch and as Erik suggests) instead
>> of virHashRemoveAll.
>>
>
> Patches w/
>
> 1. Long pause before GetAllStats (without using [u]sleep)
> 2. Adjustment to call virNetServerServiceToggle in
> virNetServerServiceClose (instead of virNetServerDispose)
> 3. Call virHashRemoveAll in virNetDaemonClose
> 4. Call virThreadPoolFree in virNetServerClose
> 5. Perform Unref (adminProgram, srvAdm, qemuProgram, lxcProgram,
> remoteProgream, and srv) before virNetDaemonClose
>
> Still has the virCondWait's - so as Daniel points out there's quite a
> bit more work to be done. Like most Red Hat engineers - I will not be
> very active over the next week or so (until the New Year) as it's a
> holiday break/vacation for us.
>
> So unless you have the burning desire to put together some patches and
> do the work yourself, more thoughts/work will need to wait.
>
> John
>
Ok. Happy holydays!
I'm going to check what's going nevertheless ))
Nikolay
More information about the libvir-list
mailing list