AIX Open Source

 View Only
Expand all | Collapse all

dnf segfault with new openssl

  • 1.  dnf segfault with new openssl

    Posted Mon January 09, 2023 06:51 AM
    Hi,

    seems dnf has a problem with openssl v3 on aix 7.3...

    root@aixstp12e3db: /var/lib/dnf # oslevel -s
    7300-01-01-2246

    root@aixstp12e3db: /var/lib/dnf # lslpp -l | grep -i openssl
    openssl.base 3.0.5.101 COMMITTED Open Secure Socket Layer
    openssl.license 3.0.5.101 COMMITTED Open Secure Socket License
    openssl.man.en_US 3.0.5.101 COMMITTED Open Secure Socket Layer
    openssl.base 3.0.5.101 COMMITTED Open Secure Socket Layer


    root@aixstp12e3db: /var/lib/dnf # dnf -vvvv list
    DNF version: 4.2.17
    cachedir: /var/cache/dnf
    os-release file not found
    os-release: falling back to basic User-Agent: missing NAME or VERSION_ID
    repo: downloading from remote: AIX_Toolbox
    Segmentation faulttory                      
    
    root@aixstp12e3db: /var/lib/dnf # dbx -p /=./ /opt/freeware/bin/python3 ./core
    Type 'help' for help.
    [using memory image in ./core]
    reading symbolic information ...internal error: assertion failed at line 6693 in file object.c
    internal error: assertion failed at line 6693 in file object.c
    internal error: assertion failed at line 6693 in file object.c
    ...
    Segmentation fault in ppccpuid.OPENSSL_cleanse [/usr/lib/libcrypto.a] at 0x90000000452d2d8 ($t1)
    0x90000000452d2d8 (OPENSSL_cleanse+0x48) 90030000            stw   r0,0x0(r3)
    (dbx) corefile
     Process Name:  /opt/freeware/bin/python3
     Version:       500
     Flags:         FULL_CORE | CORE_VERSION_1 | UBLOCK_VALID | USTACK_VALID | LE_VALID
     Signal:        SEGV
     Process Mode:  64 bit
    
    (dbx) where
    ppccpuid.OPENSSL_cleanse(??, ??) at 0x90000000452d2d8
    CRYPTO_clear_free(0x11063a130, 0xffffffffa14d9738, 0x900000004781fa8, 0x2100000021) at 0x90000000453a320
    EVP_MD_CTX_reset(0x11063a0f0) at 0x9000000045c3a7c
    EVP_MD_CTX_free(0x11063a0f0) at 0x9000000045c3b28
    lr_checksum_fd(??, ??, ??) at 0x90000000786a360
    lr_checksum_fd_compare(??, ??, ??, ??, ??, ??, ??) at 0x90000000786a7d8
    lr_download(??, ??, ??) at 0x90000000787b26c
    lr_download_single_cb(??, ??, ??, ??, ??) at 0x90000000787bb6c
    lr_yum_download_repo(??, ??, ??, ??) at 0x9000000078751f0
    lr_yum_perform(??, ??, ??) at 0x900000007875ad4
    lr_handle_perform(??, ??, ??) at 0x90000000786fd18
    libdnf::Repo::Impl::lrHandlePerform(_LrHandle*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)(0xfffffffffffc898, 0x1104e8010, 0x110631ef0, 0xfffffffffffc838) at 0x90000000794d104
    libdnf::Repo::Impl::fetch(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::unique_ptr<_LrHandle, std::default_delete<_LrHandle> >&&)(0x1104e8010, 0xfffffffffffca80, 0xfffffffffffc9e8) at 0x90000000794ff78
    libdnf::Repo::Impl::load()(0x1104e8010) at 0x900000007950bfc
    libdnf::Repo::load()(0x1100af590) at 0x900000007947af8
    repoPYTHON_wrap._wrap_Repo_load(0xa0000000055d048, 0xa00000000a08088) at 0x900000008def56c
    _PyMethodDef_RawFastCallKeywords(??, ??, ??, ??, ??) at 0x9000000094339b4
    _PyCFunction_FastCallKeywords(??, ??, ??, ??) at 0x900000009433c20
    _PyEval_EvalFrameDefault(??, ??) at 0x9000000095f5894
    PyEval_EvalFrameEx(??, ??) at 0x9000000094a5fd4
    function_code_fastcall(??, ??, ??, ??) at 0x9000000095e2764
    _PyEval_EvalFrameDefault(??, ??) at 0x9000000095f530c
    PyEval_EvalFrameEx(??, ??) at 0x9000000094a5fd4
    function_code_fastcall(??, ??, ??, ??) at 0x9000000095e2764
    _PyEval_EvalFrameDefault(??, ??) at 0x9000000095f4260
    PyEval_EvalFrameEx(??, ??) at 0x9000000094a5fd4
    function_code_fastcall(??, ??, ??, ??) at 0x9000000095e2764
    _PyEval_EvalFrameDefault(??, ??) at 0x9000000095f530c
    PyEval_EvalFrameEx(??, ??) at 0x9000000094a5fd4
    _PyEval_EvalCodeWithName(??, ??, ??, ??, ??, ??, ??, ??) at 0x9000000094a6bb4
    _PyFunction_FastCallKeywords(??, ??, ??, ??) at 0x9000000094331e4
    _PyEval_EvalFrameDefault(??, ??) at 0x9000000095f2634
    PyEval_EvalFrameEx(??, ??) at 0x9000000094a5fd4
    function_code_fastcall(??, ??, ??, ??) at 0x9000000095e2764
    _PyEval_EvalFrameDefault(??, ??) at 0x9000000095f530c
    PyEval_EvalFrameEx(??, ??) at 0x9000000094a5fd4
    function_code_fastcall(??, ??, ??, ??) at 0x9000000095e2764
    _PyEval_EvalFrameDefault(??, ??) at 0x9000000095f530c
    PyEval_EvalFrameEx(??, ??) at 0x9000000094a5fd4
    function_code_fastcall(??, ??, ??, ??) at 0x9000000095e2764
    _PyEval_EvalFrameDefault(??, ??) at 0x9000000095f2e4c
    PyEval_EvalFrameEx(??, ??) at 0x9000000094a5fd4
    function_code_fastcall(??, ??, ??, ??) at 0x9000000095e2764
    _PyEval_EvalFrameDefault(??, ??) at 0x9000000095f2e4c
    PyEval_EvalFrameEx(??, ??) at 0x9000000094a5fd4
    _PyEval_EvalCodeWithName(??, ??, ??, ??, ??, ??, ??, ??) at 0x9000000094a6bb4
    _PyFunction_FastCallKeywords(??, ??, ??, ??) at 0x9000000094331e4
    _PyEval_EvalFrameDefault(??, ??) at 0x9000000095f2e4c
    PyEval_EvalFrameEx(??, ??) at 0x9000000094a5fd4
    _PyEval_EvalCodeWithName(??, ??, ??, ??, ??, ??, ??, ??) at 0x9000000094a6bb4
    _PyFunction_FastCallKeywords(??, ??, ??, ??) at 0x9000000094331e4
    _PyEval_EvalFrameDefault(??, ??) at 0x9000000095f2634
    PyEval_EvalFrameEx(??, ??) at 0x9000000094a5fd4
    _PyEval_EvalCodeWithName(??, ??, ??, ??, ??, ??, ??, ??) at 0x9000000094a6bb4
    PyEval_EvalCodeEx(??, ??, ??, ??, ??, ??, ??, ??) at 0x9000000094a6edc
    PyEval_EvalCode(??, ??, ??) at 0x9000000094a6f60
    run_mod(??, ??, ??, ??, ??, ??) at 0x9000000094de1c4
    PyRun_FileExFlags(??, ??, ??, ??, ??, ??, ??) at 0x9000000094e1e44
    PyRun_SimpleFileExFlags(??, ??, ??, ??) at 0x9000000094e20a8
    PyRun_AnyFileExFlags(??, ??, ??, ??) at 0x9000000094e27b0
    pymain_main(??) at 0x9000000095d9b70
    _Py_UnixMain(??, ??) at 0x9000000095da1f0
    python.main(??, ??) at 0x1000004f4
    (dbx) quit
    ​


    slibclean does not help...

    might be related to -> this



    chris



    ------------------------------
    I regret starting this entire conversation
    ------------------------------


  • 2.  RE: dnf segfault with new openssl

    Posted Mon January 09, 2023 10:05 AM
    I think it could be related to the issues mentioned in this post

    Please let me know the output of "rpm -qa"

    ------------------------------
    SANGAMESH
    ------------------------------



  • 3.  RE: dnf segfault with new openssl

    Posted Mon January 09, 2023 10:11 AM
    i am the original poster of the thread you mentioned...

    rpm -qa output:

    root@aixstp12e3db: /root # rpm -qa | sort
    AIX-rpm-7.3.1.1-10.ppc
    bash-5.1.4-2.ppc
    bzip2-1.0.8-2.ppc
    ca-certificates-2021.2.52-3.ppc
    cfengine-3.18.2-itsv.ppc
    check-0.13.0-1.ppc
    coreutils-9.0-1.ppc
    cpio-2.13-1.ppc
    cups-libs-2.2.3-3.ppc
    curl-7.85.0-2.ppc
    cyrus-sasl-2.1.28-1.ppc
    db-5.3.28-1.ppc
    dbus-1.14.0-1.ppc
    dnf-4.2.17-64_51.ppc
    dnf-automatic-4.2.17-64_51.ppc
    dnf-data-4.2.17-64_51.ppc
    expat-2.4.9-1.ppc
    file-5.41-1.ppc
    file-libs-5.41-1.ppc
    fontconfig-2.11.95-4.ppc
    freetype2-2.12.1-1.ppc
    gawk-5.1.1-1.ppc
    gdbm-1.23-1.ppc
    gettext-0.21-2.ppc
    git-2.35.1-1.ppc
    git-core-2.35.1-1.ppc
    git-core-doc-2.35.1-1.noarch
    glib2-2.56.1-3.ppc
    gmp-6.2.1-1.ppc
    gnupg2-2.2.35-1.ppc
    gnutls-3.7.2-1.ppc
    gpgme-1.13.1-100.ppc
    grep-3.7-1.ppc
    gzip-1.12-1.ppc
    info-6.7-1.ppc
    jansson-2.14-1.ppc
    json-c-0.15-2.ppc
    krb5-libs-1.18.5-2.ppc
    less-598-1.ppc
    libassuan-2.5.5-1.ppc
    libcomps-0.1.11-101.ppc
    libdnf-0.39.1-64_50.ppc
    libffi-3.4.2-1.ppc
    libgcc-10-2.ppc
    libgcc10-10.3.0-6.ppc
    libgcc8-8.3.0-7.ppc
    libgcrypt-1.9.4-1.ppc
    libgomp-10-2.ppc
    libgomp10-10.3.0-6.ppc
    libgomp8-8.3.0-7.ppc
    libgpg-error-1.45-1.ppc
    libiconv-1.17-1.ppc
    libksba-1.6.0-1.ppc
    liblmdb-0.9.29-1.ppc
    libmodulemd-1.5.2-100.ppc
    libnghttp2-1.46.0-1.ppc
    libpng-1.6.37-1.ppc
    librepo-1.11.0-101.ppc
    libsmartcols-2.34-100.ppc
    libsodium-1.0.18-1.ppc
    libsolv-0.7.9-64_50.ppc
    libssh2-1.10.0-2.ppc
    libstdc++-10-2.ppc
    libstdc++10-10.3.0-6.ppc
    libstdc++8-8.3.0-7.ppc
    libtasn1-4.16.0-1.ppc
    libtextstyle-0.21-2.ppc
    libunistring-0.9.10-1.ppc
    libxml2-2.10.2-1.ppc
    libyaml-0.2.5-1.ppc
    libzstd-1.5.2-1.ppc
    lpar2rrd-agent-7.50-0.ppc
    lua-5.4.1-1.ppc
    lz4-1.9.3-1.ppc
    lzo-2.10-2.ppc
    make-4.3-1.ppc
    mpfr-4.1.0-1.ppc
    ncurses-6.3-1.ppc
    nettle-3.7.3-1.ppc
    npth-1.5-1.ppc
    openldap-2.4.58-4.ppc
    p11-kit-0.23.22-1.ppc
    p11-kit-tools-0.23.22-1.ppc
    pcre-8.44-2.ppc
    perl-5.34.1-1.ppc
    pigz-2.4-1.ppc
    pinentry-1.0.0-1.ppc
    pkg-config-0.29.2-2.ppc
    popt-1.18-1.ppc
    pysqlite-2.8.3-2.ppc
    python-2.7.18-3.ppc
    python-devel-2.7.18-3.ppc
    python-iniparse-0.4-1.noarch
    python-pycurl-7.43.0-1.ppc
    python-tools-2.7.18-3.ppc
    python-urlgrabber-3.10.1-1.noarch
    python3-3.7.12-1.ppc
    python3-devel-3.7.12-1.ppc
    python3-dnf-4.2.17-64_51.ppc
    python3-docs-3.7.12-1.ppc
    python3-gpg-1.13.1-100.ppc
    python3-hawkey-0.39.1-64_50.ppc
    python3-jinja2-2.10.3-1.noarch
    python3-libcomps-0.1.11-101.ppc
    python3-libdnf-0.39.1-64_50.ppc
    python3-librepo-1.11.0-101.ppc
    python3-markupsafe-1.1.1-1.ppc
    python3-test-3.7.12-1.ppc
    python3-tools-3.7.12-1.ppc
    readline-8.1-1.ppc
    rlwrap-0.43-2.ppc
    rpm-python3-4.15.1-64_2.ppc
    rsync-3.2.3-1.ppc
    screen-4.7.0-1.ppc
    sed-4.8-1.ppc
    sqlite-3.39.3-1.ppc
    sudo-1.9.5p2-1.ppc
    tar-1.33-1.ppc
    unzip-6.0-3.ppc
    vim-common-9.0.0325-1.ppc
    vim-enhanced-9.0.0325-1.ppc
    wget-1.21.2-1.ppc
    xz-5.2.5-1.ppc
    xz-libs-5.2.5-1.ppc
    yum-metadata-parser-1.1.4-2.ppc
    zchunk-libs-1.1.4-102.ppc
    zip-3.0-4.ppc
    zlib-1.2.12-1.ppc
    zlib-devel-1.2.12-1.ppc
    zstd-1.5.2-1.ppc
    ​


    ------------------------------
    I regret starting this entire conversation
    ------------------------------



  • 4.  RE: dnf segfault with new openssl

    Posted Tue January 10, 2023 05:46 AM
    DNF and dependencies are built with openssl-1.1.1.
    Looks like DNF environment is mixed with openssl-1.0.2 and 1.1.1

    The latest curl-7.85.0-2 which is built against 1.1.1, but the python3-3.7.12 and libdnf installed are built with openssl-1.0.2
    You have done update of only curl at some point but not the "dnf update" ?


    ------------------------------
    SANGAMESH
    ------------------------------



  • 5.  RE: dnf segfault with new openssl

    Posted Tue January 10, 2023 05:59 AM
    >>You have done update of only curl at some point but not the "dnf update" ?

    not that i am aware of...what needs to be done to fix this...there is no "newer" dnf in the repo than what is installed on the machine.

    the machines were just upgraded to latest aix 7.3 SP/ML, from this onwards we have those segfaults on the upgraded machines.
    nothing was done dnf wise (update or else)

    ------------------------------
    I regret starting this entire conversation
    ------------------------------



  • 6.  RE: dnf segfault with new openssl

    Posted Tue January 10, 2023 07:23 AM
    Since DNF itself is segfaulting it won't even be able to get the latest one from the repository.

    Not sure if it is feasible for you but one option would be to remove libdnf and librepo.

    rpm -e librepo python3-librepo libdnf python3-libdnf python3-hawkey --nodeps

    Run dnf_aixtoolbox.sh script with "-d" option and then run the "dnf update"

    ------------------------------
    SANGAMESH
    ------------------------------



  • 7.  RE: dnf segfault with new openssl

    Posted Tue January 10, 2023 07:55 AM
    ok, that fixed. i still want to know the reason behind all this. currenty we are in a process of doing many aix updates so...if there is some
    special treatment beside the standard yum/dnf procedure to be done please let me know.


    ------------------------------
    I regret starting this entire conversation
    ------------------------------



  • 8.  RE: dnf segfault with new openssl

    Posted Tue January 10, 2023 08:03 AM
    after cleaning dnf metadata (dnf clean all) the segfaults are back...

    root@aixstp12e3db: /root # dnf clean all
    6 files removed
    root@aixstp12e3db: /root # dnf update
    Segmentation faulttory         ​


    ------------------------------
    I regret starting this entire conversation
    ------------------------------



  • 9.  RE: dnf segfault with new openssl

    Posted Tue January 10, 2023 08:53 AM
    I tried with same exact packages and didn't see the issue after these steps.
    Please let me know the "rpm -qa" output again.

    ------------------------------
    SANGAMESH
    ------------------------------



  • 10.  RE: dnf segfault with new openssl

    Posted Tue January 10, 2023 08:52 AM
    This issue is because of different versions of openssl within a single DNF session with runtime linking enabled.
    As mentioned in the below post please make sure you do "dnf update" instead of updating a packages individually.
    We have reuploaded python3, curl and libdnf to have all DNF dependencies with openssl-1.1.1.
    If all these are in sync then we don't have any issues.

    https://community.ibm.com/community/user/power/discussion/recent-dnf-and-yum-issues-with-newer-python3-and-curl-builds?ReturnUrl=%2fcommunity%2fuser%2fpower%2fcommunities%2fcommunity-home%2fdigestviewer%3fcommunitykey%3d10c1d831-47ee-4d92-a138-b03f7896f7c9

    ------------------------------
    SANGAMESH
    ------------------------------



  • 11.  RE: dnf segfault with new openssl

    Posted Tue January 10, 2023 09:14 AM
    this article explains a lot...was not aware of that at all.

    ------------------------------
    I regret starting this entire conversation
    ------------------------------