Your message dated Tue, 04 Sep 2018 08:35:17 +0000
with message-id <[email protected]>
and subject line Bug#907602: fixed in abi-compliance-checker 2.3-0.2
has caused the Debian Bug report #907602,
regarding abi-compliance-checker: reduce memory high water mark for a-c-c
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
907602: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=907602
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: abi-compliance-checker
Version: 2.3-0.1
Severity: minor
Tags: patch
User: [email protected]
Usertags: origin-ubuntu cosmic ubuntu-patch

Dear Mathieu,

Recently, telepathy-logger-qt has started failing its autopkgtests on
ppc64el on Ubuntu infrastructure.  We have tracked this down to the fact
that a-c-c's memory usage for this particular library on this architecture
now exceeds half of the free memory on the small VMs used for autopkgtests,
and late in the process a-c-c will call system("tar") to compress the
result, and this requires 2x memory in the moment.

Since freeing memory down to the kernel level is non-trivial in perl, I've
prepared a patch that addresses this by spawning a subprocess early to
handle the other system() calls.  Feedback welcome.

Thanks,
-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                   https://www.debian.org/
[email protected]                                     [email protected]
diff -Nru abi-compliance-checker-2.3/debian/patches/oom-exec-helper.patch 
abi-compliance-checker-2.3/debian/patches/oom-exec-helper.patch
--- abi-compliance-checker-2.3/debian/patches/oom-exec-helper.patch     
1969-12-31 16:00:00.000000000 -0800
+++ abi-compliance-checker-2.3/debian/patches/oom-exec-helper.patch     
2018-08-29 16:27:40.000000000 -0700
@@ -0,0 +1,294 @@
+Description: Run packing commands in a subprocess
+ On low-memory VMs (such as autopkgtest runners at scale), a-c-c can OOM when
+ trying to launch a subprocess towards the end of the run due to the main
+ process's memory usage being >= 50% of available system memory.  Since
+ freeing memory for no-longer-needed variables is non-trivial in perl, just
+ address this by creating a subprocess for handling any system() calls late
+ in the process.
+Author: Steve Langasek <[email protected]>
+Last-Modified: 2018-08-29
+
+Index: abi-compliance-checker-2.3/abi-compliance-checker.pl
+===================================================================
+--- abi-compliance-checker-2.3.orig/abi-compliance-checker.pl
++++ abi-compliance-checker-2.3/abi-compliance-checker.pl
+@@ -60,6 +60,9 @@
+ use Cwd qw(abs_path cwd);
+ use Data::Dumper;
+ 
++# stupid pipe tricks
++use IO::Handle;
++
+ my $TOOL_VERSION = "2.3";
+ my $ABI_DUMP_VERSION = "3.5";
+ my $ABI_DUMP_VERSION_MIN = "3.5";
+@@ -9340,9 +9343,9 @@
+                 exitStatus("Not_Found", "can't find \"tar\" command");
+             }
+             chdir($UnpackDir);
+-            system("$TarCmd -xvzf \"$Path\" >\"$TmpDir/null\"");
+-            if($?) {
+-                exitStatus("Error", "can't extract \'$Path\' ($?): $!");
++            my @res = child_exec("$TarCmd -xvzf \"$Path\" >\"$TmpDir/null\"");
++            if($res[0]) {
++                exitStatus("Error", "can't extract \'$Path\' ($res[0]): 
$res[1]");
+             }
+             chdir($In::Opt{"OrigDir"});
+             my @Contents = cmdFind($UnpackDir, "f");
+@@ -9371,11 +9374,11 @@
+         my $Pkg = $To."/".$Name.".zip";
+         unlink($Pkg);
+         chdir($To);
+-        system("$ZipCmd -j \"$Name.zip\" \"$Path\" 
>\"".$In::Opt{"Tmp"}."/null\"");
+-        if($?)
++        my @res = child_exec("$ZipCmd -j \"$Name.zip\" \"$Path\" 
>\"".$In::Opt{"Tmp"}."/null\"");
++        if($res[0])
+         { # cannot allocate memory (or other problems with "zip")
+             chdir($In::Opt{"OrigDir"});
+-            exitStatus("Error", "can't pack the ABI dump: ".$!);
++            exitStatus("Error", "can't pack the ABI dump: ".$res[1]);
+         }
+         chdir($In::Opt{"OrigDir"});
+         unlink($Path);
+@@ -9395,10 +9398,10 @@
+         if(-e $Pkg) {
+             unlink($Pkg);
+         }
+-        system($TarCmd, "-C", $From, "-czf", $Pkg, $Name);
+-        if($?)
++        @res = child_exec($TarCmd, "-C", $From, "-czf", $Pkg, $Name);
++        if($res[0])
+         { # cannot allocate memory (or other problems with "tar")
+-            exitStatus("Error", "can't pack the ABI dump: ".$!);
++            exitStatus("Error", "can't pack the ABI dump: ".$res[1]);
+         }
+         unlink($Path);
+         return $To."/".$Name.".tar.gz";
+@@ -10143,6 +10146,38 @@
+     initAliases_TypeAttr($LVer);
+ }
+ 
++sub child_exec(@)
++{
++    # known failure to handle values that need shell escaping.
++    print CHILD_WTR join(' ',@_) . "\n";
++    chomp($line = <CHILD_RDR>);
++    my @results = split(/ /,$line, 2);
++    return (int($results[0]),$results[1]);
++}
++
++sub reap_child(@)
++{
++    my ($handle, $pid) = @_;
++    print $handle "exit\n";
++    close $handle;
++    waitpid($pid,0);
++    exit(0);
++}
++
++sub exec_helper(@)
++{
++    my ($reader, $writer) = @_;
++    do {
++        chomp($line = <$reader>);
++      next if (!$line);
++        if ($line eq 'exit') {
++            exit(0);
++        }
++        system($line);
++        print $writer "$? $!\n";
++    } while(1);
++}
++
+ sub scenario()
+ {
+     setTarget("default");
+@@ -10395,6 +10430,22 @@
+         testTool();
+         exit(0);
+     }
++
++    # stupid pipe tricks
++    pipe(PARENT_RDR, CHILD_WTR);
++    pipe(CHILD_RDR, PARENT_WTR);
++    CHILD_WTR->autoflush(1);
++    PARENT_WTR->autoflush(1);
++    if ($helper_pid = fork()) {
++        close PARENT_RDR;
++        close PARENT_WTR;
++    } else {
++        die "cannot fork: $!" unless defined $helper_pid;
++        close CHILD_RDR;
++        close CHILD_WTR;
++        exec_helper(PARENT_RDR, PARENT_WTR);
++    }
++
+     if($In::Opt{"DumpSystem"})
+     { # --dump-system
+         if(not $In::Opt{"TargetSysInfo"})
+@@ -10406,10 +10457,12 @@
+         }
+         
+         if(not $In::Opt{"TargetSysInfo"}) {
++            reap_child(CHILD_WTR, $helper_pid);
+             exitStatus("Error", "-sysinfo option should be specified to dump 
system ABI");
+         }
+         
+         if(not -d $In::Opt{"TargetSysInfo"}) {
++            reap_child(CHILD_WTR, $helper_pid);
+             exitStatus("Access_Error", "can't access 
\'".$In::Opt{"TargetSysInfo"}."\'");
+         }
+         
+@@ -10417,6 +10470,7 @@
+         if($In::Opt{"DumpSystem"}=~/\.(xml|desc)\Z/)
+         { # system XML descriptor
+             if(not -f $In::Opt{"DumpSystem"}) {
++                reap_child(CHILD_WTR, $helper_pid);
+                 exitStatus("Access_Error", "can't access file 
\'".$In::Opt{"DumpSystem"}."\'");
+             }
+             
+@@ -10434,12 +10488,15 @@
+             my $SystemRoot = $In::Opt{"SystemRoot"};
+             
+             if(not -e $SystemRoot."/usr/lib") {
++                reap_child(CHILD_WTR, $helper_pid);
+                 exitStatus("Access_Error", "can't access 
'".$SystemRoot."/usr/lib'");
+             }
+             if(not -e $SystemRoot."/lib") {
++                reap_child(CHILD_WTR, $helper_pid);
+                 exitStatus("Access_Error", "can't access 
'".$SystemRoot."/lib'");
+             }
+             if(not -e $SystemRoot."/usr/include") {
++                reap_child(CHILD_WTR, $helper_pid);
+                 exitStatus("Access_Error", "can't access 
'".$SystemRoot."/usr/include'");
+             }
+             readSysDesc("
+@@ -10457,6 +10514,7 @@
+                 </search_libs>");
+         }
+         else {
++            reap_child(CHILD_WTR, $helper_pid);
+             exitStatus("Error", "-sysroot <dirpath> option should be 
specified, usually it's \"/\"");
+         }
+         detectDefaultPaths(undef, undef, "bin", "gcc"); # to check symbols
+@@ -10466,6 +10524,7 @@
+             checkWin32Env();
+         }
+         dumpSystem();
++        reap_child(CHILD_WTR, $helper_pid);
+         exit(0);
+     }
+     
+@@ -10481,17 +10540,20 @@
+         }
+         
+         cmpSystems($In::Desc{1}{"Path"}, $In::Desc{2}{"Path"});
++        reap_child(CHILD_WTR, $helper_pid);
+         exit(0);
+     }
+     
+     if(not $In::Opt{"CountSymbols"})
+     {
+         if(not $In::Opt{"TargetLib"}) {
++            reap_child(CHILD_WTR, $helper_pid);
+             exitStatus("Error", "library name is not selected (-l option)");
+         }
+         else
+         { # validate library name
+             if($In::Opt{"TargetLib"}=~/[\*\/\\]/) {
++                reap_child(CHILD_WTR, $helper_pid);
+                 exitStatus("Error", "\"\\\", \"\/\" and \"*\" symbols are not 
allowed in the library name");
+             }
+         }
+@@ -10504,6 +10566,7 @@
+     if(my $SymbolsListPath = $In::Opt{"SymbolsListPath"})
+     {
+         if(not -f $SymbolsListPath) {
++            reap_child(CHILD_WTR, $helper_pid);
+             exitStatus("Access_Error", "can't access file 
\'$SymbolsListPath\'");
+         }
+         foreach my $S (split(/\s*\n\s*/, readFile($SymbolsListPath)))
+@@ -10515,6 +10578,7 @@
+     if(my $TypesListPath = $In::Opt{"TypesListPath"})
+     {
+         if(not -f $TypesListPath) {
++            reap_child(CHILD_WTR, $helper_pid);
+             exitStatus("Access_Error", "can't access file 
\'$TypesListPath\'");
+         }
+         foreach my $Type (split(/\s*\n\s*/, readFile($TypesListPath)))
+@@ -10526,6 +10590,7 @@
+     if(my $SymbolsListPath = $In::Opt{"SkipSymbolsListPath"})
+     {
+         if(not -f $SymbolsListPath) {
++            reap_child(CHILD_WTR, $helper_pid);
+             exitStatus("Access_Error", "can't access file 
\'$SymbolsListPath\'");
+         }
+         foreach my $Interface (split(/\s*\n\s*/, readFile($SymbolsListPath)))
+@@ -10537,6 +10602,7 @@
+     if(my $TypesListPath = $In::Opt{"SkipTypesListPath"})
+     {
+         if(not -f $TypesListPath) {
++            reap_child(CHILD_WTR, $helper_pid);
+             exitStatus("Access_Error", "can't access file 
\'$TypesListPath\'");
+         }
+         foreach my $Type (split(/\s*\n\s*/, readFile($TypesListPath)))
+@@ -10548,6 +10614,7 @@
+     if(my $HeadersList = $In::Opt{"SkipHeadersPath"})
+     {
+         if(not -f $HeadersList) {
++            reap_child(CHILD_WTR, $helper_pid);
+             exitStatus("Access_Error", "can't access file \'$HeadersList\'");
+         }
+         foreach my $Path (split(/\s*\n\s*/, readFile($HeadersList)))
+@@ -10560,6 +10627,7 @@
+     if(my $ParamNamesPath = $In::Opt{"ParamNamesPath"})
+     {
+         if(not -f $ParamNamesPath) {
++            reap_child(CHILD_WTR, $helper_pid);
+             exitStatus("Access_Error", "can't access file 
\'$ParamNamesPath\'");
+         }
+         foreach my $Line (split(/\n/, readFile($ParamNamesPath)))
+@@ -10587,6 +10655,7 @@
+     if(my $AppPath = $In::Opt{"AppPath"})
+     {
+         if(not -f $AppPath) {
++            reap_child(CHILD_WTR, $helper_pid);
+             exitStatus("Access_Error", "can't access file \'$AppPath\'");
+         }
+         
+@@ -10599,6 +10668,7 @@
+     if(my $Path = $In::Opt{"CountSymbols"})
+     {
+         if(not -e $Path) {
++            reap_child(CHILD_WTR, $helper_pid);
+             exitStatus("Access_Error", "can't access \'$Path\'");
+         }
+         
+@@ -10643,6 +10713,7 @@
+         }
+         
+         printMsg("INFO", $Count);
++        reap_child(CHILD_WTR, $helper_pid);
+         exit(0);
+     }
+     
+@@ -10651,9 +10722,11 @@
+         createABIFile(1, $In::Opt{"DumpABI"});
+         
+         if($In::Opt{"CompileError"}) {
++            reap_child(CHILD_WTR, $helper_pid);
+             exit(getErrorCode("Compile_Error"));
+         }
+         
++        reap_child(CHILD_WTR, $helper_pid);
+         exit(0);
+     }
+     
+@@ -10670,6 +10743,7 @@
+     elsif($In::Opt{"SrcOnly"}) {
+         compareAPIs("Source");
+     }
++    reap_child(CHILD_WTR, $helper_pid);
+     exitReport();
+ }
+ 
diff -Nru abi-compliance-checker-2.3/debian/patches/series 
abi-compliance-checker-2.3/debian/patches/series
--- abi-compliance-checker-2.3/debian/patches/series    2018-07-19 
11:57:41.000000000 -0700
+++ abi-compliance-checker-2.3/debian/patches/series    2018-08-29 
16:17:20.000000000 -0700
@@ -1,2 +1,3 @@
 bug798481.patch
 typos.patch
+oom-exec-helper.patch

--- End Message ---
--- Begin Message ---
Source: abi-compliance-checker
Source-Version: 2.3-0.2

We believe that the bug you reported is fixed in the latest version of
abi-compliance-checker, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Gianfranco Costamagna <[email protected]> (supplier of updated 
abi-compliance-checker package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Tue, 04 Sep 2018 10:28:14 +0200
Source: abi-compliance-checker
Binary: abi-compliance-checker dh-acc
Architecture: source
Version: 2.3-0.2
Distribution: unstable
Urgency: medium
Maintainer: Mathieu Malaterre <[email protected]>
Changed-By: Gianfranco Costamagna <[email protected]>
Description:
 abi-compliance-checker - tool to compare ABI compatibility of shared C/C++ 
library version
 dh-acc     - debhelper addon to compare ABI compatibility of shared C/C++ libr
Closes: 907602 907604
Changes:
 abi-compliance-checker (2.3-0.2) unstable; urgency=medium
 .
   * Non-maintainer upload
 .
   [ Steve Langasek ]
   * debian/patches/fpic-for-arm64.patch: require -fPIC on arm64 in
     addition to x86_64 and arm (Closes: #907604).
   * debian/patches/oom-exec-helper.patch: Run packing commands in a
     subprocess (Closes: #907602).
Checksums-Sha1:
 c409a637355c939bcf66020c5fb3df2a7b9fc187 1966 
abi-compliance-checker_2.3-0.2.dsc
 1d1de947f5b5ee1ad70c96e54f616380e53d72e9 10000 
abi-compliance-checker_2.3-0.2.debian.tar.xz
 b57051e9d25f6755fb2d8e4c59d744ea74ecb2ed 6164 
abi-compliance-checker_2.3-0.2_source.buildinfo
Checksums-Sha256:
 710fd13285aab9cdefb2d7aea2bb8fcaf39401ca2a0e790d95da1f1ec8249c70 1966 
abi-compliance-checker_2.3-0.2.dsc
 e1e9f57eb6cd584eea6c00a2e95ecc597eebc5aa8887af1e6e76bab7d5dab415 10000 
abi-compliance-checker_2.3-0.2.debian.tar.xz
 d4111919a3752eb1f09041404a82999687e405ab653dc80e280a6292fff91928 6164 
abi-compliance-checker_2.3-0.2_source.buildinfo
Files:
 89e02f5f8ac33415951da567cdbf01e1 1966 devel optional 
abi-compliance-checker_2.3-0.2.dsc
 939415d88705446c0b56837bd8e8b59a 10000 devel optional 
abi-compliance-checker_2.3-0.2.debian.tar.xz
 d645b17619e9b8544e9ec99fe18a84ca 6164 devel optional 
abi-compliance-checker_2.3-0.2_source.buildinfo

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEkpeKbhleSSGCX3/w808JdE6fXdkFAluOQjgACgkQ808JdE6f
Xdkgcw/+KsyLxi1hYZ+n3//ekpsxahw2tabgx56zzz6jsOdQnjSBb9EOQExK84g6
yhQadnHe8bvp8ZKu6Igo4R6MEOqnbZ8r+sYWYws1qWrDZaS6F0o5ljFnOoDNUAzD
DmhpqoRWDx60bBpxcfxCRN6WgSokwQgDFHUiHvwykDuGUa5zpwnU5pfAqoTfJPMQ
6A7//Nid4a9luT+R3dGYp5+a45ROis/n8UhnkKRkHQySdUxSC3CjwMzbwwz1Yiwu
wc5j1WprpAONcGmd5icOvzoVcgBVzIXY9pL2O/Awg9zZ6Lz+771LK9Ovpb34h/cb
+LHTThirSOOK+2hpjl98OUjWZno7G7psBVgP7JEQyDQgy78dN6WZThKnrsSfIIyD
eTYk+WfF9wyCaYkKrbOA++ZJ1UNKvBfMnJaWdbPi2UHHu+PtFplAhXf0i03jO02b
KfOApyvoVO63OxlGqJKZuZwlrgNLr2G//Emt5ltjCcJluMfKGoiOVkUgC/zVYlVu
rRa4LdIemLrAldeW72kVYoJmmuGiAkRB2iGbdM+IeqJuDgjqwBAo3SG1E2f+Qmu2
Ln/nTBpBaWh6Q4Q9bYsL3nJaGqIUMXNxlVpvO8zzbWkAk7Be1c47MtWQAI8k4au1
Jq6qbOsEzRJlnIkWvGKaFQjyx9LpLPdzxi1iK/rKrBYIYLGvbJE=
=HNv9
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to