Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Operating system hangs up + watchdog application for windows

Operating system hangs up + watchdog application for windows

Scheduled Pinned Locked Moved C / C++ / MFC
sysadmintestingjsonhelptutorial
7 Posts 3 Posters 3 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    eli15021979
    wrote on last edited by
    #1

    Hi, Our project(client\server application) support redundancy(i.e there 2 running servers,one of them is the root and the other is the secondary,and there are multiple clients connected to each one of the servers.once the root server is down,the secondary becomes the root server and continue to serve the clients from the same location the other server stopped). The servers uses PING messages between them to realize when a server(which can be the root server) is down(to switch to another root). In addition,we wrote some kind of watchdog application,which is running on each server,and which is being notified by it's server(keep alive events). In case that the watchdog didn't get such keepalive event for a predefined period of time(for example - the server is in endless loop) - the watchdog resets it's server in order to let another server to become a root server. So far so good :-D During one of our unit test,we encountered a problem which causes the operating system(Windows XP) of the root server to hangs(note that not only the server application hangs but the computer is not responding). In such case the watchdog application is not working also,therefor - cannot reset the root server. You probably ask yourself: "So whats the problem? The other server will try to PING to the other root server,and since the PING process will fail,the other server will become the root server." Well......you're wrong!!!!! :doh: For some reason,though the operating system hangs - it still response to PING request. Now for the questions... 1. We're looking for an API which causes the operating system to hangs (so when we'll fiind a solution we will be able test it. 2. Is there another way to stop PING handling while the operating system hangs? 3. Is there a built in watchdog mechanism in Windows XP that we can use(or another watchdog application which runs in a lower level and can reset the computer in case that the operating system hangs? Sorry for the (very) lonk post... With best regards, Eli

    _ D 2 Replies Last reply
    0
    • E eli15021979

      Hi, Our project(client\server application) support redundancy(i.e there 2 running servers,one of them is the root and the other is the secondary,and there are multiple clients connected to each one of the servers.once the root server is down,the secondary becomes the root server and continue to serve the clients from the same location the other server stopped). The servers uses PING messages between them to realize when a server(which can be the root server) is down(to switch to another root). In addition,we wrote some kind of watchdog application,which is running on each server,and which is being notified by it's server(keep alive events). In case that the watchdog didn't get such keepalive event for a predefined period of time(for example - the server is in endless loop) - the watchdog resets it's server in order to let another server to become a root server. So far so good :-D During one of our unit test,we encountered a problem which causes the operating system(Windows XP) of the root server to hangs(note that not only the server application hangs but the computer is not responding). In such case the watchdog application is not working also,therefor - cannot reset the root server. You probably ask yourself: "So whats the problem? The other server will try to PING to the other root server,and since the PING process will fail,the other server will become the root server." Well......you're wrong!!!!! :doh: For some reason,though the operating system hangs - it still response to PING request. Now for the questions... 1. We're looking for an API which causes the operating system to hangs (so when we'll fiind a solution we will be able test it. 2. Is there another way to stop PING handling while the operating system hangs? 3. Is there a built in watchdog mechanism in Windows XP that we can use(or another watchdog application which runs in a lower level and can reset the computer in case that the operating system hangs? Sorry for the (very) lonk post... With best regards, Eli

      _ Offline
      _ Offline
      _Superman_
      wrote on last edited by
      #2

      Create a high priority thread with an infinite loop. This should screw up the system quite bad. SetPriorityClass SetThreadPriority

      «_Superman_» I love work. It gives me something to do between weekends.

      E 1 Reply Last reply
      0
      • _ _Superman_

        Create a high priority thread with an infinite loop. This should screw up the system quite bad. SetPriorityClass SetThreadPriority

        «_Superman_» I love work. It gives me something to do between weekends.

        E Offline
        E Offline
        eli15021979
        wrote on last edited by
        #3

        I don't think it wil work since it is a dual-core computer - so only one CPU will be stucked.. Eli

        _ 1 Reply Last reply
        0
        • E eli15021979

          I don't think it wil work since it is a dual-core computer - so only one CPU will be stucked.. Eli

          _ Offline
          _ Offline
          _Superman_
          wrote on last edited by
          #4

          You're right. It won't work. You could try to starve memory using the /burnmemory switch. Boot Parameters to Manipulate Memory[^]

          «_Superman_» I love work. It gives me something to do between weekends.

          E 1 Reply Last reply
          0
          • _ _Superman_

            You're right. It won't work. You could try to starve memory using the /burnmemory switch. Boot Parameters to Manipulate Memory[^]

            «_Superman_» I love work. It gives me something to do between weekends.

            E Offline
            E Offline
            eli15021979
            wrote on last edited by
            #5

            Thanks for your reply,I will try that. In case it is working - is it mean that ,for some reason,the operating system can't get enough physical memory(which is very weird because it is not consistent). Thanks again, Eli

            _ 1 Reply Last reply
            0
            • E eli15021979

              Thanks for your reply,I will try that. In case it is working - is it mean that ,for some reason,the operating system can't get enough physical memory(which is very weird because it is not consistent). Thanks again, Eli

              _ Offline
              _ Offline
              _Superman_
              wrote on last edited by
              #6

              That option is just to simulate a machine with less physical memory.

              «_Superman_» I love work. It gives me something to do between weekends.

              1 Reply Last reply
              0
              • E eli15021979

                Hi, Our project(client\server application) support redundancy(i.e there 2 running servers,one of them is the root and the other is the secondary,and there are multiple clients connected to each one of the servers.once the root server is down,the secondary becomes the root server and continue to serve the clients from the same location the other server stopped). The servers uses PING messages between them to realize when a server(which can be the root server) is down(to switch to another root). In addition,we wrote some kind of watchdog application,which is running on each server,and which is being notified by it's server(keep alive events). In case that the watchdog didn't get such keepalive event for a predefined period of time(for example - the server is in endless loop) - the watchdog resets it's server in order to let another server to become a root server. So far so good :-D During one of our unit test,we encountered a problem which causes the operating system(Windows XP) of the root server to hangs(note that not only the server application hangs but the computer is not responding). In such case the watchdog application is not working also,therefor - cannot reset the root server. You probably ask yourself: "So whats the problem? The other server will try to PING to the other root server,and since the PING process will fail,the other server will become the root server." Well......you're wrong!!!!! :doh: For some reason,though the operating system hangs - it still response to PING request. Now for the questions... 1. We're looking for an API which causes the operating system to hangs (so when we'll fiind a solution we will be able test it. 2. Is there another way to stop PING handling while the operating system hangs? 3. Is there a built in watchdog mechanism in Windows XP that we can use(or another watchdog application which runs in a lower level and can reset the computer in case that the operating system hangs? Sorry for the (very) lonk post... With best regards, Eli

                D Offline
                D Offline
                David Crow
                wrote on last edited by
                #7

                eli15021979 wrote:

                1. We're looking for an API which causes the operating system to hangs (so when we'll fiind a solution we will be able test it.

                What if you turned off ICMP replies from the server?

                "Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown

                "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups