4 ms·
A new guy was working on a shell script that somehow wound up forking copies of itself. This was in the early 90's on HP workstations that were attached to a c
by g051051 7y ago
A new guy was working on a shell script that somehow wound up forking copies of itself. This was in the early 90's on HP workstations that were attached to a cluster server and relied on it for disk and other services, and he was running his script there. All of the connected workstations froze up.
When my workstation locked up, I stood up and heard a commotion coming from his cube. He was on the phone with one of our sysadmins, desperately trying to kill the processes via his non-functional terminal. I asked for the phone, and told the sysadmin (who still had a functioning terminal) to rename "sh" to something else for a second.
Boom! In just a few seconds all of the processes died out.
I said "Thanks", handed the phone back and went back to my cube while he just stared at me slack-jawed.
- inetknght 7y agoWouldn't `mv` in `mv /bin/sh /bin/sh.old` fail due to pidspace exhaustion from the fork bomb?
- adrianmonk 7y agoWell, you could sacrifice one of your (precious) currently-running shells by doing: exec mv /bin/sh /bin/sh.old
- inetknght 7y ago...assuming the forkbomb required the shell and the currently-running shell has permission then yes. That would work.
- g051051 7y agoIt wasn't pid exhaustion...it was tying up too many resources on the server for it to serve the workstation requests. These were HP 9000 Series 300 workstations configured to share the disk on a "cluster server". You could also log into the server and run jobs, and that's what this guy had done. So while the admin still had control through an existing logon window, the rest of us were stopped because the system was wedged with the fork bomb.
- anonsivalley652 7y agoIn those days, I admined SunOS, Solaris, HP-UX, AIX, SCO, FreeBSD, Linux and Windows NT boxes at a nuclear engineering consultancy that had an IPv4 Class C just for an Ethernet LAN. (Heck, I checked the other day and that defunct company still has the this range allocated for no reason whatsoever: https://whois.arin.net/rest/net/NET-206-197-48-0-1 https://whois.arin.net/rest/net/NET-206-197-48-0-1 ) Fun fact: the hostnames were names of Simpson characters. :) Didn't HP-UX have ulimits configurable per-user?