On 28/05/19 15:06, Jie Wang wrote: > if pr-helper been killed and qemu send disconnect event to libvirt > and libvirt started a new pr-helper process, the new pr-heleper > been killed again when qemu is connectting to the new pr-helper, > qemu will never send disconnect to libvirt, and libvirt will never > receive connected event.
I think this would let a guest "spam" events just by sending a lot PR commands. Also, as you said, in this case QEMU has never sent a "connected" event, so I'm not sure why it should send a disconnection event. Does libvirt monitor at all the pr-helper to check if it dies? Or does it rely exclusively on QEMU's events? Paolo > Signed-off-by: Jie Wang <wangji...@huawei.com> > --- > scsi/pr-manager-helper.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/scsi/pr-manager-helper.c b/scsi/pr-manager-helper.c > index 438380fced..b7341b8f47 100644 > --- a/scsi/pr-manager-helper.c > +++ b/scsi/pr-manager-helper.c > @@ -120,6 +120,7 @@ static int pr_manager_helper_initialize(PRManagerHelper > *pr_mgr, > if (local_err) { > object_unref(OBJECT(sioc)); > error_propagate(errp, local_err); > + pr_manager_send_status_changed_event(pr_mgr); > return -ENOTCONN; > } > >