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