issue with gnome-dictionary and io channels



I'm new to the gnome lists, so I'm not sure I'm sending this to the
right place.  If not, my apologies.

I'm been trying to debug a problem I have with
gnome-dictionary/gdict-applet where it becomes unresponsive and sits
there spinning when its tcp connection dies.

I've seen that applet hang every now and then on a typical internet
connection (routable ip, no firewall), but since running it at work via
an ssh tunnel through our obnoxious firewall, this hanging occurs every
few hours.

What's happening is that the firewall is killing my idle ssh tunnel, so
when the applet tries to contact dict.org it can't.  To see what I'm
talking about, setup an ssh tunnel from your local machine through some
remote machine to dict.org, and point gdict at the tunnel.  Then run
'tcpkill host dict.org' on the remote machine, and attempt a lookup.

Now that the context is out of the way, the specific problem I've found:

In the above situation, the "have data on the socket to read" callback
is fired, but g_io_channel_read_chars() reads 0 bytes, and returns
without an error.  The flag triggering the callback is either not reset
by the read, or is triggered again for some unknown-to-me reason,
resulting in the callback firing and failing to read in an infinite loop.

Does anyone have any insight into the internals of this?  I've tried
playing with the underlying unix file descriptor, opening it with
O_ASYNC and watching for the SIGIO in main(), but I think its being
disabled by glib.  I can manually send a SIGIO to the process, and that
is detected fine.

I'm not sure where to go from here.

Thanks.

-Aaron




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