Offtopic: bugs and their consequences

How to turn iPhone into a 'brick' with one change of the current date (Attention! Do not try to repeat it yourself!), The most expensive hyphen in US history, Black Monday, division by zero, a real epidemic in the fictional world and other famous bugs …

Bugs-12

Instead of a preface

According to Wikipedia, in programming, a bug (English bug – primary meanings: a bug, any insect, a virus) is a jargon word usually denoting an error in a program or system, due to which the program produces unexpected behavior and, as a result, a result.

The first use of the word bug in relation to technique is attributed to Thomas Edison. According to one of the legends, even while working on the phonograph, he could not understand for a long time why the assembled prototype refused to work. After going through all the possible options in his mind and still not finding a solution, he assumed that a beetle could get between the parts of the device during assembly. And although in fact there were no insects in the phonograph, in the future he continued to use the word bug to refer to annoying malfunctions.

Bugs-04

An example is one of the entries from his work diary, dated 1878:

'This was the case with all my inventions. The first step is intuition, which comes like a flash, then difficulties arise – the device refuses to work, and that's when the 'bugs' – as these small mistakes and difficulties are called – appear and it takes months of close observation, research and effort before it comes to commercial success or failure '

It is curious that the word debugging, which in ours alone means the stage of debugging a program and the search for all possible problems, was found in the 1945 Oxford Dictionary. True, then it was not about programs, but about aircraft engines.

Applied to computers and software, the words 'bug' and 'debugging' were used somewhat later. It is believed that the ancestor of this tradition in 1946 was Rear Admiral of the United States Navy Grace Hopper, who encountered a problem with the Harvard Mark II computer. As it turned out later, the reason for the strange behavior of the computer was the most ordinary moth, which got between the contacts of one of the electromechanical relays. The corpse of the unfortunate insect was carefully removed from the bowels of the car and taped to the page of the work diary. The caption below read: 'First real case of a bug found'.

Bugs-01

In our age, real insects are unlikely to be able to cause the program to malfunction. But their digital cousins ​​annually bring people a bunch of problems. There are plenty of cases in which one tiny programmer mistake led to huge troubles in recent history, and the case in iPhone is still in flower.

Temporary difficulties

Break in 60 seconds

The other day, the owners of equipment Apple accidentally found out that if you set to iPhone or iPad the date January 1, 1970, and then restart the device, it will turn into a 'brick '. The logo Apple will glow on the screen forever and the device will never boot again. Well, or at least – before your visit to the service center, although everything is still not clear with this point.

At the moment, it has been established that the error occurs on mobile devices Apple with 64-bit processors Apple A7, A8, A8X, A9 and A9X. The OS version does not matter. I categorically do not recommend conducting such experiments on your device – this is guaranteed to lead to serious damage, which you cannot cope with on your own. I also want to draw your attention to all sorts of 'jokes' that have been surfing the Internet for the second day. Pranksters suggest changing the time on your smartphone to see a secret Easter egg or to be able to download paid programs from the AppStore for free. The result is a 'brick' instead of a smartphone.

Bugs-14

The essence of the bug. In Unix-like operating systems, time is considered not quite the way we are used to. For Unix, the current time is the number of seconds elapsed from the reference point that was assumed to be midnight on January 1, 1970. For a person, this method is not very convenient, but for a computer – just right. What exactly is going on in the 'head' of iPhone, who decided that he was present at the origin of the Unix universe, is not yet known, but what this does not affect him in the best way is a fact that has been repeatedly verified.

However, no one bothers us to try to guess where exactly the 'bug' has crept in.

Those who played games of the MS-DOS era have probably encountered various bugs that occur when the counter overflows. For example, in Civilization, there was a very peaceful ruler named Gandhi, whose aggression parameter was 1. If you 'placate' him a little more by offering to accept a gift or entering into an alliance, the value of aggression first dropped to zero … and then skyrocketed. The fact is that the variable assumed values ​​from 0 to 255 and, when trying to subtract one from zero, it again became the maximum. The programmers simply did not provide for checking the current value of the variable, which led to an error.

Bugs-05

A similar situation occurred in many other games. For example, in the original X-Com, the most pumped fighter risked suddenly becoming a helpless baby, since with the next increase in the characteristics, the counter values ​​dropped to zero.

We can assume that something similar happens with iPhone – during loading iOS, for some purpose, you need to take a time value that is a couple of seconds less than the current one … and since Since the date January 1, 1970 is already taken by the system as 0, as a result, the value of the 64-bit variable becomes the maximum. For the sake of interest, you can try to calculate what date it turns out, but I very much suspect that our Sun will definitely go out by that time.

I am sure that sooner or later this problem Apple will be dealt with. But on January 19, 2038, I would still advise everyone to be careful – at this very moment the Unix time value will exceed 2147483647 and will no longer fit into a standard variable (unsigned 32-bit integer). And how 32-bit devices around the world will react to this is a mystery.

Millennium bug

Millennium Bug is one of the most notorious OS bugs. In theory, it could lead to the fact that after 2000 the countdown in different operating systems would start from zero. I don’t know how fatal this problem would be, but the situations where the course of treatment would be -99 years and 11 months, or when the patient would have another 80 years to live before his date of birth, cannot be called pleasant.

Bugs-06

The essence of the bug. In many operating systems, the year was recorded with only the last two digits. So, to designate 1998, the numbers 98 were used, for 1999 – 99, and so on. According to this system, the year 2000 was designated as 00, which for a computer was no different from 1900.

Despite its scary name, in practice, this bug did not lead to any special problems. Perhaps we should thank the promptly worked programmers for this, who by 2000 were able to fix most of the software. And it is possible that it was just fear that had big eyes. In any case, truly dangerous bugs look completely different and rarely warn of their existence several years before a potential problem occurs.

Through hardship to the stars

Most expensive hyphen in history

Mariner 1 is a NASA spacecraft that was created to study Venus. The launch of the device took place on July 22, 1962, but within a few minutes after the launch it was destroyed.

The first problems began already 293 seconds after launch, it was at this moment that Mariner 1 lost contact with the Earth. This situation was originally foreseen by the engineers, and the on-board computer took over the control of the apparatus. But the computer immediately 'panicked' and issued a command for a very strong course correction, which at that moment was completely unnecessary and brought Mariner-1 onto a dangerous trajectory. Since the fall of the rocket by that time was almost inevitable, NASA specialists decided to destroy it.

Bugs-07

The essence of the bug. When translating handwritten formulas into program code, the programmer missed the overscore (macron) character. The absence of a single dash in the code led to the fact that the on-board computer began to perceive a slight deviation from the trajectory of movement as very serious and urgently introduced significant amendments, which knocked the missile off course.

However, in some versions of what happened, a hyphen appears instead of the overscore, and someone assumes that while writing a program in Fortran, the programmer simply confused the semicolon.

Copy-paste method

'Ariane 5' (fr. Ariane 5) is a European launch vehicle of the Ariane family, designed to launch a payload into a low reference or geo-transfer orbit. It is still ESA's main launch vehicle and will remain so until at least 2023. And yet, its first launch ended in a crash that was one of the most expensive bugs in history.

The rocket was launched on June 4, 1996. Almost once after the launch, the apparatus entered an off-design trajectory and was destroyed at the 39th second of the flight. Together with the rocket, several scientific satellites with a total value of $ 500 million were lost.

The essence of the bug. While working on the software for the new rocket, the programmers used pieces of ready-made code that they had previously written for Arian 4. As a result, different technical characteristics of the new rocket and a slightly different calculated flight path led to the fact that its current speed exceeded the limitations in the program. At some point, the on-board computer simply could not convert the speed value from 64-bit format to 16-bit (the number turned out to be more than 32.767 and simply 'did not fit' into the variable), which caused the software to malfunction.

Error cost

Foolproof

In September 1997, the US aircraft carrier USS Yorktown drifted at sea for three hours with inoperative on-board computers and a chassis control system. Fortunately for the crew, the situation occurred during training exercises, not combat operations.

The ship's control system consisted of 27 Pentium Pro PC 200-MHz computers on Windows NT, interconnected by high-speed fiber-optic communication lines. This system made it possible to reduce the crew of an aircraft carrier by about 10%, which saved the US Navy about $ 2.8 million per year. And everything went just fine, until at some point a real wave of failures swept across the network, which completely disabled all computers.

Bugs-08

The essence of the bug. You cannot divide by zero – even elementary school students know this. But a computer is not a person, and if asked to divide a number by zero, it will honestly try to do it. Moreover, he will devote all his time and attention to this insoluble task. Unless, of course, the programmer provides for a special 'foolproof', which for some reason was not in the USS Yorktown onboard systems. As a result, when one of the crew members mistakenly entered zero into the onboard control system, it went out of order, leaving the aircraft carrier completely helpless for several hours.

Unfortunately, not all software 'bugs' end so well. Very often they can lead to human casualties, which happened in 1991 during the Gulf War. Due to an error in the software, the Patriot anti-aircraft missile system refused to intercept the launched missile, which led to casualties.

Bugs-09

The essence of the bug. Due to the peculiarities of the rounding of time, every 100 hours of uninterrupted operation of the Patriot air defense system, its clock drifted by about a third of a second. As a result, the computer detected the launch of an enemy missile in time, but due to a bug, over time, it made a critical error when calculating the trajectory. Deciding that the missile no longer existed, the system canceled the interception attempt.

Chain reaction

Computer mind

Black Monday (English Black Monday) – Monday October 19, 1987 – the day on which there was the largest drop in the Dow Jones index in its history. Although in the morning absolutely nothing foreshadowed trouble and there were simply no objective reasons for the market collapse.

Bugs-02

The essence of the bug. There are still several theories of what happened, but in most cases the primitive logic of software trading software is cited as the main reason. At some point, the market began to fall, and the most cautious “electronic assistants” of traders hastened to quickly get rid of all the falling securities. This led to the fact that instead of the usual correction, there was a real chain reaction – the market turned out to be oversaturated, the prices of securities fell even more, and the software of other players was involved in the business. As a result, one tiny snowball provoked a huge mountain avalanche that no one expected at all.

In terms of financial implications, Black Monday was far from the worst event of the last century (although it affected many countries), but many financiers and traders still recall it with shudder. This was the first time that the machines simply pushed people aside and began to play with each other according to their own rules. People, on the other hand, acted in the role of outside observers, too slow and clumsy to be taken into account.

Epidemic

On September 13, 2005, a new update was released to the popular online game World of Warcraft. Among other things, it has a new computer character Hakkar, who owns the unique spell 'Infected Blood'. The player who got under the magic blow began to slowly lose health points, and the effect could spread to any ally who approached him. In general – nothing supernatural, the WOW universe was already full of a bunch of interesting and unusual characters, so many players did not pay attention to this innovation at all.

A few hours later, a terrible epidemic broke out in the world of the game, which mowed down entire cities. The streets were littered with the corpses of the characters of the players, and the survivors in fear shied away from any shadow, fearing to pick up a deadly infection. It was possible to somehow cope with the situation only after restarting the game servers, during which programmers hastily installed a special patch that corrects the error. And I think that many players will remember that day for a long time.

Bugs-10

However, I myself have never played World Of Warcraft and can only retell the incident from hearsay. Perhaps one of the readers will correct me.

The essence of the bug. According to the game designers, the effect was supposed to work only in the home location of Hakkar and could not affect the characters in other places in any way. They did not take into account only one point – an infected player could teleport to another location, infecting unsuspecting neighbors.

Instead of an afterword

Every medal has two sides, and technical progress is no exception. Bugs have entered our lives as firmly as computers, the Internet and mobile phones. Sometimes they are funny, sometimes they are dangerous, but more often they are just unpleasant.

What's funny is that a lot of people are drawn to test all the bugs they find on their own skin. It would seem quite obvious that this is as silly as plugging the spokes into an electrical outlet. But no, the number of people who are specifically ready to insert the stylus into the Galaxy Note in the wrong direction or who decide to check whether the bug with the date on their iPhone will work, is growing every year.

Maybe this is also a kind of bug in modern society, which we all somewhere and once overlooked?

Rate article
About smartphones.
Add a comment