Mock Version: 3.0 Mock Version: 3.0 Mock Version: 3.0 ENTER ['do_with_status'](['bash', '--login', '-c', '/usr/bin/rpmbuild -bs --target noarch --nodeps /builddir/build/SPECS/python-dcrpm.spec'], chrootPath='/var/lib/mock/f38-build-side-42-init-devel-540432-25716/root'env={'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8'}shell=Falselogger=timeout=864000uid=996gid=135user='mockbuild'nspawn_args=[]unshare_net=TrueprintOutput=False) Executing command: ['bash', '--login', '-c', '/usr/bin/rpmbuild -bs --target noarch --nodeps /builddir/build/SPECS/python-dcrpm.spec'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8'} and shell False Building target platforms: noarch Building for target noarch setting SOURCE_DATE_EPOCH=1682812800 Wrote: /builddir/build/SRPMS/python-dcrpm-0.6.3-1.fc38.src.rpm Child return code was: 0 ENTER ['do_with_status'](['bash', '--login', '-c', '/usr/bin/rpmbuild -bb --target noarch --nodeps /builddir/build/SPECS/python-dcrpm.spec'], chrootPath='/var/lib/mock/f38-build-side-42-init-devel-540432-25716/root'env={'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8'}shell=Falselogger=timeout=864000uid=996gid=135user='mockbuild'nspawn_args=[]unshare_net=TrueprintOutput=False) Executing command: ['bash', '--login', '-c', '/usr/bin/rpmbuild -bb --target noarch --nodeps /builddir/build/SPECS/python-dcrpm.spec'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8'} and shell False Building target platforms: noarch Building for target noarch setting SOURCE_DATE_EPOCH=1682812800 Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.iYCq7p + umask 022 + cd /builddir/build/BUILD + cd /builddir/build/BUILD + rm -rf dcrpm-0.6.3 + /usr/lib/rpm/rpmuncompress -x /builddir/build/SOURCES/dcrpm-0.6.3.tar.gz + STATUS=0 + '[' 0 -ne 0 ']' + cd dcrpm-0.6.3 + /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w . + sed -e '\|#!/usr/bin/env python|d' -i dcrpm/__init__.py dcrpm/__version__.py dcrpm/dcrpm.py dcrpm/forensic_logger.py dcrpm/main.py dcrpm/pidutil.py dcrpm/rpmutil.py dcrpm/util.py dcrpm/yum.py + rm -rf dcrpm.egg-info + RPM_EC=0 ++ jobs -p + exit 0 Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.5rKW3o + umask 022 + cd /builddir/build/BUILD + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer ' + export CFLAGS + CXXFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer ' + export CXXFLAGS + FFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer -I/usr/lib/gfortran/modules ' + export FFLAGS + FCFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer -I/usr/lib/gfortran/modules ' + export FCFLAGS + VALAFLAGS=-g + export VALAFLAGS + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 ' + export LDFLAGS + LT_SYS_LIBRARY_PATH=/usr/lib: + export LT_SYS_LIBRARY_PATH + CC=gcc + export CC + CXX=g++ + export CXX + cd dcrpm-0.6.3 + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer ' + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 ' + /usr/bin/python3 setup.py build '--executable=/usr/bin/python3 -sP' running build running build_py creating build creating build/lib creating build/lib/dcrpm copying dcrpm/__version__.py -> build/lib/dcrpm copying dcrpm/main.py -> build/lib/dcrpm copying dcrpm/yum.py -> build/lib/dcrpm copying dcrpm/util.py -> build/lib/dcrpm copying dcrpm/dcrpm.py -> build/lib/dcrpm copying dcrpm/pidutil.py -> build/lib/dcrpm copying dcrpm/__init__.py -> build/lib/dcrpm copying dcrpm/rpmutil.py -> build/lib/dcrpm copying dcrpm/forensic_logger.py -> build/lib/dcrpm + RPM_EC=0 ++ jobs -p + exit 0 Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.barrFT + umask 022 + cd /builddir/build/BUILD + '[' /builddir/build/BUILDROOT/python-dcrpm-0.6.3-1.fc38.noarch '!=' / ']' + rm -rf /builddir/build/BUILDROOT/python-dcrpm-0.6.3-1.fc38.noarch ++ dirname /builddir/build/BUILDROOT/python-dcrpm-0.6.3-1.fc38.noarch + mkdir -p /builddir/build/BUILDROOT + mkdir /builddir/build/BUILDROOT/python-dcrpm-0.6.3-1.fc38.noarch + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer ' + export CFLAGS + CXXFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer ' + export CXXFLAGS + FFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer -I/usr/lib/gfortran/modules ' + export FFLAGS + FCFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer -I/usr/lib/gfortran/modules ' + export FCFLAGS + VALAFLAGS=-g + export VALAFLAGS + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 ' + export LDFLAGS + LT_SYS_LIBRARY_PATH=/usr/lib: + export LT_SYS_LIBRARY_PATH + CC=gcc + export CC + CXX=g++ + export CXX + cd dcrpm-0.6.3 + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer ' + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 ' + /usr/bin/python3 setup.py install -O1 --skip-build --root /builddir/build/BUILDROOT/python-dcrpm-0.6.3-1.fc38.noarch --prefix /usr running install /usr/lib/python3.11/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools. warnings.warn( running install_lib creating /builddir/build/BUILDROOT/python-dcrpm-0.6.3-1.fc38.noarch/usr creating /builddir/build/BUILDROOT/python-dcrpm-0.6.3-1.fc38.noarch/usr/lib creating /builddir/build/BUILDROOT/python-dcrpm-0.6.3-1.fc38.noarch/usr/lib/python3.11 creating /builddir/build/BUILDROOT/python-dcrpm-0.6.3-1.fc38.noarch/usr/lib/python3.11/site-packages creating /builddir/build/BUILDROOT/python-dcrpm-0.6.3-1.fc38.noarch/usr/lib/python3.11/site-packages/dcrpm copying build/lib/dcrpm/__version__.py -> /builddir/build/BUILDROOT/python-dcrpm-0.6.3-1.fc38.noarch/usr/lib/python3.11/site-packages/dcrpm copying build/lib/dcrpm/main.py -> /builddir/build/BUILDROOT/python-dcrpm-0.6.3-1.fc38.noarch/usr/lib/python3.11/site-packages/dcrpm copying build/lib/dcrpm/yum.py -> /builddir/build/BUILDROOT/python-dcrpm-0.6.3-1.fc38.noarch/usr/lib/python3.11/site-packages/dcrpm copying build/lib/dcrpm/util.py -> /builddir/build/BUILDROOT/python-dcrpm-0.6.3-1.fc38.noarch/usr/lib/python3.11/site-packages/dcrpm copying build/lib/dcrpm/dcrpm.py -> /builddir/build/BUILDROOT/python-dcrpm-0.6.3-1.fc38.noarch/usr/lib/python3.11/site-packages/dcrpm copying build/lib/dcrpm/pidutil.py -> /builddir/build/BUILDROOT/python-dcrpm-0.6.3-1.fc38.noarch/usr/lib/python3.11/site-packages/dcrpm copying build/lib/dcrpm/__init__.py -> /builddir/build/BUILDROOT/python-dcrpm-0.6.3-1.fc38.noarch/usr/lib/python3.11/site-packages/dcrpm copying build/lib/dcrpm/rpmutil.py -> /builddir/build/BUILDROOT/python-dcrpm-0.6.3-1.fc38.noarch/usr/lib/python3.11/site-packages/dcrpm copying build/lib/dcrpm/forensic_logger.py -> /builddir/build/BUILDROOT/python-dcrpm-0.6.3-1.fc38.noarch/usr/lib/python3.11/site-packages/dcrpm byte-compiling /builddir/build/BUILDROOT/python-dcrpm-0.6.3-1.fc38.noarch/usr/lib/python3.11/site-packages/dcrpm/__version__.py to __version__.cpython-311.pyc byte-compiling /builddir/build/BUILDROOT/python-dcrpm-0.6.3-1.fc38.noarch/usr/lib/python3.11/site-packages/dcrpm/main.py to main.cpython-311.pyc byte-compiling /builddir/build/BUILDROOT/python-dcrpm-0.6.3-1.fc38.noarch/usr/lib/python3.11/site-packages/dcrpm/yum.py to yum.cpython-311.pyc byte-compiling /builddir/build/BUILDROOT/python-dcrpm-0.6.3-1.fc38.noarch/usr/lib/python3.11/site-packages/dcrpm/util.py to util.cpython-311.pyc byte-compiling /builddir/build/BUILDROOT/python-dcrpm-0.6.3-1.fc38.noarch/usr/lib/python3.11/site-packages/dcrpm/dcrpm.py to dcrpm.cpython-311.pyc byte-compiling /builddir/build/BUILDROOT/python-dcrpm-0.6.3-1.fc38.noarch/usr/lib/python3.11/site-packages/dcrpm/pidutil.py to pidutil.cpython-311.pyc byte-compiling /builddir/build/BUILDROOT/python-dcrpm-0.6.3-1.fc38.noarch/usr/lib/python3.11/site-packages/dcrpm/__init__.py to __init__.cpython-311.pyc byte-compiling /builddir/build/BUILDROOT/python-dcrpm-0.6.3-1.fc38.noarch/usr/lib/python3.11/site-packages/dcrpm/rpmutil.py to rpmutil.cpython-311.pyc byte-compiling /builddir/build/BUILDROOT/python-dcrpm-0.6.3-1.fc38.noarch/usr/lib/python3.11/site-packages/dcrpm/forensic_logger.py to forensic_logger.cpython-311.pyc writing byte-compilation script '/tmp/tmp95k0kpsl.py' /usr/bin/python3 /tmp/tmp95k0kpsl.py removing /tmp/tmp95k0kpsl.py running install_egg_info running egg_info creating dcrpm.egg-info writing dcrpm.egg-info/PKG-INFO writing dependency_links to dcrpm.egg-info/dependency_links.txt writing entry points to dcrpm.egg-info/entry_points.txt writing requirements to dcrpm.egg-info/requires.txt writing top-level names to dcrpm.egg-info/top_level.txt writing manifest file 'dcrpm.egg-info/SOURCES.txt' reading manifest file 'dcrpm.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' adding license file 'LICENSE' writing manifest file 'dcrpm.egg-info/SOURCES.txt' Copying dcrpm.egg-info to /builddir/build/BUILDROOT/python-dcrpm-0.6.3-1.fc38.noarch/usr/lib/python3.11/site-packages/dcrpm-0.6.3-py3.11.egg-info running install_scripts Installing dcrpm script to /builddir/build/BUILDROOT/python-dcrpm-0.6.3-1.fc38.noarch/usr/bin + rm -rfv /builddir/build/BUILDROOT/python-dcrpm-0.6.3-1.fc38.noarch/usr/bin/__pycache__ + /usr/bin/find-debuginfo -j8 --strict-build-id -m -i --build-id-seed 0.6.3-1.fc38 --unique-debug-suffix -0.6.3-1.fc38.noarch --unique-debug-src-base python-dcrpm-0.6.3-1.fc38.noarch --run-dwz --dwz-low-mem-die-limit 10000000 --dwz-max-die-limit 50000000 -S debugsourcefiles.list /builddir/build/BUILD/dcrpm-0.6.3 find: 'debug': No such file or directory + /usr/lib/rpm/check-buildroot + /usr/lib/rpm/redhat/brp-ldconfig + /usr/lib/rpm/brp-compress + /usr/lib/rpm/redhat/brp-strip-lto /usr/bin/strip + /usr/lib/rpm/brp-strip-static-archive /usr/bin/strip + /usr/lib/rpm/check-rpaths + /usr/lib/rpm/redhat/brp-mangle-shebangs + /usr/lib/rpm/brp-remove-la-files + env /usr/lib/rpm/redhat/brp-python-bytecompile '' 1 0 -j8 Bytecompiling .py files below /builddir/build/BUILDROOT/python-dcrpm-0.6.3-1.fc38.noarch/usr/lib/python3.11 using python3.11 + /usr/lib/rpm/redhat/brp-python-hardlink Executing(%check): /bin/sh -e /var/tmp/rpm-tmp.1zdggA + umask 022 + cd /builddir/build/BUILD + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer ' + export CFLAGS + CXXFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer ' + export CXXFLAGS + FFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer -I/usr/lib/gfortran/modules ' + export FFLAGS + FCFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer -I/usr/lib/gfortran/modules ' + export FCFLAGS + VALAFLAGS=-g + export VALAFLAGS + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 ' + export LDFLAGS + LT_SYS_LIBRARY_PATH=/usr/lib: + export LT_SYS_LIBRARY_PATH + CC=gcc + export CC + CXX=g++ + export CXX + cd dcrpm-0.6.3 + PATH=/builddir/build/BUILDROOT/python-dcrpm-0.6.3-1.fc38.noarch/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin + PYTHONPATH=/builddir/build/BUILDROOT/python-dcrpm-0.6.3-1.fc38.noarch/usr/lib64/python3.11/site-packages:/builddir/build/BUILDROOT/python-dcrpm-0.6.3-1.fc38.noarch/usr/lib/python3.11/site-packages + _PYTHONSITE=/builddir/build/BUILDROOT/python-dcrpm-0.6.3-1.fc38.noarch/usr/lib64/python3.11/site-packages:/builddir/build/BUILDROOT/python-dcrpm-0.6.3-1.fc38.noarch/usr/lib/python3.11/site-packages + PYTHONDONTWRITEBYTECODE=1 + /usr/bin/python3 -sP /usr/lib/rpm/redhat/import_all_modules.py dcrpm Check import: dcrpm + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer ' + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 ' + PATH=/builddir/build/BUILDROOT/python-dcrpm-0.6.3-1.fc38.noarch/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin + PYTHONPATH=/builddir/build/BUILDROOT/python-dcrpm-0.6.3-1.fc38.noarch/usr/lib64/python3.11/site-packages:/builddir/build/BUILDROOT/python-dcrpm-0.6.3-1.fc38.noarch/usr/lib/python3.11/site-packages + PYTHONDONTWRITEBYTECODE=1 + PYTEST_XDIST_AUTO_NUM_WORKERS=8 + /usr/bin/pytest -v --deselect=tests/test_end_to_end.py::DcrpmIntegrationTest::test_rpmdb_centos7_missing_index ============================= test session starts ============================== platform linux -- Python 3.11.2, pytest-7.2.2, pluggy-1.0.0 -- /usr/bin/python3 cachedir: .pytest_cache rootdir: /builddir/build/BUILD/dcrpm-0.6.3 plugins: typeguard-2.13.3 collecting ... collected 67 items / 1 deselected / 66 selected tests/test_dcrpm.py::TestDcRPM::test_db_stat_forensic PASSED [ 1%] tests/test_dcrpm.py::TestDcRPM::test_hardlink_db001_link_exists PASSED [ 3%] tests/test_dcrpm.py::TestDcRPM::test_hardlink_db001_symlink_fails PASSED [ 4%] tests/test_dcrpm.py::TestDcRPM::test_has_free_disk_space_fail PASSED [ 6%] tests/test_dcrpm.py::TestDcRPM::test_has_free_disk_space_success PASSED [ 7%] tests/test_dcrpm.py::TestDcRPM::test_run_rebuild_dry_run PASSED [ 9%] tests/test_dcrpm.py::TestDcRPM::test_run_recovery_dry_run PASSED [ 10%] tests/test_dcrpm.py::TestDcRPM::test_stale_yum_transactions_exist PASSED [ 12%] tests/test_dcrpm.py::TestDcRPM::test_stale_yum_transactions_no_exist PASSED [ 13%] tests/test_end_to_end.py::DcrpmIntegrationTest::test_rpmdb_centos7 FAILED [ 15%] tests/test_end_to_end.py::DcrpmIntegrationTest::test_rpmdb_centos8 FAILED [ 16%] tests/test_end_to_end.py::DcrpmIntegrationTest::test_rpmdb_fedora26 FAILED [ 18%] tests/test_end_to_end.py::DcrpmIntegrationTest::test_rpmdb_fedora31 FAILED [ 19%] tests/test_pidutil.py::TestPidutil::test__pids_holding_file_failed PASSED [ 21%] tests/test_pidutil.py::TestPidutil::test__pids_holding_file_success PASSED [ 22%] tests/test_pidutil.py::TestPidutil::test__pids_holding_file_timeout PASSED [ 24%] tests/test_pidutil.py::TestPidutil::test_procs_holding_file_no_lsof PASSED [ 25%] tests/test_pidutil.py::TestPidutil::test_send_signal_no_such_process PASSED [ 27%] tests/test_pidutil.py::TestPidutil::test_send_signal_success PASSED [ 28%] tests/test_pidutil.py::TestPidutil::test_send_signal_timeout PASSED [ 30%] tests/test_pidutil.py::TestPidutil::test_send_signals_all_throw PASSED [ 31%] tests/test_pidutil.py::TestPidutil::test_send_signals_no_processes PASSED [ 33%] tests/test_pidutil.py::TestPidutil::test_send_signals_signal_throws PASSED [ 34%] tests/test_pidutil.py::TestPidutil::test_send_signals_success PASSED [ 36%] tests/test_pidutil.py::TestPidutil::test_send_signals_wait_throws PASSED [ 37%] tests/test_pidutil.py::TestPidfileInfo::test_pidfile_info_bad_pid PASSED [ 39%] tests/test_pidutil.py::TestPidfileInfo::test_pidfile_info_invalid_pid PASSED [ 40%] tests/test_pidutil.py::TestPidfileInfo::test_pidfile_info_sucess PASSED [ 42%] tests/test_rpmutil.py::TestRPMUtil::test_check_rpm_qa_not_enough_packages_darwin PASSED [ 43%] tests/test_rpmutil.py::TestRPMUtil::test_check_rpm_qa_not_enough_packages_linux PASSED [ 45%] tests/test_rpmutil.py::TestRPMUtil::test_check_rpm_qa_raise_on_nonzero_rc PASSED [ 46%] tests/test_rpmutil.py::TestRPMUtil::test_check_rpm_qa_success PASSED [ 48%] tests/test_rpmutil.py::TestRPMUtil::test_check_tables_ PASSED [ 50%] tests/test_rpmutil.py::TestRPMUtil::test_check_tables_raises_on_list_all PASSED [ 51%] tests/test_rpmutil.py::TestRPMUtil::test_check_tables_raises_on_query PASSED [ 53%] tests/test_rpmutil.py::TestRPMUtil::test_check_tables_raises_on_uninstalled PASSED [ 54%] tests/test_rpmutil.py::TestRPMUtil::test_check_tables_success PASSED [ 56%] tests/test_rpmutil.py::TestRPMUtil::test_check_tables_success_on_no_rpms PASSED [ 57%] tests/test_rpmutil.py::TestRPMUtil::test_clean_yum_transactions_success PASSED [ 59%] tests/test_rpmutil.py::TestRPMUtil::test_kill_spinning_rpm_query_processes_success PASSED [ 60%] tests/test_rpmutil.py::TestRPMUtil::test_query_failure PASSED [ 62%] tests/test_rpmutil.py::TestRPMUtil::test_query_success PASSED [ 63%] tests/test_rpmutil.py::TestRPMUtil::test_rebuild_db_success PASSED [ 65%] tests/test_rpmutil.py::TestRPMUtil::test_recover_db_success PASSED [ 66%] tests/test_rpmutil.py::TestRPMUtil::test_verify_tables_all_blacklisted PASSED [ 68%] tests/test_rpmutil.py::TestRPMUtil::test_verify_tables_fail PASSED [ 69%] tests/test_rpmutil.py::TestRPMUtil::test_verify_tables_success PASSED [ 71%] tests/test_util.py::TestUtil::test_call_with_timeout_real_raises PASSED [ 72%] tests/test_util.py::TestUtil::test_call_with_timeout_success PASSED [ 74%] tests/test_util.py::TestUtil::test_kindly_end_kills_on_terminate_timeout PASSED [ 75%] tests/test_util.py::TestUtil::test_kindly_end_terminates PASSED [ 77%] tests/test_util.py::TestUtil::test_run_with_timeout_kills_on_terminate_timeout PASSED [ 78%] tests/test_util.py::TestUtil::test_run_with_timeout_no_raise_on_nonzero PASSED [ 80%] tests/test_util.py::TestUtil::test_run_with_timeout_no_raise_on_timeout PASSED [ 81%] tests/test_util.py::TestUtil::test_run_with_timeout_raise_on_nonzero PASSED [ 83%] tests/test_util.py::TestUtil::test_run_with_timeout_success PASSED [ 84%] tests/test_util.py::TestUtil::test_run_with_timeout_terminates_on_timeout PASSED [ 86%] tests/test_util.py::TestUtil::test_run_with_timeout_timeout PASSED [ 87%] tests/test_yum.py::TestYum::test_check_stuck_filenotfound PASSED [ 89%] tests/test_yum.py::TestYum::test_check_stuck_kill_yumpid PASSED [ 90%] tests/test_yum.py::TestYum::test_check_stuck_kill_yumpid_no_such_process PASSED [ 92%] tests/test_yum.py::TestYum::test_check_stuck_kill_yumpid_timeout PASSED [ 93%] tests/test_yum.py::TestYum::test_check_stuck_other_exception PASSED [ 95%] tests/test_yum.py::TestYum::test_check_stuck_valueerror PASSED [ 96%] tests/test_yum.py::TestYum::test_check_stuck_yumpid_no_such_process PASSED [ 98%] tests/test_yum.py::TestYum::test_check_stuck_yumpid_not_old_enough PASSED [100%] =================================== FAILURES =================================== ___________________ DcrpmIntegrationTest.test_rpmdb_centos7 ____________________ cmd = ['/usr/bin/rpm', '--dbpath', '/tmp/tmpz8ye_xf7/rpm', '-qa'], timeout = 5 raise_on_nonzero = True, raise_on_timeout = True exception_to_raise = def run_with_timeout( cmd, # type: t.Sequence[str] timeout, # type: int raise_on_nonzero=True, # type: bool raise_on_timeout=True, # type: bool exception_to_raise=DcRPMException, # type: t.Type[Exception] ): # type: (...) -> CompletedProcess """ Runs command `cmd` with timeout `timeout`. If `raise_on_nonzero` is True, raises a DcRPMException if `cmd` exits with a nonzero status. If `raise_on_timeout` is true, raises a DcRPMException if `cmd` times out. """ if not cmd: raise ValueError("must pass command to run") _logger.debug("Running %s", " ".join(cmd)) proc = subprocess.Popen( cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True ) try: > stdout, stderr = call_with_timeout(proc.communicate, timeout) dcrpm/util.py:203: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ func = > timeout = 5, args = [], kwargs = {} def call_with_timeout( func, # type: t.Callable[..., t.TypeVar("RT")] timeout, # type: int args=None, # type: t.Optional[t.Iterable[str]] # pyre-ignore[2]: kwargs has type dict[str, Any] kwargs=None, # type: t.Optional[t.Dict[str, t.Any]] ): # type: (...) -> t.TypeVar("RT") """ A generic method that calls some callable and uses SIGALRM to time out the call should it take longer than `timeout`. If `raise_` is True, then it will raise a TimeoutExpired exception indicating the callable timed out. If `raise_` is False and the call times out, this function returns None. `args` is a list of arguments to pass to the callable (like *args) `kwargs` is a dict of keyword arguments to pass to the callable (like **kwargs) """ if args is None: args = [] if kwargs is None: kwargs = {} # Handle command timeouts. # from: https://stackoverflow.com/a/1191537 signal.signal(signal.SIGALRM, alarm_handler) signal.alarm(timeout) try: > return func(*args, **kwargs) dcrpm/util.py:175: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = input = None, timeout = None def communicate(self, input=None, timeout=None): """Interact with process: Send data to stdin and close it. Read data from stdout and stderr, until end-of-file is reached. Wait for process to terminate. The optional "input" argument should be data to be sent to the child process, or None, if no data should be sent to the child. communicate() returns a tuple (stdout, stderr). By default, all communication is in bytes, and therefore any "input" should be bytes, and the (stdout, stderr) will be bytes. If in text mode (indicated by self.text_mode), any "input" should be a string, and (stdout, stderr) will be strings decoded according to locale encoding, or by "encoding" if set. Text mode is triggered by setting any of text, encoding, errors or universal_newlines. """ if self._communication_started and input: raise ValueError("Cannot send input after starting communication") # Optimization: If we are not worried about timeouts, we haven't # started communicating, and we have one or zero pipes, using select() # or threads is unnecessary. if (timeout is None and not self._communication_started and [self.stdin, self.stdout, self.stderr].count(None) >= 2): stdout = None stderr = None if self.stdin: self._stdin_write(input) elif self.stdout: stdout = self.stdout.read() self.stdout.close() elif self.stderr: stderr = self.stderr.read() self.stderr.close() self.wait() else: if timeout is not None: endtime = _time() + timeout else: endtime = None try: > stdout, stderr = self._communicate(input, endtime, timeout) /usr/lib64/python3.11/subprocess.py:1207: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = input = None, endtime = None, orig_timeout = None def _communicate(self, input, endtime, orig_timeout): if self.stdin and not self._communication_started: # Flush stdio buffer. This might block, if the user has # been writing to .stdin in an uncontrolled fashion. try: self.stdin.flush() except BrokenPipeError: pass # communicate() must ignore BrokenPipeError. if not input: try: self.stdin.close() except BrokenPipeError: pass # communicate() must ignore BrokenPipeError. stdout = None stderr = None # Only create this mapping if we haven't already. if not self._communication_started: self._fileobj2output = {} if self.stdout: self._fileobj2output[self.stdout] = [] if self.stderr: self._fileobj2output[self.stderr] = [] if self.stdout: stdout = self._fileobj2output[self.stdout] if self.stderr: stderr = self._fileobj2output[self.stderr] self._save_input(input) if self._input: input_view = memoryview(self._input) with _PopenSelector() as selector: if self.stdin and input: selector.register(self.stdin, selectors.EVENT_WRITE) if self.stdout and not self.stdout.closed: selector.register(self.stdout, selectors.EVENT_READ) if self.stderr and not self.stderr.closed: selector.register(self.stderr, selectors.EVENT_READ) while selector.get_map(): timeout = self._remaining_time(endtime) if timeout is not None and timeout < 0: self._check_timeout(endtime, orig_timeout, stdout, stderr, skip_check_and_raise=True) raise RuntimeError( # Impossible :) '_check_timeout(..., skip_check_and_raise=True) ' 'failed to raise TimeoutExpired.') > ready = selector.select(timeout) /usr/lib64/python3.11/subprocess.py:2059: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , timeout = None def select(self, timeout=None): # This is shared between poll() and epoll(). # epoll() has a different signature and handling of timeout parameter. if timeout is None: timeout = None elif timeout <= 0: timeout = 0 else: # poll() has a resolution of 1 millisecond, round away from # zero to wait *at least* timeout seconds. timeout = math.ceil(timeout * 1e3) ready = [] try: > fd_event_list = self._selector.poll(timeout) /usr/lib64/python3.11/selectors.py:415: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ signum = 14 frame = def alarm_handler(signum, frame): # type: (int, FrameType) -> None """ Alarm handler to pass to signal.signal for subprocess timeout. """ > raise TimeoutExpired() E dcrpm.util.TimeoutExpired dcrpm/util.py:144: TimeoutExpired During handling of the above exception, another exception occurred: self = def check_rpm_qa(self): # type: () -> None """ Runs `rpm -qa` which serves as a good proxy check for whether bdb needs recovery """ try: > result = run_with_timeout( [self.rpm_path, "--dbpath", self.dbpath, "-qa"], RPM_CHECK_TIMEOUT_SEC ) dcrpm/rpmutil.py:290: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/rpm', '--dbpath', '/tmp/tmpz8ye_xf7/rpm', '-qa'], timeout = 5 raise_on_nonzero = True, raise_on_timeout = True exception_to_raise = def run_with_timeout( cmd, # type: t.Sequence[str] timeout, # type: int raise_on_nonzero=True, # type: bool raise_on_timeout=True, # type: bool exception_to_raise=DcRPMException, # type: t.Type[Exception] ): # type: (...) -> CompletedProcess """ Runs command `cmd` with timeout `timeout`. If `raise_on_nonzero` is True, raises a DcRPMException if `cmd` exits with a nonzero status. If `raise_on_timeout` is true, raises a DcRPMException if `cmd` times out. """ if not cmd: raise ValueError("must pass command to run") _logger.debug("Running %s", " ".join(cmd)) proc = subprocess.Popen( cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True ) try: stdout, stderr = call_with_timeout(proc.communicate, timeout) except TimeoutExpired: msg = "%s timed out after %d" % (cmd[0], timeout) _logger.error(msg) # Be nice about ending the process. _logger.info("Terminating %s", cmd[0]) rc = kindly_end(proc) if raise_on_timeout: > raise exception_to_raise(msg) E dcrpm.util.DcRPMException: /usr/bin/rpm timed out after 5 dcrpm/util.py:212: DcRPMException During handling of the above exception, another exception occurred: self = def run(self): # type: () -> bool if not self.has_free_disk_space(): self.status_logger.error("not_enough_disk") self.logger.error("Need at least %sB free to continue" % self.args.minspace) return False # Check old yum transactions. if self.args.clean_yum_transactions and self.stale_yum_transactions_exist(): self.logger.info("Cleaning old yum transaction") self.rpmutil.clean_yum_transactions() # Check stuck yum. if self.args.check_stuck_yum: result = Yum().check_stuck(dry_run=self.args.dry_run) if not result: self.logger.error("Failed to unstuck yum processes") # Detect database backend backend = self.rpmutil.get_db_backend() # Start main checks. for i in range(self.args.max_passes): self.logger.debug("Running pass: %d", i) try: # Optional forensic data collection if self.args.forensic: if backend == "bdb": self.logger.info( "Running forensic data collection (db_stat -CA)" ) self.rpmutil.db_stat() else: self.logger.warning( "Forensics data collection is not supported on %s" % backend ) # Kill any straggler rpm query processes self.logger.info("Searching for spinning rpm query processes") self.rpmutil.kill_spinning_rpm_query_processes() # Exercise single indexes self.logger.info("Sanity checking rpmdb indexes") self.rpmutil.check_rpmdb_indexes() self.logger.info("Rpmdb indexes OK") # Black box check - does rpm -qa even work? self.logger.info("Running black box check (rpm -qa)") > self.rpmutil.check_rpm_qa() dcrpm/dcrpm.py:94: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def check_rpm_qa(self): # type: () -> None """ Runs `rpm -qa` which serves as a good proxy check for whether bdb needs recovery """ try: result = run_with_timeout( [self.rpm_path, "--dbpath", self.dbpath, "-qa"], RPM_CHECK_TIMEOUT_SEC ) except DcRPMException: self.logger.error("rpm -qa failed") self.status_logger.warning("initial_db_check_fail") > raise DBNeedsRecovery() E dcrpm.util.DBNeedsRecovery dcrpm/rpmutil.py:296: DBNeedsRecovery During handling of the above exception, another exception occurred: self = def hardlink_db001(self): # type: () -> str old_path = join(self.args.dbpath, "__db.001") new_path = join(self.args.dbpath, "__dcrpm_py_inode_pointer") # Make sure it doesn't exist. try: os.unlink(new_path) except OSError: pass # Then save it. try: > os.link(old_path, new_path) E FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmpz8ye_xf7/rpm/__db.001' -> '/tmp/tmpz8ye_xf7/rpm/__dcrpm_py_inode_pointer' dcrpm/dcrpm.py:240: FileNotFoundError During handling of the above exception, another exception occurred: args = (, '/tmp/tmpz8ye_xf7/rpm') kwargs = {} def wrapper(*args, **kwargs): # type: (t.Any, t.Any) -> RT args += (os.path.join(temp_dir, "rpm"),) > result = t.cast(F, function)(*args, **kwargs) tests/rpmdb.py:38: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_end_to_end.py:76: in test_rpmdb_centos7 run_result = self.dcrpm.run() dcrpm/dcrpm.py:140: in run self.run_recovery() dcrpm/dcrpm.py:204: in run_recovery hardlink = self.hardlink_db001() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def hardlink_db001(self): # type: () -> str old_path = join(self.args.dbpath, "__db.001") new_path = join(self.args.dbpath, "__dcrpm_py_inode_pointer") # Make sure it doesn't exist. try: os.unlink(new_path) except OSError: pass # Then save it. try: os.link(old_path, new_path) return new_path except OSError: self.status_logger.warning("link_failed") > raise DcRPMException("Could not save __db.001 failed") E dcrpm.util.DcRPMException: Could not save __db.001 failed dcrpm/dcrpm.py:244: DcRPMException ------------------------------ Captured log call ------------------------------- WARNING root:rpmutil.py:510 No db_backend found in macros, assuming bdb ERROR root:util.py:206 /usr/bin/rpm timed out after 5 ERROR root:rpmutil.py:294 rpm -qa failed ERROR root:dcrpm.py:137 DB needs recovery ERROR root:util.py:206 /usr/bin/rpm timed out after 5 ERROR root:rpmutil.py:294 rpm -qa failed ERROR root:dcrpm.py:137 DB needs recovery ___________________ DcrpmIntegrationTest.test_rpmdb_centos8 ____________________ cmd = ['/usr/bin/rpm', '--dbpath', '/tmp/tmpjb4a8i4b/rpm', '-qa'], timeout = 5 raise_on_nonzero = True, raise_on_timeout = True exception_to_raise = def run_with_timeout( cmd, # type: t.Sequence[str] timeout, # type: int raise_on_nonzero=True, # type: bool raise_on_timeout=True, # type: bool exception_to_raise=DcRPMException, # type: t.Type[Exception] ): # type: (...) -> CompletedProcess """ Runs command `cmd` with timeout `timeout`. If `raise_on_nonzero` is True, raises a DcRPMException if `cmd` exits with a nonzero status. If `raise_on_timeout` is true, raises a DcRPMException if `cmd` times out. """ if not cmd: raise ValueError("must pass command to run") _logger.debug("Running %s", " ".join(cmd)) proc = subprocess.Popen( cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True ) try: > stdout, stderr = call_with_timeout(proc.communicate, timeout) dcrpm/util.py:203: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ func = > timeout = 5, args = [], kwargs = {} def call_with_timeout( func, # type: t.Callable[..., t.TypeVar("RT")] timeout, # type: int args=None, # type: t.Optional[t.Iterable[str]] # pyre-ignore[2]: kwargs has type dict[str, Any] kwargs=None, # type: t.Optional[t.Dict[str, t.Any]] ): # type: (...) -> t.TypeVar("RT") """ A generic method that calls some callable and uses SIGALRM to time out the call should it take longer than `timeout`. If `raise_` is True, then it will raise a TimeoutExpired exception indicating the callable timed out. If `raise_` is False and the call times out, this function returns None. `args` is a list of arguments to pass to the callable (like *args) `kwargs` is a dict of keyword arguments to pass to the callable (like **kwargs) """ if args is None: args = [] if kwargs is None: kwargs = {} # Handle command timeouts. # from: https://stackoverflow.com/a/1191537 signal.signal(signal.SIGALRM, alarm_handler) signal.alarm(timeout) try: > return func(*args, **kwargs) dcrpm/util.py:175: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = input = None, timeout = None def communicate(self, input=None, timeout=None): """Interact with process: Send data to stdin and close it. Read data from stdout and stderr, until end-of-file is reached. Wait for process to terminate. The optional "input" argument should be data to be sent to the child process, or None, if no data should be sent to the child. communicate() returns a tuple (stdout, stderr). By default, all communication is in bytes, and therefore any "input" should be bytes, and the (stdout, stderr) will be bytes. If in text mode (indicated by self.text_mode), any "input" should be a string, and (stdout, stderr) will be strings decoded according to locale encoding, or by "encoding" if set. Text mode is triggered by setting any of text, encoding, errors or universal_newlines. """ if self._communication_started and input: raise ValueError("Cannot send input after starting communication") # Optimization: If we are not worried about timeouts, we haven't # started communicating, and we have one or zero pipes, using select() # or threads is unnecessary. if (timeout is None and not self._communication_started and [self.stdin, self.stdout, self.stderr].count(None) >= 2): stdout = None stderr = None if self.stdin: self._stdin_write(input) elif self.stdout: stdout = self.stdout.read() self.stdout.close() elif self.stderr: stderr = self.stderr.read() self.stderr.close() self.wait() else: if timeout is not None: endtime = _time() + timeout else: endtime = None try: > stdout, stderr = self._communicate(input, endtime, timeout) /usr/lib64/python3.11/subprocess.py:1207: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = input = None, endtime = None, orig_timeout = None def _communicate(self, input, endtime, orig_timeout): if self.stdin and not self._communication_started: # Flush stdio buffer. This might block, if the user has # been writing to .stdin in an uncontrolled fashion. try: self.stdin.flush() except BrokenPipeError: pass # communicate() must ignore BrokenPipeError. if not input: try: self.stdin.close() except BrokenPipeError: pass # communicate() must ignore BrokenPipeError. stdout = None stderr = None # Only create this mapping if we haven't already. if not self._communication_started: self._fileobj2output = {} if self.stdout: self._fileobj2output[self.stdout] = [] if self.stderr: self._fileobj2output[self.stderr] = [] if self.stdout: stdout = self._fileobj2output[self.stdout] if self.stderr: stderr = self._fileobj2output[self.stderr] self._save_input(input) if self._input: input_view = memoryview(self._input) with _PopenSelector() as selector: if self.stdin and input: selector.register(self.stdin, selectors.EVENT_WRITE) if self.stdout and not self.stdout.closed: selector.register(self.stdout, selectors.EVENT_READ) if self.stderr and not self.stderr.closed: selector.register(self.stderr, selectors.EVENT_READ) while selector.get_map(): timeout = self._remaining_time(endtime) if timeout is not None and timeout < 0: self._check_timeout(endtime, orig_timeout, stdout, stderr, skip_check_and_raise=True) raise RuntimeError( # Impossible :) '_check_timeout(..., skip_check_and_raise=True) ' 'failed to raise TimeoutExpired.') > ready = selector.select(timeout) /usr/lib64/python3.11/subprocess.py:2059: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , timeout = None def select(self, timeout=None): # This is shared between poll() and epoll(). # epoll() has a different signature and handling of timeout parameter. if timeout is None: timeout = None elif timeout <= 0: timeout = 0 else: # poll() has a resolution of 1 millisecond, round away from # zero to wait *at least* timeout seconds. timeout = math.ceil(timeout * 1e3) ready = [] try: > fd_event_list = self._selector.poll(timeout) /usr/lib64/python3.11/selectors.py:415: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ signum = 14 frame = def alarm_handler(signum, frame): # type: (int, FrameType) -> None """ Alarm handler to pass to signal.signal for subprocess timeout. """ > raise TimeoutExpired() E dcrpm.util.TimeoutExpired dcrpm/util.py:144: TimeoutExpired During handling of the above exception, another exception occurred: self = def check_rpm_qa(self): # type: () -> None """ Runs `rpm -qa` which serves as a good proxy check for whether bdb needs recovery """ try: > result = run_with_timeout( [self.rpm_path, "--dbpath", self.dbpath, "-qa"], RPM_CHECK_TIMEOUT_SEC ) dcrpm/rpmutil.py:290: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cmd = ['/usr/bin/rpm', '--dbpath', '/tmp/tmpjb4a8i4b/rpm', '-qa'], timeout = 5 raise_on_nonzero = True, raise_on_timeout = True exception_to_raise = def run_with_timeout( cmd, # type: t.Sequence[str] timeout, # type: int raise_on_nonzero=True, # type: bool raise_on_timeout=True, # type: bool exception_to_raise=DcRPMException, # type: t.Type[Exception] ): # type: (...) -> CompletedProcess """ Runs command `cmd` with timeout `timeout`. If `raise_on_nonzero` is True, raises a DcRPMException if `cmd` exits with a nonzero status. If `raise_on_timeout` is true, raises a DcRPMException if `cmd` times out. """ if not cmd: raise ValueError("must pass command to run") _logger.debug("Running %s", " ".join(cmd)) proc = subprocess.Popen( cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True ) try: stdout, stderr = call_with_timeout(proc.communicate, timeout) except TimeoutExpired: msg = "%s timed out after %d" % (cmd[0], timeout) _logger.error(msg) # Be nice about ending the process. _logger.info("Terminating %s", cmd[0]) rc = kindly_end(proc) if raise_on_timeout: > raise exception_to_raise(msg) E dcrpm.util.DcRPMException: /usr/bin/rpm timed out after 5 dcrpm/util.py:212: DcRPMException During handling of the above exception, another exception occurred: self = def run(self): # type: () -> bool if not self.has_free_disk_space(): self.status_logger.error("not_enough_disk") self.logger.error("Need at least %sB free to continue" % self.args.minspace) return False # Check old yum transactions. if self.args.clean_yum_transactions and self.stale_yum_transactions_exist(): self.logger.info("Cleaning old yum transaction") self.rpmutil.clean_yum_transactions() # Check stuck yum. if self.args.check_stuck_yum: result = Yum().check_stuck(dry_run=self.args.dry_run) if not result: self.logger.error("Failed to unstuck yum processes") # Detect database backend backend = self.rpmutil.get_db_backend() # Start main checks. for i in range(self.args.max_passes): self.logger.debug("Running pass: %d", i) try: # Optional forensic data collection if self.args.forensic: if backend == "bdb": self.logger.info( "Running forensic data collection (db_stat -CA)" ) self.rpmutil.db_stat() else: self.logger.warning( "Forensics data collection is not supported on %s" % backend ) # Kill any straggler rpm query processes self.logger.info("Searching for spinning rpm query processes") self.rpmutil.kill_spinning_rpm_query_processes() # Exercise single indexes self.logger.info("Sanity checking rpmdb indexes") self.rpmutil.check_rpmdb_indexes() self.logger.info("Rpmdb indexes OK") # Black box check - does rpm -qa even work? self.logger.info("Running black box check (rpm -qa)") > self.rpmutil.check_rpm_qa() dcrpm/dcrpm.py:94: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def check_rpm_qa(self): # type: () -> None """ Runs `rpm -qa` which serves as a good proxy check for whether bdb needs recovery """ try: result = run_with_timeout( [self.rpm_path, "--dbpath", self.dbpath, "-qa"], RPM_CHECK_TIMEOUT_SEC ) except DcRPMException: self.logger.error("rpm -qa failed") self.status_logger.warning("initial_db_check_fail") > raise DBNeedsRecovery() E dcrpm.util.DBNeedsRecovery dcrpm/rpmutil.py:296: DBNeedsRecovery During handling of the above exception, another exception occurred: self = def hardlink_db001(self): # type: () -> str old_path = join(self.args.dbpath, "__db.001") new_path = join(self.args.dbpath, "__dcrpm_py_inode_pointer") # Make sure it doesn't exist. try: os.unlink(new_path) except OSError: pass # Then save it. try: > os.link(old_path, new_path) E FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmpjb4a8i4b/rpm/__db.001' -> '/tmp/tmpjb4a8i4b/rpm/__dcrpm_py_inode_pointer' dcrpm/dcrpm.py:240: FileNotFoundError During handling of the above exception, another exception occurred: args = (, '/tmp/tmpjb4a8i4b/rpm') kwargs = {} def wrapper(*args, **kwargs): # type: (t.Any, t.Any) -> RT args += (os.path.join(temp_dir, "rpm"),) > result = t.cast(F, function)(*args, **kwargs) tests/rpmdb.py:38: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_end_to_end.py:106: in test_rpmdb_centos8 run_result = self.dcrpm.run() dcrpm/dcrpm.py:140: in run self.run_recovery() dcrpm/dcrpm.py:204: in run_recovery hardlink = self.hardlink_db001() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def hardlink_db001(self): # type: () -> str old_path = join(self.args.dbpath, "__db.001") new_path = join(self.args.dbpath, "__dcrpm_py_inode_pointer") # Make sure it doesn't exist. try: os.unlink(new_path) except OSError: pass # Then save it. try: os.link(old_path, new_path) return new_path except OSError: self.status_logger.warning("link_failed") > raise DcRPMException("Could not save __db.001 failed") E dcrpm.util.DcRPMException: Could not save __db.001 failed dcrpm/dcrpm.py:244: DcRPMException ------------------------------ Captured log call ------------------------------- WARNING root:rpmutil.py:510 No db_backend found in macros, assuming bdb ERROR root:util.py:206 /usr/bin/rpm timed out after 5 ERROR root:dcrpm.py:154 DB needs rebuild ERROR root:util.py:206 /usr/bin/rpm timed out after 5 ERROR root:rpmutil.py:294 rpm -qa failed ERROR root:dcrpm.py:137 DB needs recovery WARNING root:pidutil.py:65 lsof returned non-zero: lsof: status error on /tmp/tmpjb4a8i4b/rpm/.dbenv.lock: No such file or directory WARNING root:pidutil.py:65 lsof returned non-zero: lsof: status error on /tmp/tmpjb4a8i4b/rpm/.rpm.lock: No such file or directory ___________________ DcrpmIntegrationTest.test_rpmdb_fedora26 ___________________ args = (, '/tmp/tmpv2mx12__/rpm') kwargs = {} def wrapper(*args, **kwargs): # type: (t.Any, t.Any) -> RT args += (os.path.join(temp_dir, "rpm"),) > result = t.cast(F, function)(*args, **kwargs) tests/rpmdb.py:38: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_end_to_end.py:31: in test_rpmdb_fedora26 self.assertTrue(run_result) E AssertionError: False is not true ------------------------------ Captured log call ------------------------------- WARNING root:rpmutil.py:510 No db_backend found in macros, assuming bdb ERROR root:util.py:206 /usr/bin/rpm timed out after 5 ERROR root:dcrpm.py:154 DB needs rebuild ERROR root:util.py:206 /usr/bin/rpm timed out after 5 ERROR root:dcrpm.py:154 DB needs rebuild ERROR root:util.py:206 /usr/bin/rpm timed out after 5 ERROR root:dcrpm.py:154 DB needs rebuild ERROR root:util.py:206 /usr/bin/rpm timed out after 5 ERROR root:dcrpm.py:154 DB needs rebuild ERROR root:util.py:206 /usr/bin/rpm timed out after 5 ERROR root:dcrpm.py:154 DB needs rebuild ERROR root:dcrpm.py:169 Unable to repair RPM database ___________________ DcrpmIntegrationTest.test_rpmdb_fedora31 ___________________ args = (, '/tmp/tmp6fusw021/rpm') kwargs = {} def wrapper(*args, **kwargs): # type: (t.Any, t.Any) -> RT args += (os.path.join(temp_dir, "rpm"),) > result = t.cast(F, function)(*args, **kwargs) tests/rpmdb.py:38: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_end_to_end.py:46: in test_rpmdb_fedora31 self.assertTrue(run_result) E AssertionError: False is not true ------------------------------ Captured log call ------------------------------- WARNING root:rpmutil.py:510 No db_backend found in macros, assuming bdb ERROR root:util.py:206 /usr/bin/rpm timed out after 5 ERROR root:dcrpm.py:154 DB needs rebuild ERROR root:util.py:206 /usr/bin/rpm timed out after 5 ERROR root:dcrpm.py:154 DB needs rebuild ERROR root:util.py:206 /usr/bin/rpm timed out after 5 ERROR root:dcrpm.py:154 DB needs rebuild ERROR root:util.py:206 /usr/bin/rpm timed out after 5 ERROR root:dcrpm.py:154 DB needs rebuild ERROR root:util.py:206 /usr/bin/rpm timed out after 5 ERROR root:dcrpm.py:154 DB needs rebuild ERROR root:dcrpm.py:169 Unable to repair RPM database =========================== short test summary info ============================ FAILED tests/test_end_to_end.py::DcrpmIntegrationTest::test_rpmdb_centos7 - d... FAILED tests/test_end_to_end.py::DcrpmIntegrationTest::test_rpmdb_centos8 - d... FAILED tests/test_end_to_end.py::DcrpmIntegrationTest::test_rpmdb_fedora26 - ... FAILED tests/test_end_to_end.py::DcrpmIntegrationTest::test_rpmdb_fedora31 - ... ============ 4 failed, 62 passed, 1 deselected in 446.24s (0:07:26) ============ RPM build errors: error: Bad exit status from /var/tmp/rpm-tmp.1zdggA (%check) Bad exit status from /var/tmp/rpm-tmp.1zdggA (%check) Child return code was: 1 EXCEPTION: [Error()] Traceback (most recent call last): File "/usr/lib/python3.10/site-packages/mockbuild/trace_decorator.py", line 93, in trace result = func(*args, **kw) File "/usr/lib/python3.10/site-packages/mockbuild/util.py", line 598, in do_with_status raise exception.Error("Command failed: \n # %s\n%s" % (command, output), child.returncode) mockbuild.exception.Error: Command failed: # bash --login -c /usr/bin/rpmbuild -bb --target noarch --nodeps /builddir/build/SPECS/python-dcrpm.spec