Re: [libvirt] [PATCH 1/2] rpc: client: fix race on stream error and stream creation

2019-02-25 Thread Nikolay Shirokovskiy
On 22.02.2019 18:15, John Ferlan wrote: > > > On 2/15/19 9:10 AM, Nikolay Shirokovskiy wrote: >> Message of API call that creates stream and stream itself have >> same rpc serial. This can lead to issues. If stream got error >> immediately after creation then notification can be delivered >>

Re: [libvirt] [PATCH 1/2] rpc: client: fix race on stream error and stream creation

2019-02-22 Thread John Ferlan
On 2/15/19 9:10 AM, Nikolay Shirokovskiy wrote: > Message of API call that creates stream and stream itself have > same rpc serial. This can lead to issues. If stream got error > immediately after creation then notification can be delivered > before API call reply arrived. This is possible

Re: [libvirt] [PATCH 1/2] rpc: client: fix race on stream error and stream creation

2019-02-15 Thread Nikolay Shirokovskiy
Below is patch that simulates race behaviour. Let's add delay on replying to virDomainOpenConsole and report error for console stream immediately. For this let's use IO helper thread for console fd stream. With this patch you'll get next error in interactive virsh session: (note that a generated

[libvirt] [PATCH 1/2] rpc: client: fix race on stream error and stream creation

2019-02-15 Thread Nikolay Shirokovskiy
Message of API call that creates stream and stream itself have same rpc serial. This can lead to issues. If stream got error immediately after creation then notification can be delivered before API call reply arrived. This is possible because the reply and the error message are sent from different