Uploaded image for project: 'Satellite'
  1. Satellite
  2. SAT-36285

pulpcore worker stuck on parsing specific custom primary.xml metadata

XMLWordPrintable

    • None
    • None
    • None
    • To Do

      Description of problem:
      Satellite / pulp is unable to sync a custom repo, as pulpcore worker gets stuck forever in an attempt to process primary.xml metadata file, consuming 100% CPU all the time.

      Custom repo metadata will be attached, be aware they might contain some customer sensitive data.

      The bug is almost certainly in createrepo_c library, since backtraces of coredumps show the tight loop is there.

      Per rhn-engineering-ggainey++ , the bug is fixed in createrepo_c 1.2.1 which requires at least python3.12-pulp-rpm-3.29.0-1 hence >Sat6.17 version.
       

      How reproducible:
      100%

       
      Steps to Reproduce:

      1. Set up a repo with specific repodata (details to follow in private comment)

      2. Sync the repo

      Actual behavior:
      sync never terminates, pulpcore-worker spins 100% CPU, backtraces of the running process look like:

      Thread 1 (Thread 0x2b3b8b737780 (LWP 17055)):
      #0  0x00002b3ba8402cf4 in cr_PkgIterator_parse_next (iter=0x558e373bbe30, err=0x7ffd0ca6ef20) at /usr/src/debug/createrepo_c-1.0.2-5.el8pc.x86_64/src/xml_parser_main_metadata_together.c:407
      #1  0x00002b3ba81c6864 in pkg_iterator_next_package (PyObject_self=<PackageIterator at remote 0x2b3bb27ea030>) at /usr/src/debug/createrepo_c-1.0.2-5.el8pc.x86_64/src/python/xml_parser-py.c:871
      #2  0x00002b3b8bb19828 in _PyEval_EvalFrameDefault (tstate=<optimized out>, frame=<optimized out>, throwflag=<optimized out>) at /usr/src/debug/python3.11-3.11.11-1.el8_10.x86_64/Include/object.h:133
      

      More detailed check shows the parsed file is primary.xml with in_progress_count_primary=1, in_progress_count_filelists=cbdata->in_progress_count_other=0, BUT primary_is_done=0 (false) (hence parse_next_section method is repeatedly called and returns false).

      Expected behavior:
      Repo synced in several seconds (it has 488 packages).

      Business Impact / Additional info:

              rhn-support-visawant Vijaykumar Sawant
              rhn-support-pmoravec Pavel Moravec
              Ian Ballou
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: