Bug 1570116 - ugly error shown if ctrl+c pressed
Summary: ugly error shown if ctrl+c pressed
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: 28
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: rpm-software-management
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-04-20 16:22 UTC by Vladimir Benes
Modified: 2019-05-28 19:24 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-05-28 19:24:16 UTC
Type: Bug


Attachments (Terms of Use)

Description Vladimir Benes 2018-04-20 16:22:05 UTC
Description of problem:
I wannted to cancel transaction and this was shown. That's ugly and should be handled better.

[root@localhost NetworkManager-ci]# dnf downgrade https://kojipkgs.fedoraproject.org//packages/ipsec-tools/0.8.2/9.fc28/x86_64/ipsec-tools-0.8.2-9.fc28.x86_64.rpm
Failed to set locale, defaulting to C
Last metadata expiration check: 4:11:10 ago on Fri Apr 20 14:07:28 2018.
^CTraceback (most recent call last):                                                  ???% [===                                                                                  ] ---  B/s |   0  B     --:-- ETA
  File "/usr/lib/python3.6/site-packages/dnf/repo.py", line 416, in _progress_cb
    def _progress_cb(self, cbdata, total, done):
KeyboardInterrupt

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/dnf/util.py", line 220, in new_func
    log_call('Call: %s: %s, %s', name, args[1:], kwargs)
  File "/usr/lib64/python3.6/logging/__init__.py", line 1366, in log
    if not isinstance(level, int):
SystemError: <built-in function isinstance> returned a result with an error set

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/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 179, in user_main
    errcode = main(args)
  File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 64, in main
    return _main(base, args, cli_class, option_parser_class)
  File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 99, in _main
    return cli_run(cli, base)
  File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 115, in cli_run
    cli.run()
  File "/usr/lib/python3.6/site-packages/dnf/cli/cli.py", line 1016, in run
    return self.command.run()
  File "/usr/lib/python3.6/site-packages/dnf/cli/commands/downgrade.py", line 55, in run
    file_pkgs=self.base.add_remote_rpms(self.opts.filenames, strict=False),
  File "/usr/lib/python3.6/site-packages/dnf/base.py", line 1274, in add_remote_rpms
    path = dnf.util._urlopen_progress(path, self.conf)
  File "/usr/lib/python3.6/site-packages/dnf/util.py", line 74, in _urlopen_progress
    librepo.download_packages(targets, failfast=True)
  File "/usr/lib64/python3.6/site-packages/librepo/__init__.py", line 1616, in download_packages
    return _librepo.download_packages(list, failfast)
  File "/usr/lib/python3.6/site-packages/dnf/util.py", line 220, in new_func
    log_call('Call: %s: %s, %s', name, args[1:], kwargs)
  File "/usr/lib64/python3.6/logging/__init__.py", line 1366, in log
    if not isinstance(level, int):
SystemError: <built-in function isinstance> returned a result with an error set




Version-Release number of selected component (if applicable):
dnf-2.7.5-12.fc28.noarch


Steps to Reproduce:
1. dnf downgrade https://kojipkgs.fedoraproject.org//packages/ipsec-tools/0.8.2/9.fc28/x86_64/ipsec-tools-0.8.2-9.fc28.x86_64.rpm
2. press ctrl+c

Actual results:
traceback

Expected results:
just ctrl+c message should be shown

Additional info:
I had one more transaction running in other terminal, not sure if that was causing it

Comment 1 Jan Pokorný [poki] 2018-05-03 13:14:40 UTC
Have just hit this one too, with dnf-2.7.5-12.fc29.noarch.

Comment 2 Ben Cotton 2019-05-02 20:47:38 UTC
This message is a reminder that Fedora 28 is nearing its end of life.
On 2019-May-28 Fedora will stop maintaining and issuing updates for
Fedora 28. It is Fedora's policy to close all bug reports from releases
that are no longer maintained. At that time this bug will be closed as
EOL if it remains open with a Fedora 'version' of '28'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 28 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 3 Jan Pokorný [poki] 2019-05-03 09:32:40 UTC
It looks to me that this is not happening for some time already.

Either the command is interrupted (sometimes not instantly, but
that's fairly OK), sometimes with:

> KeyboardInterrupt: Terminated.

IIRC, part of fix was a signal shield turned on when entering RPM
code during the flow.

Also the related problems are likely fixed now, such as [bug 1610456].

Comment 4 Jan Pokorný [poki] 2019-05-03 09:49:06 UTC
> IIRC, part of fix was a signal shield turned on when entering RPM
> code during the flow.

Aha, that alone is not covering it all, see [bug 1425476 comment 12].
But that's only tangential to this very issue.

Comment 5 Ben Cotton 2019-05-28 19:24:16 UTC
Fedora 28 changed to end-of-life (EOL) status on 2019-05-28. Fedora 28 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.