[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH 00/11] Generic data stream handling



On Wed, Sep 16, 2009 at 09:35:21AM +0200, Chris Lalancette wrote:
> Daniel P. Berrange wrote:
> > On Tue, Sep 15, 2009 at 02:35:02PM +0200, Chris Lalancette wrote:
> >> I've uploaded the code that I'm trying out at the moment to:
> >>
> >> http://gitorious.org/~clalance/libvirt/clalance-staging/commits/tunnelled-migration
> >>
> >> Dan, can you take a look and make any suggestions about where I might be going
> >> wrong?  
> > 
> > I've not look at your migration code yet, but there's a mistake in your
> > change to the test driver.
> > 
> > http://gitorious.org/~clalance/libvirt/clalance-staging/commit/e77dc1f1ba4e18b4fc6a70198c2f3b253609dc42
> > 
> > The test driver is delibrately not using saferead/write because those
> > helpers do not handle  EAGAIN. If you get EGAIN they'll return -1 and
> > you are left with no idea how much data you've written which is not
> > helpful :-) At very least this will cause the stream to terminate with
> > an error message. If I got something wrong, perhaps its causing a crash.
> 
> Ah, I see.  I've switched that back, and switched over my tunnelled
> implementation as well, but it doesn't seem to have an effect on my problem.

I still see a safewrite() in the your virStreamWrite() impl in the
code currently pushed to gitorious.or, but perhaps you've changed
that locally already. The other thing is that if the stream  open
flags included VIR_STREAM_NONBLOCK, you must make sur eyou put your
socket in non-blocking mode, eg

    if ((st->flags & VIR_STREAM_NONBLOCK) &&
        virSetNonBlock(create ? fds[1] : fds[0]) < 0) {
        virReportSystemError(st->conn, errno, "%s",
                             _("cannot make stream non-blocking"));
        goto error;
    }

in your stream open method. That shouldn't have caused a crash though - it
would merely make libvirtd non-responsive for a while it QEMU blocked
the incoming migration socket.


All in all though the code looks reasonable and I don't see any obvious
problems. I'll have to try running it to see if any crash appears....

Regards,
Daniel
-- 
|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]