Tracking whether a connection is alive

Rob Taylor robtaylor at fastmail.fm
Mon Jul 12 08:19:28 PDT 2004


Maybe a good solution is to provide a manner where you can display to the user when something has hung, and ask if they want to attempt to restart the service, or some manner where the user can query the state of affairs. That way you avoid the problem of heuristics hiding bugs, and can still provide to the user some useful infomation about problems.

Rob Taylor

On Mon, 12 Jul 2004 16:21:56 +0200
Joerg Barfurth <jub at sun.com> wrote:

> Hi,
> 
> Owen Fraser-Green schrieb:
> 
> >>>What I'd suggest is that while a peer has a device locked HAL sends Ping
> >>>messages to that service every few seconds until it's unlocked. One
> >>>downside is that by requiring this I guess you make it harder to write
> >>>clients because if the task you're doing isn't easily interruptable (is CD
> >>>writing? I guess it must be ....) you need threading and such to respond
> >>>to pings.
> >>
> 
> >>OK, any reasonable CD writer application probably has a thread to update
> >>the UI anyway, so this seems like an acceptable thing to do.
> > 
> 
> > But this would only help to prove that the thread handling UI is alive
> > and well but nothing much about the thread doing the actual job which
> > owns the lock. What if that thread gets into an infinite loop or the
> > library it calls locks up? If you then decide to make monitoring thread
> > intelligent enough to detect these situations then it might as well have
> > have just told HAL when the thread went AWOL instead of HAL polling it
> > all the time.
> > 
> 
> This suggests that it might be better to return to the other solution
> that was mentioned in this thread: Instead of HAL pinging all lock
> holders the lock holders have to renew their locks in regular intervals.
> This would properly be sent done the thread doing the actual work.
> 
> > I don't think anything can really detect locking up better than the
> > user...
> > 
> 
> But many users don't have a clue what to do when they find something
> hanging. And of of course there are many things going on that the user
> doesn't see directly - so has no way of recognizing as hanging.
> 
> Ciao, Jörg
> 
> 
> 
> 
> 
> 
> -- 
> dbus mailing list
> dbus at freedesktop.org
> http://freedesktop.org/mailman/listinfo/dbus



More information about the dbus mailing list