• Re: [gentoo-user] HOWTO portage auto(own)DOS and solution

    From Eli Schwartz@21:1/5 to Javier Martinez on Wed Jul 16 15:40:01 2025
    To: [email protected] (Sam James)

    This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --------------WQMUtaz7aOgAyX8VkT7Ts5LT
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: quoted-printable

    On 7/16/25 9:02 AM, Javier Martinez wrote:
    Read this BEFORE getting a flamethrower

    This filename in /etc/portage/package.env directory:

    'aften'$'\303'


    caused a general python DOS, all portage tools related fail with this
    error:


            ^^^^^^^^^^^^^^^^^^^^^^^^^^
    UnicodeEncodeError: 'utf-8' codec can't encode character '\udcc3' in
    position 30: surrogates not allowed

    However it's hard to get detected the origin, stracing dispatch-conf
    did, stracing emerge with forks... don't at least to me.

    With all tools fail I want mean ALL, dispatch-conf included for example.

    Portage was unable to decode from unicode and reencode.

    If this damned error happens to you check which part of python trace
    points to, sometimes marks filename as the responsible

    I expect that this helps you to avoid getting crazy by this error, avoid crying, and avoid you to reinstall gentoo from the begining and since
    it's the FOURTH time that it happens to me in four distincts systems, at least I will find a way to find the answer around there in the mail
    list....


    This is caused by a really bad idea that someone had to "fix" python for
    the python2 -> python3 migration. Python natively handles various
    arguments as both str and bytes, portage pointlessly converts them to
    bytes in a way that only works some of the time because "it looks like
    how python2 did it".

    That being said I do wonder how you originally accidentally created this filename...



    --
    Eli Schwartz

    --------------WQMUtaz7aOgAyX8VkT7Ts5LT--

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

    wnsEABYIACMWIQTnFNnmK0TPZHnXm3qEp9ErcA0vVwUCaHeq8AUDAAAAAAAKCRCEp9ErcA0vV19I AP9707R0qxTKWd2HPcBi+s27PVMmtxdbt2BQKmMiXE92lAEAmyp4ZsFWEmfevn2fLWBBCd18RmWB x9B14Ue6jkQgGAg=
    =HRs3
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)