abrt version: 2.0.3
cmdline: /usr/bin/python -O /usr/share/wicd/daemon/wicd-daemon.py
comment: reproductible : I don't Know
os_release: Fedora release 15 (Lovelock)
reason: decorators.py:293:emit_signal:TypeError: DaemonClosing() takes exactly 1 argument (3 given)
time: Fri Aug 19 13:32:46 2011
:decorators.py:293:emit_signal:TypeError: DaemonClosing() takes exactly 1 argument (3 given)
:Traceback (most recent call last):
: File "/usr/lib/python2.7/site-packages/dbus/service.py", line 748, in _message_cb
: _method_reply_error(connection, message, exception)
: File "/usr/lib/python2.7/site-packages/dbus/service.py", line 285, in _method_reply_error
: contents = ''.join(traceback.format_exception(et, ev, etb))
: File "/usr/lib/python2.7/traceback.py", line 141, in format_exception
: list = list + format_tb(tb, limit)
: File "/usr/lib/python2.7/traceback.py", line 76, in format_tb
: return format_list(extract_tb(tb, limit))
: File "/usr/lib/python2.7/traceback.py", line 101, in extract_tb
: line = linecache.getline(filename, lineno, f.f_globals)
: File "/usr/lib/python2.7/linecache.py", line 14, in getline
: lines = getlines(filename, module_globals)
: File "/usr/lib/python2.7/linecache.py", line 40, in getlines
: return updatecache(filename, module_globals)
: File "/usr/lib/python2.7/linecache.py", line 128, in updatecache
: lines = fp.readlines()
: File "/usr/lib/python2.7/site-packages/dbus/decorators.py", line 293, in emit_signal
: func(self, *args, **keywords)
:TypeError: DaemonClosing() takes exactly 1 argument (3 given)
:Local variables in innermost frame:
:self: <__main__.WicdDaemon at /org/wicd/daemon at 0x8bdbd2c>
:args: (15, <frame object at 0x8c79a3c>)
:func: <function DaemonClosing at 0x8bdd6f4>
Is this still happening on Fedora 16 with the latest wicd update?
response : reproductible with the last version i.e: wicd-common1.7.0-10.fc16.noarch
more info : It seems that the problem is located at the end of the program,
1809 # Enter the main loop
1810 mainloop = gobject.MainLoop()
1813 except KeyboardInterrupt:
the call by itself is correct; but is made out of the mainloop. I read
the d-bus python documentation . The dynamic behaviour of signal isn't described; but this call (out of the mainloop) is for me useless: it's goal is to "D-BUS signaling" to all wicd-daemon's subscribers the end of the daemon. For me when the loop is exited all sockets are at least in the closing state and no signal will be emitted on any D-Bus (system or session bus). The solution for me is
1) "remove" all the code related to "DaemonClosing":
Its place is not in a production repo.It is untested, unfinished and for me buggy. Furthermore,the code by itself LIES: in any case, even if unfortunately ,it succeeds the daemon doesn't exit at all. Hereafter, the method body of the method !!!! :
847 @dbus.service.signal(dbus_interface='org.wicd.daemon', signature='')
848 def DaemonClosing(self):
849 """ Emits a signal indicating the daemon will be closing. """
!!! or rename me stupidDaemonJoke (stupid because ... i am not a Class)
and document it !!!!
2) if for some reason,the strange behaviour "DaemonClosing" must be implemented :
2.1) remove the "offensing" call : line 1815
2.2) triggers the action in the mainloop: that is partiallay done in the code
line 116: (more signals are needed)
116 signal.signal(signal.SIGTERM, self.DaemonClosing)
2.3) add a "sleep" (because the signal is "broadcasted" i.e: this message can't be acknowledge) in the member function class "DaemonClosing"
2.4) gently cleanup all permanent resources before exit
I have no problem with removing the code since it doesn't really do anything right now, but I would prefer that to happen upstream. To work around the issue you're hitting, wouldn't something like this be sufficient:
diff -up wicd-1.7.1/wicd/wicd-daemon.py.orig wicd-1.7.1/wicd/wicd-daemon.py
--- wicd-1.7.1/wicd/wicd-daemon.py.orig 2012-02-02 11:38:26.000000000 -0500
+++ wicd-1.7.1/wicd/wicd-daemon.py 2012-03-22 10:21:38.735140300 -0400
@@ -812,7 +812,7 @@ class WicdDaemon(dbus.service.Object):
- def DaemonClosing(self):
+ def DaemonClosing(self, arg1=None, arg2=None):
""" Emits a signal indicating the daemon will be closing. """
For me the the best patch is to comment the faulty line 1815 .
I'm sure that the the faulty line is "daemon.DaemonClosing()":
to reproduce the bug I replaced the dbus mainloop "i.e mainloop.run()" with a forever loop . Each time I killed the program with 'kill -15 pid' the bug appeared. For me, the redundant call "daemon.DaemonClosing()" has been added because the "normal" reponse to SIGTERM (signal.signal(signal.SIGTERM, self.DaemonClosing)) is never executed.
Mixing signals, threads, subprocess in python requires some care ,but in the daemon code nothing is done to synchronize threads or children processes. In python only the main thread receives the signal. In other words, the behaviour
of the the code on SIGTERM is undefined ...
wicd-1.7.0-12.fc16 has been submitted as an update for Fedora 16.
* should fix your issue,
* was pushed to the Fedora 16 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing wicd-1.7.0-12.fc16'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).
wicd-1.7.0-12.fc16 has been pushed to the Fedora 16 stable repository. If problems still persist, please make note of it in this bug report.