<div dir="ltr">I just tried removing the callback before calling virStreamFinish and it worked right, I thought by simply finish the stream would stop the events and close it, the example I was based on only calls virStreamFinish on EOF event.<div><br></div></div><br><div class="gmail_quote"><div dir="ltr">Em qua, 17 de mai de 2017 às 12:49, Martin Kletzander <<a href="mailto:mkletzan@redhat.com">mkletzan@redhat.com</a>> escreveu:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Wed, May 17, 2017 at 09:08:14AM +0200, Martin Kletzander wrote:<br>
>On Wed, May 17, 2017 at 01:01:39AM +0000, JosÉ Luis Valencia Gutierrez wrote:<br>
>>I get just _READABLE events repeatedly, virStreamAbort() doesn't work, it<br>
>>gets out of control after the target domain stops and the unix scocket is<br>
>>deleted. I ended connecting directly to the unix socket. I just wanted to<br>
>>ask if it certainly is a bug or perhaps someone went through this before<br>
>>and have a workaround.<br>
>><br>
><br>
>It's OK workaround if you are on the same host and you can connect to<br>
>the unix socket directly.  But I think this is a bug and we need to fix<br>
>it for others who need to call this remotely.<br>
><br>
>Thanks for letting us know.  Would you mind filing a bug so that we can<br>
>track this issue properly?  I'm currently trying to reproduce the issue,<br>
>although I wasn't successful yet.<br>
><br>
<br>
So I played around with this for a while now and I can partially<br>
reproduce what you are seeing, but with the correct usage it goes away.<br>
So my guess is there is a stray call in your program somewhere or I<br>
didn't reproduce exactly what you meant.<br>
<br>
After receiving the _READABLE event and doing virStreamRecv() that<br>
returns 0 bytes read, did you try immediatelly removing the callback and<br>
calling virStreamFinish() on the stream?<br>
<br>
What you see happening is something that is possible by not removing the<br>
callback and then aborting the stream, for example.<br>
<br>
>>Jose V.<br>
>>Em ter, 16 de mai de 2017 às 05:28, Martin Kletzander <<a href="mailto:mkletzan@redhat.com" target="_blank">mkletzan@redhat.com</a>><br>
>>escreveu:<br>
>><br>
>>> On Fri, Apr 28, 2017 at 11:01:18PM +0000, JosÉ Luis Valencia Gutierrez<br>
>>> wrote:<br>
>>> >Hello everyone,<br>
>>> >I am opening a virChannel(unix) to a domain and receiving data with a<br>
>>> >non-blocking virStream using events, when the connected domain gets<br>
>>> >stopped(which deletes the channel unix socket) by calling destroy,<br>
>>> >shutdown, pause or migrate on that domain, with the stream open the read<br>
>>> >event is triggered repeatedly, and virStreamRecv returns 0 bytes<br>
>>> indicating<br>
>>> > EOF but neither  virStreamFinish nor virStreamFinish is working to stop<br>
>>> >the stream to trigger the event . Each time the event is called I got this<br>
>>> >errors.<br>
>>> ><br>
>>> >libvirt: I/O Stream Utils error : this function is not supported by<br>
>>> >the connection driver: virStreamRecv<br>
>>> ><br>
>>> >libvirt: I/O Stream Utils error : this function is not supported by<br>
>>> >the connection driver: virStreamFinish<br>
>>> ><br>
>>> >libvirt: I/O Stream Utils error : this function is not supported by<br>
>>> >the connection driver: virStreamEventRemoveCallback<br>
>>> ><br>
>>> ><br>
>>> >Is there other way to stop getting this errors? or perhaps this is a bug.<br>
>>> ><br>
>>><br>
>>> This sounds like a bug.  Do you get no other event than just _READABLE?<br>
>>> No _HANGUP or _ERROR?  Does virStreamAbort() work, even though it's<br>
>>> probably not what you are looking for?<br>
>>><br>
>>> >Thanks in advance.<br>
>>> ><br>
>>> >Jose Valencia<br>
>>><br>
>>> >_______________________________________________<br>
>>> >libvirt-users mailing list<br>
>>> ><a href="mailto:libvirt-users@redhat.com" target="_blank">libvirt-users@redhat.com</a><br>
>>> ><a href="https://www.redhat.com/mailman/listinfo/libvirt-users" rel="noreferrer" target="_blank">https://www.redhat.com/mailman/listinfo/libvirt-users</a><br>
>>><br>
<br>
<br>
<br>
>_______________________________________________<br>
>libvirt-users mailing list<br>
><a href="mailto:libvirt-users@redhat.com" target="_blank">libvirt-users@redhat.com</a><br>
><a href="https://www.redhat.com/mailman/listinfo/libvirt-users" rel="noreferrer" target="_blank">https://www.redhat.com/mailman/listinfo/libvirt-users</a><br>
</blockquote></div>