abi-compliance-checker icon indicating copy to clipboard operation
abi-compliance-checker copied to clipboard

Run packing commands in a subprocess

Open LocutusOfBorg opened this issue 5 years ago • 5 comments

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.

LocutusOfBorg avatar Sep 04 '18 08:09 LocutusOfBorg

Hi,

Can you hide the reap_child function into the exitStatus function somehow?

Please note that creating of ABI dumps by abi-cc is obsolete function. It is used only for analysis of closed source libraries when you can't recompile the library with -g -Og options and obtain the debug-info. In all other cases the https://github.com/lvc/abi-dumper project should be used to create ABI dumps.

Thank you.

lvc avatar Sep 12 '18 06:09 lvc

Hello, sorry but I don't speak perl, I'm afraid I can't do the changes you requested (this patch is provided by Steve Langasek, not by myself...)

LocutusOfBorg avatar Jun 10 '20 22:06 LocutusOfBorg

I reached this PR while search why abi-compliance-checker was unable to return when called from a python code using subprocess.check_output on my Ubuntu Focal system with abi-compliance-checker being installed from official packages.

Simple code to trigger the problem:

import subprocess
cmd = ['abi-compliance-checker', '-l', 'orig', '-dump', '/tmp/nene']
try:
    output = subprocess.check_output(cmd)
except subprocess.CalledProcessError as e:
    print(e)

When using that python code in combination with changes in this PR the python script is not able to exit. This patch is being applied in at least:

  • Debian Sid
  • Ubuntu Focal

j-rivero avatar Jul 01 '20 16:07 j-rivero

@j-rivero can you please open a PR to fix this issue?

LocutusOfBorg avatar Jul 15 '20 16:07 LocutusOfBorg

@j-rivero can you please open a PR to fix this issue?

I would love to but my knowledge of Perl is zero.

j-rivero avatar Jul 20 '20 16:07 j-rivero