detecting and reacting to a race condition/infinite loop
Is there a way to detect when an image has entered an infinite loop? If so could I then halt it, save the image, and reboot from a previously known good configuration automatically? I have a site with a weird bug on a remote server that has become annoying to debug because when the infinite loop occurs the RFB process becomes unresponsive. Or maybe I should stop running headless temporarily and use X forwarding through SSH. Anyways, is there a way to detect an infinite loop an react to it? Thanks Paul
Hi Paul, and everytime you made a coffee and then you went back to your computer it has rebooted, since the ui-interface noticed it was in an infinite loop waiting for your input <g>. but its generally not really possible. consider an object that has a variable i and these 4 methods: Counter>>initialize i:=0 Counter>>inc i:=i+1 \\ 42 Counter>>count 200 timesRepeat: [self inc] Counter>>dumb [self inc. i<50]whileTrue it would not be sufficient to store the state of _all_ variables, the moment one var changes, it would not be sufficient to store the state of the program at this moment (iow that it is in method inc when i gets set to the same value), you would also need to store the history of the program states (iow that it comes from method dumb). werner
participants (2)
-
Paul DeBruicker -
Werner Kassens