Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-2368

dnf history info fails with "runtime error: stoi" in transaction.py ln1133

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Minor Minor
    • None
    • rhel-8.8.0
    • libdnf
    • None
    • Moderate
    • rhel-sst-cs-software-management
    • ssg_core_services
    • None
    • False
    • Hide

      None

      Show
      None
    • None
    • Red Hat Enterprise Linux
    • None
    • None
    • None
    • x86_64
    • None

      Please provide the package NVR for which bug is seen:

      Name         : dnf
      Version      : 4.7.0
      Release      : 16.el8_8
      Name         : libdnf
      Version      : 0.63.0
      Release      : 14.el8_8
      

      How reproducible:

      Run dnf history info for a longer transaction interval:

      dnf history info 24..81

      In my case, an interval above 56 transactions consistently triggered the error, smaller intervals did not. YMMV

      Actual results

      The first part of the expected output appeared, The last "normal" output line is "Packages Altered:". Then I got a RuntimeError with a full trace:

      Packages Altered:
      Traceback (most recent call last):
        File "/bin/dnf", line 58, in <module>
          main.user_main(sys.argv[1:], exit_code=True)
        File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 201, in user_main
          errcode = main(args)
        File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 67, in main
          return _main(base, args, cli_class, option_parser_class)
        File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 106, in _main
          return cli_run(cli, base)
        File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 122, in cli_run
          cli.run()
        File "/usr/lib/python3.6/site-packages/dnf/cli/cli.py", line 1055, in run
          return self.command.run()
        File "/usr/lib/python3.6/site-packages/dnf/cli/commands/history.py", line 351, in run
          self.output.historyInfoCmd(tids, self.opts.transactions, merged_tids)
        File "/usr/lib/python3.6/site-packages/dnf/cli/output.py", line 1646, in historyInfoCmd
          self._historyInfoCmd(mobj)
        File "/usr/lib/python3.6/site-packages/dnf/cli/output.py", line 1796, in _historyInfoCmd
          self.historyInfoCmdPkgsAltered(old, pats)
        File "/usr/lib/python3.6/site-packages/dnf/cli/output.py", line 1841, in historyInfoCmdPkgsAltered
          packages = old.packages()
        File "/usr/lib/python3.6/site-packages/dnf/db/history.py", line 232, in packages
          result = self._trans.getItems()
        File "/usr/lib64/python3.6/site-packages/libdnf/transaction.py", line 1133, in getItems
          return _transaction.MergedTransaction_getItems(self)
      RuntimeError: stoi

      Also, in 2020 a very similar bug report from Fedora was filed: https://bugzilla.redhat.com/show_bug.cgi?id=1896606 Source line numbers differ, but the rest of the stacktrace is very similar.

              rhn-support-ppisar Petr Pisar
              csipak_attila Attila Csipak (Inactive)
              packaging-team-maint packaging-team-maint
              Software Management QE Software Management QE
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: