Current-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
netstat -ia broken
Hi!
Since the last update (7.99.33/amd64/20160705), my bulk builds leave
behind netstat processes with 99% CPU.
Looking at the ps output, they are: "netstat -ia".
When I run this manually, I get
netstat: kvm_read: Bad address
default
netstat: kvm_read: Bad address
default
netstat: kvm_read: Bad address
default
...
repeated forever.
When I run this in the debugger and break on kvm_read, I see:
Breakpoint 1, kread (addr=18446744071586812096, buf=0x7f7fffd001b0 "\020\002\320\377\177\177", size=16) at /disk/6/archive/foreign/src/usr.bin/netstat/main.c:778
778 {
(gdb) n
780 if (kvm_read(kvmd, addr, buf, size) != size) {
(gdb)
785 }
(gdb)
intpr_kvm (ifnetaddr=<optimized out>, pfunc=0x0) at /disk/6/archive/foreign/src/usr.bin/netstat/if.c:291
291 ifnetaddr = (u_long)ifhead.tqh_first;
(gdb)
293 intpr_header();
(gdb)
Name Mtu Network Address Ipkts Ierrs Opkts Oerrs Colls
333 ifaddraddr = 0;
(gdb)
332 if (kread(ifaddraddr, (char *)&ifaddr, sizeof ifaddr)) {
(gdb)
340 print_addr(sa, (void *)&ifaddr, &ifnet.if_data, &ifnet);
(gdb)
296 while (ifnetaddr || ifaddraddr) {
(gdb)
300 if (ifaddraddr == 0) {
(gdb)
301 if (kread(ifnetaddr, (char *)&ifnet, sizeof ifnet))
(gdb)
Breakpoint 1, kread (addr=18446742429720715368, buf=0x7f7fffd00320 "", size=864) at /disk/6/archive/foreign/src/usr.bin/netstat/main.c:778
778 {
(gdb)
780 if (kvm_read(kvmd, addr, buf, size) != size) {
(gdb)
785 }
(gdb)
intpr_kvm (ifnetaddr=18446742429720715368, pfunc=0x0) at /disk/6/archive/foreign/src/usr.bin/netstat/if.c:303
303 memmove(name, ifnet.if_xname, IFNAMSIZ);
(gdb)
304 name[IFNAMSIZ - 1] = '\0'; /* sanity */
(gdb)
305 ifnetaddr = (u_long)ifnet.if_list.tqe_next;
(gdb)
306 if (interface != 0 && strcmp(name, interface) != 0)
(gdb)
308 cp = strchr(name, '\0');
(gdb)
310 if (pfunc) {
(gdb)
315 if ((ifnet.if_flags & IFF_UP) == 0)
(gdb)
317 *cp = '\0';
(gdb)
318 ifaddraddr = (u_long)ifnet.if_addrlist.tqh_first;
(gdb)
320 if (vflag)
(gdb)
323 n = 5;
(gdb)
324 printf("%-*.*s %-5llu ", n, n, name,
(gdb)
326 if (ifaddraddr == 0) {
(gdb)
332 if (kread(ifaddraddr, (char *)&ifaddr, sizeof ifaddr)) {
(gdb)
Breakpoint 1, kread (addr=18446742429716530072, buf=0x7f7fffd001e0 "", size=312) at /disk/6/archive/foreign/src/usr.bin/netstat/main.c:778
778 {
(gdb)
780 if (kvm_read(kvmd, addr, buf, size) != size) {
(gdb)
785 }
(gdb)
intpr_kvm (ifnetaddr=18446742429724440680, pfunc=0x0) at /disk/6/archive/foreign/src/usr.bin/netstat/if.c:340
340 print_addr(sa, (void *)&ifaddr, &ifnet.if_data, &ifnet);
(gdb)
wm0 1500 <Link> XX:XX:XX:XX:XX:XX 683913683 3 588894983 0 0
342 ifaddraddr = (u_long)ifaddr.ifa.ifa_list.tqe_next;
(gdb)
296 while (ifnetaddr || ifaddraddr) {
(gdb)
300 if (ifaddraddr == 0) {
(gdb)
320 if (vflag)
(gdb)
324 printf("%-*.*s %-5llu ", n, n, name,
(gdb)
332 if (kread(ifaddraddr, (char *)&ifaddr, sizeof ifaddr)) {
(gdb)
Breakpoint 1, kread (addr=18446742429743568272, buf=0x7f7fffd001e0 "\030Da:�\376\377\377", size=312) at /disk/6/archive/foreign/src/usr.bin/netstat/main.c:778
778 {
(gdb)
780 if (kvm_read(kvmd, addr, buf, size) != size) {
(gdb)
785 }
(gdb)
intpr_kvm (ifnetaddr=18446742429724440680, pfunc=0x0) at /disk/6/archive/foreign/src/usr.bin/netstat/if.c:340
340 print_addr(sa, (void *)&ifaddr, &ifnet.if_data, &ifnet);
(gdb)
Breakpoint 1, kread (addr=72057589742961159, buf=0x7f7fffcffd50 "bc:ee:7b:dc:50:28", size=48) at /disk/6/archive/foreign/src/usr.bin/netstat/main.c:778
778 {
(gdb)
780 if (kvm_read(kvmd, addr, buf, size) != size) {
(gdb)
781 warnx("%s", kvm_geterr(kvmd));
(gdb)
netstat: kvm_read: Bad address
785 }
(gdb)
Thomas
Home |
Main Index |
Thread Index |
Old Index