Re: g_idle killer ...



Michael Meeks <michael@helixcode.com> writes:

> Hi there,
> 
> 	The attached patch adds a g_idle handler ( I feel this is
> preferable to a timeout ) that kills the process if it has failed to
> register the correct IID after a few idle loops. This can of course race
> and cause grief; hence there is a function to turn this off before it
> begins, however I feel it is a lot better than what was there.

Using an idle handlers for this seems bizarre. If nothing else
is going on in the client process, then I bet the server will
never successfully register before being killed.

 idle == timeout of zero with a low priority compared to
         other events in the process.

> 	Ok; it also adds a test case which is nice, and here is the
> crunch; run the test program and see you get the nice message and the
> correct exception back, _but_ then oafd goes and chews 99% of your CPU
> which melts to a pile of slag.

Could be that something isn't properly taking a zero length read
to indicate a closed socket.
 
> +        if (!--delay) {
> +                if (need_ior_printout) {
> +                        g_error ("This process has not registered the required OafIID\n"
> +                                 "your source code should register '%s'. If your code is\n"
> +                                 "performing delayed registration and this message is trapped "
> +                                 "in error, see oaf_idle_reg_check_set.",
> +                                 oaf_activation_iid_get ());
> +                }
> +        }

Does this represent a bug in the client? Do you want people to report
a bug against the client to bugs.gnome.org with a backtrace at this
point? Is it worth dumping core? If not, don't use g_error()...

Regards,
                                        Owen




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]