dbus_connection_read_write_dispatch sometimes causing 100% cpu usage
hp at pobox.com
Fri Sep 10 13:32:26 PDT 2010
On Fri, Sep 10, 2010 at 4:04 PM, Burton Samograd <burton at userful.com> wrote:
> Not sure how that's happening, but it might be due to a setjmp/longjmp
> being called from an X IO error handler (which I'm not sure is being
> called asynchronously or not...the X docs aren't clear on that).
Ugh, I don't think longjmping out of an X IO error handler is a
remotely good idea ... I'd certainly treat it as a suspicious possible
cause of the problem.
(There are newer versions of libX11 that will let you handle the IO
error without exiting, I think, if you have an option to use those. If
not, you might consider an LD_PRELOAD hack instead of a longjmp hack.)
If you are doing X stuff inside a dbus dispatch, it could certainly
cause the problem. If you must longjmp, try to fix it not to jump over
any dbus stack frames - setjmp() just before the X calls.
More information about the dbus