Package: mtr-tiny
Version: 0.67-1

Hi,

mtr in sarge eats 100% CPU when called with -n (don't resolve IP
addresses to hostnames).  It turns out there is a small bug in
select.c's select_loop() that causes select to always be called with a
timeout of 0.

The fix appears quite trivial, and already is in the version in sid:

diff -w -u mtr-0.67-1/select.c mtr-0.67-1.weasel/select.c
--- mtr-0.67-1/select.c 2004-08-26 09:56:53.000000000 +0200
+++ mtr-0.67-1.weasel/select.c  2006-08-24 11:08:23.290440926 +0200
@@ -116,12 +116,14 @@
          selecttime.tv_usec += 1000000;
        }
 
+       if (dns) {
        if ((selecttime.tv_sec > (time_t)dnsinterval) ||
            ((selecttime.tv_sec == (time_t)dnsinterval) &&
             (selecttime.tv_usec > ((time_t)(dnsinterval * 1000000) % 
1000000)))) {
          selecttime.tv_sec = (time_t)dnsinterval;
          selecttime.tv_usec = (time_t)(dnsinterval * 1000000) % 1000000;
        }
+       }
 
        rv = select(maxfd, (void *)&readfd, NULL, NULL, &selecttime);
       }


Is this something that should and could be fixed for the next stable
point release?

Cheers,
Peter
-- 
                           |  .''`.  ** Debian GNU/Linux **
      Peter Palfrader      | : :' :      The  universal
 http://www.palfrader.org/ | `. `'      Operating System
                           |   `-    http://www.debian.org/


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to