The moon is waning, it happens ... © Zemfira
Heisenbagom called the kind of software glitches that do not understand where it is, can not be debugged and detected. In a word, he behaves like the same Elusive Joe or Krokovsky cat from a recent post . In my work I had to deal with such and to myself, I called it the effect of quantum mechanics until I learned that the name close in meaning had long been invented. It happens, you send a debugging binary to the customer, which just logs more events around the alleged source of the problem and then the problem disappears!
heisenbug / hi: 'zen-buhg / n.
If you try to isolate it.
I bring to your attention my small informative collection of quantum effects in programming.
The story of this wonderful bug report can be read on Ubuntu Launchpad , and I will briefly outline the essence for those who are not handy to read the link. In the file
system utility there was a bug due to which, the files containing in the 4th byte Tue
defined as Erlang JAM. The defect was present in file
versions 4.21 and 4.24 and was caused by an error in the magic
file.
anon@xX:~$ echo "1/2 Tue" >> file && file file file: Jan 22 14:32:44 MET 1991\011Erlang JAM file - version 4.2 anon@xX:~$ file --version file-4.21 magic file from /etc/magic:/usr/share/file/magic
This led to the fact that on Tuesdays, for the major file
version, the time stamps of PostScript files were similar to Erlang JAM.
%%CreationDate: (Tue Mar 3 19:47:42 2009)
When sending jobs to the Brother family of printers , OpenOffice ran the PostScript file verification procedure, which failed because it detected the type of the Erlang JAM file. The fix basically came down to shielding the space.
+# 4.2 version may have a copyright notice! -+4 string Tue Jan 22 14:32:44 MET 1991 Erlang JAM file - version 4.2 -+79 string Tue Jan 22 14:32:44 MET 1991 Erlang JAM file - version 4.2 ++4 string Tue\ Jan\ 22\ 14:32:44\ MET\ 1991 Erlang JAM file - version 4.2 ++79 string Tue\ Jan\ 22\ 14:32:44\ MET\ 1991 Erlang JAM file - version 4.2
However, even with the huge file
problem was eliminated simply, but by that time the geisenbag was already 9 months old!
sed -e '/^%%CreationDate:/s/Tue/tue/' > $INPUT_TEMP
Once in the open spaces of the network, I came across this beautiful copy of IT humor . Fading from boredom, the Debian developer decided to calculate the dependency of bug reports on the moon phase and quickly wrote such a script writer.
#!/usr/bin/perl -w use strict; use warnings; use constant PI => 3.1415926535; use feature "say"; use SOAP::Lite; use Astro::Coord::ECI::Moon; my $soap = SOAP::Lite->uri('Debbugs/SOAP')->proxy('http://bugs.debian.org/cgi-bin/soap.cgi'); if (!defined($ARGV[0])) { die "E: must have a source package!\n"; } my @bugs = $soap->get_bugs(src=>$ARGV[0])->result(); my $bugsdata = $soap->get_status(@bugs)->result(); my $moon = Astro::Coord::ECI::Moon->new(); my %count = ( 'new' => 0, 'first' => 0, 'full' => 0, 'last' => 0); foreach my $bug (keys %$bugsdata) { my $time = $$bugsdata{$bug}->{date}; my $phase = $moon->phase($time); if ($phase <= 45 * PI / 180 || $phase > 315 * PI / 180) { $count{'new'} = $count{'new'} + 1; } elsif ($phase <= 135 * PI / 180 && $phase > 45 * PI / 180) { $count{'first'} = $count{'first'} + 1; } elsif ($phase <= 225 * PI / 180 && $phase > 135 * PI / 180) { $count{'full'} = $count{'full'} + 1; } elsif ($phase <= 315 * PI / 180 && $phase > 225 * PI / 180) { $count{'last'} = $count{'last'} + 1; } } say "Number of bug submissions during new moon : " . $count{new}; say "Number of bug submissions during first quarter: " . $count{first}; say "Number of bug submissions during full moon : " . $count{full}; say "Number of bug submissions during last quarter : " . $count{last};
The result for the nbd
package was encouraging, the dependency was clearly pecking.
wouter@carillon:~code/perl$ ./debbugsmoon nbd Number of bug submissions during new moon : 2 Number of bug submissions during first quarter: 10 Number of bug submissions during full moon : 1 Number of bug submissions during last quarter : 3
For science, it is possible even in R
to test the hypothesis of functional dependence. There is little data, but the numbers inspire - p-value = 0.005853
.
> chisq.test(c(2, 10, 1, 3)); Chi-squared test for given probabilities data: c(2, 10, 1, 3) X-squared = 12.5, df = 3, p-value = 0.005853 : chisq.test(c(2, 10, 1, 3)) : -
I decided to repeat the experiment after 6 years, and what would you think?
[5153:23311 0:604] 06:09:39 28 [mikayel@redeye: +4] ~ (4:604)$ ./debbugsmoon.pl nbd Number of bug submissions during new moon : 1 Number of bug submissions during first quarter: 12 Number of bug submissions during full moon : 3 Number of bug submissions during last quarter : 1
With this nbd
, something is clearly wrong, the moon phases are now under greater pressure!
> chisq.test(c(1, 12, 3, 1)) Chi-squared test for given probabilities data: c(1, 12, 3, 1) X-squared = 19.471, df = 3, p-value = 0.0002185 : chisq.test(c(1, 12, 3, 1)) : -
Perhaps there are examples and more brightly if we check all 43 thousand Debian Linux packages, but I think this will not be the best waste of time.
A bad dancer doesn’t always succeed in complex steps, and programmers occasionally spoil the moon. We are aware of this, thanks to the hackers of the old schools, published in 1983, the Hacker Dictionary , which has another name - the Jargon File . Since then, the book has withstood several editions and has become a kind of classics of the genre. In the article Phase of the Moon [1] There is a rather interesting bike on the subject.
Once, Guy Steele [2] , while still a student of MIT, I caught a bug in the code of MacLisp [3] , writing timestamps in a separate file containing forms, including the standard approximation function of the moon phase. According to unconfirmed data, Gerry Sussman [4] . Occasionally, the program failed, and it happened every month at the same time due to the fact that the first entry rolled out on a new line, without designating a comment with the symbol ";". The length of the first record depended on the timestamp and a certain phase, that is, it was more than 80 page wide in width, depending on the lunar calendar!
In the same article, another case is mentioned when the program for calculating the result of experiments at the collider LEP accelerator failed at CERN [5] . A long search for the causes of failures has finally led to a clue. LEP perimeter ring, 27 km. length, was very slightly deformed due to the gravity of the moon . This story became part of the folklore among physicists, called Newton's Retribution . For the accuracy of the details of this story I can not vouch, since the so-called. tidal deformations have been known for decades . I would like to know Habr's opinion on this.
I had a completely insane bug on the old laptop that caused the OS to completely or partially freeze while listening to music through USB headphones, and most of the time listening to Internet radio led to a hang. I tolerated it for a couple of years and then, realizing that nothing changes due to the change of versions of the Linux kernel, Xorg and drivers, I sent a bug report to Gentoo Bugzilla .
This happens for already 4 years with kernels starting 2.6.20 to 2.6.31. Similarly, it happened on "HP nc 6220" based on no intel chipset running "Debian Linux 5.x." again USB headphones were Plantronics DSP 300.
It wasn’t been a live CD.
In free translation, this is a complaint that the heisenbag is already 4 years old and it feels equally well on Linux versions of the kernel from 2.6.20 to 2.6.31, on the AMD Radeon Xpress 200M chipset and Intel's 915GM, but for some reason it did not catch on LiveCD distributions.
At the moment of hangup, no error message appeared anywhere and only in /var/log/messages
entry appeared: N URBs still active
, where N is an even number <10. Most likely the case occurred in the snd_usb_audio
kernel snd_usb_audio
, was carelessly processed and brought the system to a stupor .
The last entry in the bug report that I changed the hardware acceleration options for the open radeon
graphics driver
Option "AccelMethod" "EXA" # Option "AccelMethod" "XAA" #
after which the problem evaporated, but it is not clear how and why, because this change is in no way connected with snd_usb_audio
.
Source: https://habr.com/ru/post/308462/