]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Destructed objects that were never born are not alive.
authorAlex Rousskov <rousskov@measurement-factory.com>
Mon, 13 Jun 2016 23:25:45 +0000 (17:25 -0600)
committerAlex Rousskov <rousskov@measurement-factory.com>
Mon, 13 Jun 2016 23:25:45 +0000 (17:25 -0600)
Such objects are typical in partial logs that are missing some
construction events.

scripts/find-alive.pl

index 21438bc4e98c953253cc87ba3b87738dfb373b90..6cccebf579a0e73931c49ae296c25a1e5a146085 100755 (executable)
@@ -97,8 +97,12 @@ while (<STDIN>) {
        } 
        elsif (my @deIds = (/$reDestructor/)) {
                my $id = join(':', @deIds);
-               #warn("unborn: $_") unless $AliveCount{$id};
-               $AliveImage{$id} = undef() unless --$AliveCount{$id};
+               if ($AliveCount{$id}) {
+                       $AliveImage{$id} = undef() unless --$AliveCount{$id};
+               } else {
+                       #warn("unborn: $_");
+                       # do nothing; we are probably looking at a partial log
+               }
        }
 }