abi-compliance-checker
abi-compliance-checker copied to clipboard
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.
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.
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...)
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 can you please open a PR to fix this issue?
@j-rivero can you please open a PR to fix this issue?
I would love to but my knowledge of Perl is zero.