Bug 1177631 - [abrt] dnf: connection.py:641:call_blocking:ValueError: Unable to guess signature from an empty dict
Summary: [abrt] dnf: connection.py:641:call_blocking:ValueError: Unable to guess signa...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf-plugins-extras
Version: 21
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Igor Gnatenko
QA Contact: Fedora Extras Quality Assurance
URL: https://retrace.fedoraproject.org/faf...
Whiteboard: abrt_hash:1cd4d756cc23f39c0d7f48e1ba2...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-12-29 14:31 UTC by theShirbiny
Modified: 2015-02-23 23:27 UTC (History)
9 users (show)

Fixed In Version: dnf-plugins-extras-0.0.4-1.fc21
Clone Of:
Environment:
Last Closed: 2015-02-23 23:27:33 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: backtrace (2.06 KB, text/plain)
2014-12-29 14:31 UTC, theShirbiny
no flags Details
File: environ (2.46 KB, text/plain)
2014-12-29 14:31 UTC, theShirbiny
no flags Details
audit2why.log (164.37 KB, text/plain)
2014-12-29 15:13 UTC, theShirbiny
no flags Details
my log (2.80 KB, text/plain)
2014-12-29 15:17 UTC, Igor Gnatenko
no flags Details

Description theShirbiny 2014-12-29 14:31:20 UTC
Description of problem:
1-dnf install dnf-plugins-core dnf-plugins-extras dnf-plugins-extras-common
2-dnf remove snapper

dnf had to make a snapshot using snapper after the second command. but snapper was in the target list.

Version-Release number of selected component:
dnf-0.6.3-2.fc21

Additional info:
reporter:       libreport-2.3.0
cmdline:        /usr/bin/python -OO /bin/dnf remove snapper
dso_list:       dbus-python-1.2.0-7.fc21.x86_64
executable:     /bin/dnf
kernel:         3.17.7-300.fc21.x86_64
runlevel:       N 5
type:           Python
uid:            0

Truncated backtrace:
connection.py:641:call_blocking:ValueError: Unable to guess signature from an empty dict

Traceback (most recent call last):
  File "/bin/dnf", line 36, in <module>
    main.user_main(sys.argv[1:], exit_code=True)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 182, in user_main
    errcode = main(args)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 84, in main
    return _main(base, args)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 141, in _main
    ret = resolving(cli, base)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 160, in resolving
    base.do_transaction()
  File "/usr/lib/python2.7/site-packages/dnf/cli/cli.py", line 221, in do_transaction
    self.plugins.run_transaction()
  File "/usr/lib/python2.7/site-packages/dnf/plugin.py", line 82, in fn
    dnf.util.mapall(operator.methodcaller(method), self.plugins)
  File "/usr/lib/python2.7/site-packages/dnf/util.py", line 157, in mapall
    return list(map(fn, *seq))
  File "/usr/lib/python2.7/site-packages/dnf-plugins/snapper.py", line 50, in transaction
  File "/usr/lib64/python2.7/site-packages/dbus/proxies.py", line 70, in __call__
    return self._proxy_method(*args, **keywords)
  File "/usr/lib64/python2.7/site-packages/dbus/proxies.py", line 145, in __call__
    **keywords)
  File "/usr/lib64/python2.7/site-packages/dbus/connection.py", line 641, in call_blocking
    message.append(signature=signature, *args)
ValueError: Unable to guess signature from an empty dict

Local variables in innermost frame:
byte_arrays: False
dbus_interface: 'org.opensuse.Snapper'
self: <dbus._dbus.SystemBus (system) at 0x7f139f018410>
args: ('root', 'dnf', '', {})
object_path: '/org/opensuse/Snapper'
signature: None
bus_name: dbus.UTF8String(':1.49')
get_args_opts: {'byte_arrays': False, 'utf8_strings': False}
timeout: -1.0
kwargs: {}
e: ValueError('Unable to guess signature from an empty dict',)
message: <dbus.lowlevel.MethodCallMessage path: /org/opensuse/Snapper, iface: org.opensuse.Snapper, member: CreateSingleSnapshot dest: :1.49>
method: 'CreateSingleSnapshot'

Comment 1 theShirbiny 2014-12-29 14:31:25 UTC
Created attachment 974060 [details]
File: backtrace

Comment 2 theShirbiny 2014-12-29 14:31:27 UTC
Created attachment 974061 [details]
File: environ

Comment 3 Igor Gnatenko 2014-12-29 14:37:35 UTC
This bug not in dnf, so reassigning to dnf-plugins-extras.

Thanks for bugreport. I'll check soon what happens.

Comment 4 Igor Gnatenko 2014-12-29 14:47:38 UTC
1. do you have any SELinux errors?
2. attach `audit2why -a`
3. What version of dbus-python you have? rpm -q dbus-python

Comment 5 theShirbiny 2014-12-29 15:12:19 UTC
(In reply to Igor Gnatenko from comment #4)
> 1. do you have any SELinux errors?
only warnings, and doesn't seem dnf related.

> 2. attach `audit2why -a`
okay
> 3. What version of dbus-python you have? rpm -q dbus-python
dbus-python-1.2.0-7.fc21.x86_64

if you want to generate the bug yourself, you want to install something between:

1-dnf install dnf-plugins-core dnf-plugins-extras dnf-plugins-extras-common

and

2-dnf remove snapper

Comment 6 theShirbiny 2014-12-29 15:13:09 UTC
Created attachment 974073 [details]
audit2why.log

Comment 7 Igor Gnatenko 2014-12-29 15:17:26 UTC
Created attachment 974084 [details]
my log

can't reproduce this bug.

Comment 8 Igor Gnatenko 2014-12-29 15:19:36 UTC
ah, I can reproduce bug!
 thanks. Will fix/

Comment 9 Igor Gnatenko 2014-12-29 15:20:46 UTC
ERROR:dbus.proxies:Introspect error on :1.247:/org/opensuse/Snapper: dbus.exceptions.DBusException: org.freedesktop.DBus.Error.AccessDenied: Rejected send message, 1 matched rules; type="method_call", sender=":1.256" (uid=0 pid=15649 comm="/usr/bin/python -OO /bin/dnf erase snapper ") interface="org.freedesktop.DBus.Introspectable" member="Introspect" error name="(unset)" requested_reply="0" destination=":1.247" (uid=0 pid=15454 comm="/usr/sbin/snapperd ")

Comment 10 Igor Gnatenko 2014-12-29 15:49:19 UTC
looks like raise condition in DNF.

@DNF developers:
1. install snapper
2. run python interpreter and run following code (don't close after):
from dbus import SystemBus, Interface, DBusException
snapper = Interface(bus.get_object('org.opensuse.Snapper', '/org/opensuse/Snapper'), dbus_interface='org.opensuse.Snapper')
3. remove snapper in another terminal
4. run following code:
snap = snapper.CreateSingleSnapshot("root", "test", "", {})


We will get:
DBusException: org.freedesktop.DBus.Error.AccessDenied: Rejected send message, 1 matched rules; type="method_call", sender=":1.266" (uid=1000 pid=17351 comm="/usr/bin/python /usr/bin/ipython ") interface="org.opensuse.Snapper" member="CreateSingleSnapshot" error name="(unset)" requested_reply="0" destination=":1.275" (uid=0 pid=19958 comm="/usr/sbin/snapperd ")

That's ok, because snapper deleted already.

If snapper will be removed before getting dbus Interface we will get:
DBusException: org.freedesktop.DBus.Error.ServiceUnknown: The name org.opensuse.Snapper was not provided by any .service files

we have getting interface for dbus and creating in transaction(), so if we're deleting snapper it should fail on org.freedesktop.DBus.Error.ServiceUnknown.




I think we're running transaction() from plugins early or something like that.

Comment 11 Honza Silhan 2015-01-12 13:45:10 UTC
Still I don't see it as a bug in DNF. All plugins should make sure they still have all dependencies before calling them. You should check whether snapper is in self.base.transaction.remove_set and if so don't do anything. I am not sure if remove_set is not destructed at the `transaction` phase but it should be definitely accessible from `resolved` phase.

Comment 12 Igor Gnatenko 2015-01-12 14:48:10 UTC
(In reply to Jan Silhan from comment #11)
> Still I don't see it as a bug in DNF. All plugins should make sure they
> still have all dependencies before calling them. You should check whether
> snapper is in self.base.transaction.remove_set and if so don't do anything.
> I am not sure if remove_set is not destructed at the `transaction` phase but
> it should be definitely accessible from `resolved` phase.
Thanks for clarification. I will fix it soon!

Comment 13 Igor Gnatenko 2015-01-13 00:28:11 UTC
https://github.com/rpm-software-management/dnf-plugins-extras/pull/2

I should do some checks. I'll do it ASAP.

Comment 14 Radek Holy 2015-01-13 09:14:13 UTC
I wonder whether any Python code should check whether it's dependency have disappeared during the runtime. For me, it sounds like an assumption that it shouldn't disappear. It would mean that (at least) every DNF plugin that has a dependency should check every transaction and handle these situations somehow... I think it would be nice if it would be handled on DNF level.

Comment 15 Honza Silhan 2015-01-13 10:33:54 UTC
If DNF detected that then it would wrongly abort the transaction where the erased package is not used. Sadly plugins should make sure package is still available in current phase - it cannot be automatically detected from outside.

Comment 17 Fedora Update System 2015-01-29 13:12:01 UTC
dnf-plugins-extras-0.0.3-1.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/dnf-plugins-extras-0.0.3-1.fc21

Comment 18 Fedora Update System 2015-01-30 04:43:07 UTC
Package dnf-plugins-extras-0.0.3-1.fc21:
* should fix your issue,
* was pushed to the Fedora 21 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing dnf-plugins-extras-0.0.3-1.fc21'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2015-1402/dnf-plugins-extras-0.0.3-1.fc21
then log in and leave karma (feedback).

Comment 19 Fedora Update System 2015-02-13 11:00:54 UTC
dnf-plugins-extras-0.0.4-1.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/dnf-plugins-extras-0.0.4-1.fc21

Comment 20 Fedora Update System 2015-02-23 23:27:33 UTC
dnf-plugins-extras-0.0.4-1.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.


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