I recently downloaded and installed Ubuntu 15 with Kernel 4.2.0 and then ran the event-example.c file. It ran normally and I stopped it and then ran it again about one minute later and go the error:
[root@xenserver-testbed examples]# ./event-example BUNTU15 1631
xc: error: Failed to populate ring pfn
(16 = Device or resource busy): Internal error
VMI_ERROR: vm_event is (or was) active on this domain
VMI_ERROR: Failed to initialize xen events.
Failed to init LibVMI library.
(process:13363): GLib-CRITICAL **: g_hash_table_destroy: assertion 'hash_table != NULL' failed
VMI_ERROR: Error disabling monitor vm_event ring.
[root@xenserver-testbed examples]#