[libvirt] [PATCH] [PATCH] rpc: fix keep alive timer segfault

Michal Privoznik mprivozn at redhat.com
Mon Apr 24 09:15:31 UTC 2017


On 04/24/2017 05:31 AM, wang.yi59 at zte.com.cn wrote:
> Hi Michal,
>
>
>
> Thanks for your review. The problem occured in a python applicatin using libvirt-python, which has no ref().  If we unref() first in virKeepAliveTimer, we may get a segfault in virObjectUnlock() when cleanup, so I suppose that my patch is safer, :-) Here is the backtrace:
>
>

Okay, now it makes more sense. However, the ref() I was referring to is 
our libvirt virObjectRef() not the one in python. The code where 
segfault occurs is too deep for python to see anyway. One thing that I 
am still worried about is doing virObjectRef() before virObjectLock(). I 
think these two steps should be swapped.

Can you check please whether that also fix your problem when you switch 
those two lines?

Michal




More information about the libvir-list mailing list