[Yum] Yum service hangs

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

 



On Wed, 1 Sep 2004 12:24:02 -0700, Michael Stenner wrote:

> On Wed, Sep 01, 2004 at 12:13:07PM -0700, Paul Dickson wrote:
> > In my case, my network is connected via a PPP dialup connection.  As long
> > as the pppd is running, my system doesn't receive ICMP messages about the
> > lack of a connection (pppd queues packets until a connection is made). 
> > Whenever I reconnect, my ISP gives me a new IP address.
> > 
> > Whenever the dialup connection drops, yum transfers end up hanging,
> > sometimes for hours until I interrupt them.
> > 
> > This is why I added the wget option to my copy of yum.  Wget works around
> > the problems I have with downloading.
> 
> I see.  That's an icky problem.  Do you know how wget deals with it?
> Does it just have some sort of high-level timeout?  (ie, not tcp
> timeouts, but its own)
> 

I believe this might be how wget does it (from wget's connect.c):

|  /* Read at most LEN bytes from FD, storing them to BUF.  This is
|     virtually the same as read(), but takes care of EINTR braindamage
|     and uses select() to timeout the stale connections (a connection is
|     stale if more than OPT.READ_TIMEOUT time is spent in select() or
|     read()).  */
|   
|  int
|  iread (int fd, char *buf, int len)
|  {
|    int res;
|  
|  #ifdef HAVE_SELECT
|    if (opt.read_timeout)
|      if (select_fd (fd, opt.read_timeout, 0) <= 0)
|        return -1;
|  #endif
|    do
|      res = READ (fd, buf, len);
|    while (res == -1 && errno == EINTR);
|  
|    return res;
|  }

The file connect.c has a lot of functions with timeout options.

Most seem to use the a function called run_with_timeout at the end of
util.c, see the lengthy comment just before the function.

	-Paul

[Index of Archives]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux