[Yum-devel] keepalives and pain

Ryan Tomayko rtomayko at gmail.com
Fri Oct 8 18:26:28 UTC 2004


On Fri, 8 Oct 2004 09:12:27 -0700, Michael Stenner
<mstenner at linux.duke.edu> wrote:
> On Fri, Oct 08, 2004 at 10:58:19AM -0400, Ryan Tomayko wrote:
> > >So I'm wondering how hard it would be to force close all
> > >keepalives at a certain time.
> >
> > Hmm. Without having a chance to look at the code, I'm pretty sure there
> > is something for that. If I remember correctly, the KeepaliveHandler
> > holds onto a list of what may be active connections. There may even be
> > a close_all method but I don't think you have a clean interface to call
> > it since the Handler is managed by URLGrabber. I can probably take a
> > peak at this later on tonight.
> 
> By default, URLGrabber uses a single keepalive handler.  While I
> generally prefer to not use globals, this has the advantage that
> several grabber instances can use a single connection rather than
> having to use separate one.  This ALSO has the effect that the handler
> is easy to track down.  There is already a global funcion in
> urlgrabber.grabber for closing all connections in the global keepalive
> handler.  You can simply do:
> 
> urlgrabber.grabber.close_all()
> 
> Note: there's nothing that prevents other pieces of code from creating
> other keeplive handler instances.  These will not be affected.
> However, I find it very unlikely that you're doing this so the above
> method should do exactly what you want.
> 
>                                         -Michael
> 
> > On Oct 8, 2004, at 10:32 AM, seth vidal wrote:
> > >Hi,
> > > We've recently discovered, due to a 'feature' in rpmlib that if a
> > >keepalive is left around, especially during a transaction and the
> > >remote
> > >server kills off the connection, that yum will immediately exit w/o any
> > >warning or traceback due to rpmlib catching the SIGPIPE and handling it
> > >via exit(). So I'm wondering how hard it would be to force close all
> > >keepalives at a certain time. So when yum reaches the point where it's
> > >all inside the rpm transaction and no longer downloading anything I can
> > >force close all urlgrabber keepalives, and be reasonably sure that we
> > >won't get any spurious sigpipe's from a server sloughing off extra
> > >connections.
> > >
> > >any ideas?
> > >-sv
> > >
> > >
> > >_______________________________________________
> > >Yum-devel mailing list
> > >Yum-devel at linux.duke.edu
> > >https://lists.dulug.duke.edu/mailman/listinfo/yum-devel
> >
> > _______________________________________________
> > Yum-devel mailing list
> > Yum-devel at linux.duke.edu
> > https://lists.dulug.duke.edu/mailman/listinfo/yum-devel
> 
> --
>   Michael D. Stenner                            mstenner at ece.arizona.edu
>   ECE Department, the University of Arizona                 520-626-1619
>   1230 E. Speedway Blvd., Tucson, AZ 85721-0104                 ECE 524G
> 
> 
> _______________________________________________
> Yum-devel mailing list
> Yum-devel at linux.duke.edu
> https://lists.dulug.duke.edu/mailman/listinfo/yum-devel
>



More information about the Yum-devel mailing list