Mini WTF. How many people does it take to ping a test computer?



  • Apparantly 3 people at Initech.

    Situation is like this:  windows laptop + company network (10.x.x.x) + an extra network PCMCIA card for the test network (192.x.x.x). The idea is to isolate traffic from the company's net.

    Your boss walks by and suspects your test packets are routed through the company's network instead of staying on the test net, but has no proof.

    You want to 'prove' him wrong by demonstrating what happens when you unplug the company's network. A ping to the test machine would still work, because it wasn't routed through the company's net anyway, right?

    H:\>ping 192.168.0.4

    But, oh no!!! It doesn't work!

    I don't want to spoil the 'fun', so I'll leave it as an exercise to the reader why this is a WTF ;-)



  • Discourse touched me in a no-no place

     The only possible WTF can think of is that you have packets to 192.168.0.0/16 routed through a gateway on 10.0.0.0/16 instead of the card on 192.168.0.0

    What did <font face="courier new,courier">netstat -r</font> or <font face="courier new,courier">route print </font>show you?



  • @niwde83 said:

    I'll leave it as an exercise to the reader
     

    You know my doctor told me I should get more exercise. Or did I hear him say exorcize? I'm not really sure. Either way its not working as I'm not feeling healthier. WTF!? 



  • First ever post here - and I'm very concious of looking like a dick - but the only thing I can think of is that the wrong cable was unplugged?

    I look forward to checking back for devastating crtiticism later.



  • @PJH said:

    What did <font face="courier new,courier">netstat -r</font> or <font face="courier new,courier">route print </font>show you?

     

     

    Hint: that didn't work either 



  • @poons said:

    First ever post here - and I'm very concious of looking like a dick - but the only thing I can think of is that the wrong cable was unplugged?

    The right cable was unplugged.


  • Discourse touched me in a no-no place

    @niwde83 said:

    @PJH said:

    What did <font face="courier new,courier">netstat -r</font> or <font face="courier new,courier">route print </font>show you?

     

    Hint: that didn't work either 

    What do you mean 'didn't work'? Neither command actually worked? The results of the commands wouldn't give a clue as to what's wrong?

    Neither command actually changes anything, so of course they won't 'work' as such.



  • Okay, I'll bite: they typed it into Notepad. Or entered it as the URL in a web browser or something.



  • What happens when the network for corpnet is reestablished?


    In the meantime I guess; Firewall? Glitchy driver depends on other network connection to be alive? Target host is down?



  •  

    There WAS no test network, and every single testers computer also connected to both networks?

     

     



  • The laptop's internal wireless device was silently connected, and everyone forgot it?



  • Actually a very nice try!

    Notice the current working directory while doing all this stuff...  Yes, it's subtle.

     



  • Obviously,  H: was a network drive mounted from some server on the production network.

    And the error you got was "The current directory is invalid"

     edit: And actually it's not that much of a WTF, atleast the error is sane... under linux trying to run something from a dead NFS mount just freezes your session for a few minutes.



  • I guess there was an executable in H:\ called ping.exe (or .bat or .com or .cmd) and it got executed instead of the right one...



  • Microsoft Windows XP [Version 5.1.2600]
    (C) Copyright 1985-2001 Microsoft Corp.

    C:\>y:
    The system cannot find the drive specified.

    C:\>subst y: c:\

    C:\>y:

    Y:\>subst y: /d

    Y:\>ping 127.0.0.1
    The current directory is invalid.

    -------------------------------------------------------------------------------------------------------------------------------------

    And how fitting that this is the message i got when i tried to post this reply:

    FILE_NOT_FOUND 

     




  • Y:\>ping 127.0.0.1

    The current directory is invalid.

     

    Right. So, it seems that Windows gives up looking for ping when the cwd is not accesible. 

    It isn't accesible, because they.... ;-)




  • @bdew said:

    edit: And actually it's not that much of a WTF, atleast the error is sane... under linux trying to run something from a dead NFS mount just freezes your session for a few minutes.

     

    Right, this isn't a proper WTF. But too many people (all programmers) had to look at it before it was resolved! TRWTF is that I wasn't the person to discover it :-(
    Still a very funny moment when someone discovered it and everyone went "duh!"!

    About the Linux mount, if you boot diskless... your NFS session will continue eventually. Well... if you're lucky ;-)

     

     



  • @bdew said:

    edit: And actually it's not that much of a WTF, atleast the error is sane... under linux trying to run something from a dead NFS mount just freezes your session for a few minutes.

    Under linux this behaviour is configurable. You get to choose between having an error message come back, or having the program sit and wait and start working again when the server returns. You even get to choose the timeout.

    If you choose settings that you didn't like, that's your own silly fault. 



  • @asuffield said:

    Under linux this behaviour is configurable. You get to choose between having an error message come back, or having the program sit and wait and start working again when the server returns. You even get to choose the timeout.

    If you choose settings that you didn't like, that's your own silly fault. 

    IMHO freezing without any feedback or indication of the reason is not the right thing for a program to do, under any circumstancs and configuration



  • @niwde83 said:


    Y:\>ping 127.0.0.1

    The current directory is invalid.

     

    Right. So, it seems that Windows gives up looking for ping when the cwd is not accesible. 

    It isn't accesible, because they.... ;-)


     

    Here comes captain obvious! The answer is: H drive was unavailable because they disconnected from the network, and H drive was mapped to something on the network.

    Now let's hope captain obvious was correct or captain obvious will have to go cut himself.



  • If that was the case though, how exactly do you mistake an "invalid directory" error for a "100% packet loss" ping message?



  • @bdew said:

    @asuffield said:

    Under linux this behaviour is configurable. You get to choose between having an error message come back, or having the program sit and wait and start working again when the server returns. You even get to choose the timeout.

    If you choose settings that you didn't like, that's your own silly fault. 

    IMHO freezing without any feedback or indication of the reason is not the right thing for a program to do, under any circumstancs and configuration

    So it is your belief that the programs should crash, so that when the server comes back up they're no longer functioning? 



  • @asuffield said:

    @bdew said:


    IMHO freezing without any feedback or indication of the reason is not the right thing for a program to do, under any circumstancs and configuration

    So it is your belief that the programs should crash, so that when the server comes back up they're no longer functioning? 

     

    Shouldn't it tell the user the operation has not completed and give the user the option of timing out?

    I can't believe anyone would actually advocate the program just freezing... 



  • @MasterPlanSoftware said:

    @asuffield said:

    @bdew said:


    IMHO freezing without any feedback or indication of the reason is not the right thing for a program to do, under any circumstancs and configuration

    So it is your belief that the programs should crash, so that when the server comes back up they're no longer functioning? 

     

    Shouldn't it tell the user the operation has not completed and give the user the option of timing out?

    I can't believe anyone would actually advocate the program just freezing... 

     

    You may not have a user. If that program runs as part of some automated script or cronjob, you probably wouldn't want it to fail silently or with a not machine-readable error message. And even if it returns an error code you could process in your script, you still had one possible execution branch more to worry about.

    Of course freezing indefinitely, like going into an endless loop would be silly. But how I understand it, that's not what happens. The program just waits for the disconnected drive to come back and then actually resumes operation. And that seems like a pretty sane and well-defined operation to me.

    If you do not execute that program as part of a script, you can just configure it differently, like assuffield said. 



  • @PSWorx said:

    you probably wouldn't want it to fail silently or with a not machine-readable error message
     

    I wouldn't want it to just sit there with no indication as to it's status either ...



  • @MasterPlanSoftware said:

    @PSWorx said:

    you probably wouldn't want it to fail silently or with a not machine-readable error message
     

    I wouldn't want it to just sit there with no indication as to it's status either ...

     

    Did you read the rest of my post? What do you want a status message for if no one is there to read it?

    Besides, no one said the program could't show or log a status message before it goes into the waiting loop. 



  • @PSWorx said:

    What do you want a status message for if no one is there to read it? 
     

    If I execute something that may fail from a script or program, I want it to to fail or timeout and indicate it's reason for failure. Then at least I have a chance to correct the problem (ie: remount the share or whatever).

    Having it just sit there waiting would be pretty shitty.



  • @PSWorx said:

    If that was the case though, how exactly do you mistake an "invalid directory" error for a "100% packet loss" ping message?

     

    I think this WTF is a bit like the old riddle...


    What's green, and hangs on the wall, whistling? 


    See also [url]http://xkcd.com/169/[/url] for my more considered, in-depth response.



  •  @DaveK said:

    What's green, and hangs on the wall, whistling? 

    Just to ruin this by posting the obvious:

    What's green, hangs on a wall, and whistles?
    A Herring.
    -But a herring isn't green
    You can paint it green
    -But a herring doesn't hang on a wall
    You can NAIL it to a wall
    -But a herring doesn't whistle!
    I threw that in there so it wasn't obvious



  • You really have no business running Linux if you think that this behavior existing isn't acceptable. NFS operations can be interrupted by the smallest of things, like unstable network connections (wireless, anyone?). I would MUCH rather have one particular program pause while wireless is renegotiating on my laptop, rather than erroring out. In fact, I configured my NFS mount specifically for this behavior!

    The freedom present is that we're both free to disagree and configure our mounts to be hard or soft, whichever floats your boat ;)



  • @insta said:

    You really have no business running Linux if you think that this behavior existing isn't acceptable.
    I concur, if worse comes to worse I can check the logs.



  • @MasterPlanSoftware said:

    I want it to to fail or timeout and indicate it's reason for failure

    Then configure your system to do that. Some people want their software to just not fail.



  • I suspect the H drive is a red herring - it could just be a partition on the laptop.  I'm also wondering who the third person was - perhaps the person who noticed that the PCMCIA card wasn't actually connected to the test network either? 



  • @asuffield said:

     Some people want their software to just not fail.

     

    I guess I consider my software sitting there doing nothing when there is a problem failing....



  • @MasterPlanSoftware said:

     @DaveK said:

    What's green, and hangs on the wall, whistling? 

    Just to ruin this by posting the obvious:

     

    NP, someone had to explain it.  I don't know how old it is, but I heard it in the recent Neil Gaiman movie "Mirrormask".  Which is a fantastic movie that I'd recommend to anyone for its humour, beautiful art direction (including CGI), and well-crafted authentic-to-the-fairy-tale-tradition plot.

     

    And just to stray back on-topic for a brief brief moment, I'd like to observe that this behaviour is both necessary and expected, in order to preserve the semantics of program execution under windows, which unlike *nix systems has an implicit '.' in both PATH *and* (the equivalent of) LD_LIBRARY_PATH.  If your $CWD goes away from under your feet, you could end up executing very different code than you thought you were about to - even though ping.exe itself lives far away in a system dir somewhere.


Log in to reply