When error checking failed.
My use of Microsoft Windows relies pretty heavily on Cygwin. Cygwin makes most development tasks on this OS at least bearable. The last few months though I've had issues with using the Cygwin provided setup.exe to update my components.
Usually the problem manifests itself at the end of the component update where the setup program just plain crashes (with the usual send error report to /dev/null that nobody investigates anyway). After a few attempts it seemed to always occur at "uninstalling bash..." stage where the setup tries to uninstall the existing bash component before updating with new one.
This bothered me a bit but not enough to warrant a hunt for a fix (other things to do, right?). I guess I was kinda hoping that the Cygwin team would eventually find the issue, create a new setup.exe and I would have my excellent Cygwin environment back to normal. No need for me to lift my finger. So I spent the last few months working around the problem, disabling the automated component updates that would hit this issue and updating just the pieces I really, really needed to have updated.
Two days ago though I could no longer avoid it. I needed to install automake, autoconf and libtool on my system to (attempt to) compile some LIRC code and getting these components installed utterly failed every time. Uninstalling bash.... crash.
So no choice but to go hunting for a fix. Google is a great help here. It appears the problem is somewhat rare but not unknown. As it happens, it's possible to end up with corrupt packages in your /etc/setup directory.
Now how these got corrupted I don't know. I have a vague memory of either setup or Windows crashing once in the middle of the update process for whatever reason. Unfortunately the Cygwin setup does not deal graciously with such a corrupt file -- instead you get a big, fat, cryptic application crash everytime when it touches a corrupt file.
So a lesson there to all developers (which we all already know but are too often too lazy to follow): make sure you spend time testing the error conditions of your software. Imagine every possible strange thing your users can do or the strange states their systems may end up in and test against those. And then test some more.
Your users will appreciate it.
It can be a pain in the ass to do but try to do it anyway. It can make all the difference in getting your software adopted.
Finally, to anyone who might end up here trying to fix the same or similar problem. Just delete the offending *.tgz from your /etc/setup. Apparently doing so is not harmful. You can easily figure out if there's a problem with any of these files by trying to open the package with any of your favorite unzip/gzip/tar tool first.
Usually the problem manifests itself at the end of the component update where the setup program just plain crashes (with the usual send error report to /dev/null that nobody investigates anyway). After a few attempts it seemed to always occur at "uninstalling bash..." stage where the setup tries to uninstall the existing bash component before updating with new one.
This bothered me a bit but not enough to warrant a hunt for a fix (other things to do, right?). I guess I was kinda hoping that the Cygwin team would eventually find the issue, create a new setup.exe and I would have my excellent Cygwin environment back to normal. No need for me to lift my finger. So I spent the last few months working around the problem, disabling the automated component updates that would hit this issue and updating just the pieces I really, really needed to have updated.
Two days ago though I could no longer avoid it. I needed to install automake, autoconf and libtool on my system to (attempt to) compile some LIRC code and getting these components installed utterly failed every time. Uninstalling bash.... crash.
So no choice but to go hunting for a fix. Google is a great help here. It appears the problem is somewhat rare but not unknown. As it happens, it's possible to end up with corrupt packages in your /etc/setup directory.
Now how these got corrupted I don't know. I have a vague memory of either setup or Windows crashing once in the middle of the update process for whatever reason. Unfortunately the Cygwin setup does not deal graciously with such a corrupt file -- instead you get a big, fat, cryptic application crash everytime when it touches a corrupt file.
So a lesson there to all developers (which we all already know but are too often too lazy to follow): make sure you spend time testing the error conditions of your software. Imagine every possible strange thing your users can do or the strange states their systems may end up in and test against those. And then test some more.
Your users will appreciate it.
It can be a pain in the ass to do but try to do it anyway. It can make all the difference in getting your software adopted.
Finally, to anyone who might end up here trying to fix the same or similar problem. Just delete the offending *.tgz from your /etc/setup. Apparently doing so is not harmful. You can easily figure out if there's a problem with any of these files by trying to open the package with any of your favorite unzip/gzip/tar tool first.

2 comments:
Excellent Information ! I had exactly the same issue on VISTA.
Hello Frank,
Glad to hear the information was useful to you.
Post a Comment