Ticket #11 (closed enhancement: wontfix)

Opened 3 years ago

Last modified 3 weeks ago

restarting dbus stop avahi from running

Reported by: misc@mandriva.org Assigned to: somebody
Priority: minor Milestone:
Component: component1 Version:
Keywords: Cc: misc@mandriva.org

Description (Last modified by lennart)

When i restart dbus ( to reload the configuration, or because it was updated ), avahi stop itself :

[root@takara ~]# service avahi-daemon status Avahi daemon is running [root@takara ~]# service messagebus status dbus-daemon (pid 2709 22985) est en cours d'exécution... [root@takara ~]# service messagebus restart Arrêt du bus de message système : [ OK ] Lancement de la journalisation système : [ OK ] [root@takara ~]# service avahi-daemon status Process 2729 died: No such process; removing PID file. (/var/run/avahi-daemon//pid) Avahi daemon is not running

from the log :

Feb 4 16:39:57 takara avahi-daemon[2729]: Disconnnected from D-BUS, terminating... Feb 4 16:39:57 takara messagebus: messagebus -TERM succeeded Feb 4 16:39:57 takara messagebus: Démarrage de messagebus succeeded

Could avahi try to reconnect a few time to dbus and wait a little ( one or two minute ) or maybe continue to answer mdns while waiting for dbus instead of stopping as soon as dbus is restarted ?

Change History

02/04/06 16:53:07 changed by anonymous

mhh, i forget to preview before sumitting, here is the correct line :

[root@takara ~]# service avahi-daemon status
Avahi daemon is running 
[root@takara ~]# service messagebus status
dbus-daemon (pid 2709 22985) est en cours d'exécution... 
[root@takara ~]# service messagebus restart 
Arrêt du bus de message système : [ OK ] 
Lancement de la journalisation système : [ OK ] 
[root@takara ~]# service avahi-daemon status 
Process 2729 died: No such process; removing PID file. (/var/run/avahi-daemon//pid)
Avahi daemon is not running

and

Feb 4 16:39:57 takara avahi-daemon[2729]: Disconnnected from D-BUS, terminating...
Feb 4 16:39:57 takara messagebus: messagebus -TERM succeeded 
Feb 4 16:39:57 takara messagebus: Démarrage de messagebus succeeded 

02/05/06 04:16:06 changed by anonymous

Avahi is largely tied to D-Bus, if the bus goes away then Avahi goes away, unfortunately due to the way D-Bus works its difficult to reconnect to the bus.

In general, Avahi's lifetime should be tied to D-Bus, if it is restarted then Avahi should be restarted, Debian/Ubuntu do this, for example.

Also the opinion of the d-bus maintainers is that the bus should not be restarted, as such they are not willing to goto lengths to support reconnections to the bus etc.

02/06/06 12:47:14 changed by sebest

How does mandriva handle the same problem with hal? (and any other software that use D-BUS)

02/09/06 22:56:53 changed by lennart

  • status changed from new to closed.
  • resolution set to wontfix.
  • description changed.

misc, any update on this? As sebst already pointed out, you have the same problem with HAL, how do you handle that?

02/10/06 10:05:01 changed by misc@mandriva.org

  • cc set to misc@mandriva.org.

hal and dbus are started by the same initscript, so this is not a problem ( and in fact, i now understand why it was like this ).

I will see with dbus maintener to add a mechanism to restart avahi when dbus restart ( usually when the package was upgraded ).

( and sorry, i always forget to put myself in cc in trac, so that is why i didn't answered as fast as i should ).

02/10/06 18:14:23 changed by sebest

Imo, hal and dbus shouldn't share the same init script.

I asked for hal, but there are the same kind of problems for all dbus enabled applications, for example network-manager. the debian solution is Ok

basically, they have a special init.d subfolder (/etc/dbus-1/event.d) that contains link to /etc/init.d scripts eg: sebest@oxyde:/etc/dbus-1/event.d$ ls -la 25avahi-daemon lrwxrwxrwx 1 root root 25 2006-02-09 15:03 25avahi-daemon -> ../../init.d/avahi-daemon

and when dbus starts or restarts , and knows which services depends on him

02/10/06 20:45:11 changed by misc@mandriva.org

Well, I was wrong regarding dbus/hal, they are separated, I must have dreamed.

I proposed to use the debian system ( http://qa.mandriva.com/show_bug.cgi?id=21096 ), but this doesn't solve the problem for regular applications, such as gajim, or bmpx. Kde for example crash when dbus is restarted ( http://qa.mandriva.com/show_bug.cgi?id=20421 ). But this is outside of the scope of this bugtracking system.

02/10/06 21:02:33 changed by lennart

The proper fix for HAL/Avahi and all other system services is probably to introduce an init system that knows of dependencies between the services. Gentoo has that, as far as i know Fedora has too. Doesn't Mandriva have something like that?

02/11/06 00:49:26 changed by misc@mandriva.org

There is the lsb initscript system and pinit ( http://qa.mandriva.com/twiki/bin/view/Main/Pinit ) so yes there is something, even if I do not think it restart all dependents services when something is restarted, mainly because most do not need it ( or maybe because it was not yet implemented ). And again, this is solving the issue only for daemon and software started by a initscript.

02/11/06 01:04:16 changed by lathiat

Interestingly, KDE in ubuntu doesn't crash with dbus restarting (Something thats nice, GNOMEs panel stuff does)

Wonder what features you guys are making use of that we aren't..