hyperhq / runv

Hypervisor-based Runtime for OCI
Apache License 2.0
828 stars 129 forks source link

avoid missing event #426

Closed laijs closed 7 years ago

laijs commented 7 years ago

result := vm.WaitResponse() send event to ctx.HUB [ the vm loop handles the event and sends a response event back, [ but vm.GetResponseChan() in the vm.WaitResponse() might be [ later than the response event, and the response event will not [ be caught, and the next statement will deadlock ] <-result

fix it by moving vm.GetResponseChan() up (out of the go routine).

Signed-off-by: Lai Jiangshan jiangshanlai@gmail.com

laijs commented 7 years ago

@gao-feng