Description of problem: In remoteConnectDomainEventDeregisterAny function, the codes are >> /*The count here calculated is for a connection, not for an event*/ if ((count = virDomainEventStateDeregisterID(conn, priv->domainEventState, callbackID)) < 0) { virReportError(VIR_ERR_RPC, _("unable to find callback ID %d"), callbackID); goto done; } >> /* Here we want a count for an eventID , so there's a situation: we release the resource on the server only once for the whole connection, in which there may be a lot of events registered. At last, we fail to release most resource about events on the server. */ /* If that was the last callback for this eventID, we need to disable * events on the server */ if (count == 0) { args.eventID = callbackID; if (call(conn, priv, 0, REMOTE_PROC_CONNECT_DOMAIN_EVENT_DEREGISTER_ANY, (xdrproc_t) xdr_remote_connect_domain_event_deregister_any_args, (char *) &args, (xdrproc_t) xdr_void, (char *) NULL) == -1) goto done; } Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info:
Fixed upstream by: commit 9712c2510ec87a87578576a407768380e250a6a4 Author: Zhou Yimin <zhouyimin> AuthorDate: 2013-10-17 15:59:21 +0800 Commit: Eric Blake <eblake> CommitDate: 2013-10-18 06:21:29 -0600 remote: fix regression in event deregistration Introduced by 7b87a3 When I quit the process which only register VIR_DOMAIN_EVENT_ID_REBOOT, I got error like: "libvirt: XML-RPC error : internal error: domain event 0 not registered". Then I add the following code, it fixed. Signed-off-by: Zhou Yimin <zhouyimin> Signed-off-by: Eric Blake <eblake> git describe: v1.1.3-185-g9712c25 contains: v1.1.4-rc1~48