Back to Home

Bugs from the USSR / PVS-Studio Blog

ussr · avtoVAZ · evil empire · programming · security · rockets · intuition

Bugs from the USSR

    History is an experience that allows the modern generation not to step on the rake again. But in programming, as in other actively developing areas, such an ideal scenario is not always possible. Why? Because new programming languages ​​are emerging, many processes are becoming more complex, and machines are smarter. In this article I will give two real stories. What unites them? Firstly, time — they all occurred in the USSR; secondly, people - each story could go according to a different scenario if the main characters did not show their best / worst human qualities; thirdly, of course, programming, otherwise the article would simply be inappropriate on our blog.

    Picture 6

    How to prove that you are a real programmer?


    The domestic auto industry is often attacked. Being an active user for some time, I cannot but agree: the quality of our cars could be better. I will not understand the reasons for this state of affairs - not that competence, but you can remember the story of the AvtoVAZ bug.

    Picture 7


    It has been repeatedly cited on different sites, so I’ll do just a brief retelling. In 1983, the talented mathematician Murat Urtembaev was assigned to AvtoVAZ by distribution. The young man was enthusiastic, but the leadership was not inspired by the arrival of a new specialist, putting him in an ordinary position.

    Then Urtembaev decided to prove - he is an excellent programmer and is worthy of respect (high position, rest in a sanatorium, good salary, in the end). Urtembaev’s plan was as follows: he wrote a patch for the counter program, which is responsible for the rhythm of the cycles of supplying nodes to the conveyor line. The patch would cause a malfunction in the automation, the specified parts would not arrive at the right time, and chaos would occur on the production line. Murat himself would have volunteered to open it, thereby opening the eyes of his superiors to the special abilities of an underrated employee.

    But something went wrong. Inserting a virus disk was easy. The patch was supposed to work on the day when Urtembaev left vacation, which averted his suspicions. At the same time, he could carry out the heroic rescue of AvtoVAZ. But apparently Murat was really not a very good programmer, because the automation started to fail 2 days before hour X. Spare parts arrived on the conveyor in the wrong order and at the wrong time. Engineers frantically searched for a technical error, and the last thing they thought about the possibility of a bug in the code. A faulty piece of code was found, but crashes continued.

    Picture 10


    Conscience or vanity made Murat Urtembaev confess to his deed. The programmer was convicted of hooliganism, having given a suspended sentence and obliging to compensate the factory for the cost of two Lada cars.

    Intuition versus Facts


    This story was also widely publicized, although not all of its facts are available to the general public. Why? Because we are talking about the possibility of a nuclear war! September 1983 - the situation in the world cannot be called favorable. Reagan, who was then the president of the United States, openly calls the USSR the " Empire of Evil ." Any provocative action of one of the parties could lead to the breaking of the stretched string of the fragile peace and the outbreak of war.

    100 km from Moscow, the Soviet officer Stanislav Evgrafovich Petrov joined the night operational duty of the Serpukhov-15 command post. The lieutenant colonel personally monitored the situation on the monitor displaying a satellite image.

    Picture 8


    Observation was conducted over the United States. Suddenly a warning appeared on the scoreboard ... the US launched a rocket! The siren howled, an automatic check of the system began, its result - everything is working, there is no error! An alarmingly howling siren escalated the situation, and meanwhile, Petrov needed to make an informed decision. There were two options for action:

    1. Follow the instructions. Seeing that the missiles were flying towards the USSR, Petrov had to press a button. The officers on duty had a nuclear case ready for delivery to the head of the USSR, Yuri Andropov. The time for retaliation was less than 30 minutes. If the USSR launched rockets - on the night of September 26, 1983, a war began.
    2. Trust in intuition. Stanislav Evgrafovich reasoned like this: “There is no missile attack, the computer rebelled - a fool-machine. I am a computer technician, I did them. And since I made them, it cannot be smarter than me, my creator ”( source ). It was impossible to ignore the weighty fact that: "... missile attacks from one base do not start, take off from all at once."

    Data from Petrov’s computer was duplicated to higher-ranking officials who were at a loss: Why did Stanislav Evgrafovich hesitate and did not confirm the attack? They called him. The lieutenant colonel reported: "The information is false."

    Intuition and experience did not disappoint Lieutenant Colonel Petrov. Subsequently, it was proved that the failure of the system occurred due to the influence of external factors that were not previously taken into account: the satellite sensors were exposed to sunlight reflected from high-altitude clouds ( source ). And the computer could not recognize the false signal.

    Assessment of the action of Lieutenant Colonel Petrov was mixed. In the USSR, bureaucracy was respected, and Stanislav Evgrafovich behaved contrary to the instructions. Logically, it should be punished. On the other hand, everyone understood perfectly well if he clicked the alarm button, our side would launch rockets. Real missiles, not points on the map, are the results of a program error. As a result, Petrov received an oral reprimand from his superiors. He soon left the Army. In the rank of lieutenant colonel.

    Picture 9


    In a completely different way, the act of the Soviet officer was taken in the United States. He, unambiguously, was recognized as a hero and received the United Nations Prevented Nuclear War Award. But Stanislav Evgrafovich Petrov still lives in Russia, in a modest apartment in Fryazino. He does not consider himself a hero, but he readily recalls the events of 1983.

    If you are interested in the biography of Lieutenant Colonel Petrov Stanislav Evgrafovich, then you can watch the documentary "The Man Who Saved the World ."

    I will philosophize


    All modern industrial and, especially, military facilities have the necessary software installed. Almost all processes are automated, and, therefore, participation in the work of people becomes less necessary. But at the same time, requirements for software quality are increasing. To do this, it is recommended that you use additional code verification tools at the development stage, including I cannot but name our PVS-Studio static analyzer :). In the course of work, it is also necessary to analyze the security of program code, in particular, search for undeclared features (software bookmarks) using specialized tools. This will protect production from a repetition of the situation with an AvtoVAZ hacker.

    Picture 2

    But, returning to the conclusion, I note that not a single program has intuition, emotions and desires. So can her decision be called impartial? Is it possible to fully trust artificial intelligence? Then, following the prescribed algorithm, in 1983 the USSR would launch rockets. Dear readers, I suggest you speculate on the topic: “Is it possible to entrust the program with making an important decision or should a person be held responsible?”

    Read Next