netstat Acting Up?

Discussion in 'Mac OS X 10.3 (Panther) Discussion' started by Makosuke, Nov 11, 2003.

  1. Makosuke macrumors 603

    Joined:
    Aug 15, 2001
    Location:
    The Cool Part of CA, USA
    #1
    This is the second time I've had a rather weird occurance with my G5 and 10.3; I'm sitting there, minding my own business, when suddenly a netstat process starts sucking up nearly an entire CPU, something I never saw under I never saw this under 10.2.

    Activity monitor shows a netstat process using between 80-100% CPU; the heirerchical view shows that it was spawned by sh (along with sed), which was spawned by another sh, which came from configd, which is in turn under mach_init.

    Restarting last time stopped it, but I did nothing to start this proccess, and after severalminutes and sleeping more than once it has not stopped or reduced processor usage.

    Anybody know what might be causing this? Is it normal, or is something amiss?
     
  2. Makosuke thread starter macrumors 603

    Joined:
    Aug 15, 2001
    Location:
    The Cool Part of CA, USA
    #2
    I'm bumping this topic because I have a bit more info, and I'm hoping a UNIX guru can maybe offer a suggestion.

    First, I know roughly what's happening now: If you use Network Utility to "Display routing table information", it usually gives you some useful information. However, after my G5 has been on for about two days, doing that will repeatably produce an infinite string of "netstat: kvm_read: Bad address" errors, stalling Network Utility unless I force quit it. The other netstat commands work fine.

    What's happening with the OS is that every day or so (the daily /etc script?), some automatic process launches netstat and a sed process to process it's output. However, whatever it is apparently chokes on the infinite loop netstat ends up in, and chews up an entire processor in the process with a netstat that won't die. If I kill that netstat, it stays dead for about another day until whatever it is happens again.

    That's the sob story. The question is, what's wrong with netstat, and why does it suddenly start going haywire after a couple of days of uptime?

    According to some Google searching on UNIX lists, this misbehavior is usually caused when the version of the kernel is out of synch with netstat, or it's not named properly... but neither of those should be the case, and it doesn't seem like it should suddenly start happening after a while.

    Also: I'm not the only one seeing it; at least one more G5 owner on the Apple forums is having the same thing happen. He "fixed" it by renaming netstat, a crude hack.

    Help? Please?
     
  3. bousozoku Moderator emeritus

    Joined:
    Jun 25, 2002
    Location:
    Gone but not forgotten.
    #3
    kvm_read seems to be a call to Mach's virtual memory read, apparently to an already disposed address. This is far scarier than a netstat problem. :eek:

    I normally don't use Network Utility because I prefer to filter netstat's output myself. However, my machines run 24/7 and I haven't noticed a problem...yet.
     
  4. Makosuke thread starter macrumors 603

    Joined:
    Aug 15, 2001
    Location:
    The Cool Part of CA, USA
    #4
    Scary--exactly. When I first noticed netstat freaking out, I wanted to know why--if there's something amiss, I want to know if it's a fluke, or a symptom of something larger.

    Now that I know what, roughly, is wrong, I'm even more uncomfortable with the situation--it's repeatable, unplesant-looking, I don't have any idea what's causing it, and I don't know if it's a symptom of something more pervasive.

    I could always reinstall from scratch, but it took me two weeks to get everything re-customized just after an archive-and-upgrade install. I REALLY don't want to have to do that again.
     
  5. bousozoku Moderator emeritus

    Joined:
    Jun 25, 2002
    Location:
    Gone but not forgotten.
    #5
    I wonder if a number of little crashes have to do with virtual memory problems. I wouldn't be surprised. Apple has probably optimised it so that it goes too fast for its own good. Sound like Safari caching?

    Hopefully, 10.3.2 will put all these little things to rest.

    Have you sent feedback to Apple?
     
  6. plympton macrumors newbie

    Joined:
    Jul 22, 2002
    #6
    Any info on this one?

    I'm always getting 90%+ CPU usage from netstat - I ran Photoshop last night, loaded about 60 RAW files at once, converted them, saved to TIFF. This morning, I wake up the machine to 90+ Netstat usage. I just do a force-quit, and it's all "fine", but need to know if there's something worse going on. I'd hate to do a wipe-and-reload. Ugh.

    Dual 2Gig G5, 4 Gigs memory, 160+250 Gig HD.

    -Dan
     

Share This Page