evolution-exchange hungs
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
evolution-exchange (Ubuntu) |
New
|
Medium
|
Unassigned |
Bug Description
Description: Ubuntu 9.04
Release: 9.04
evolution-exchange: 2.26.0-0ubuntu3
This is probably not a bug on evolution-exchange, maybe root cause is insanity of glib itself.
Strace for evolution-exchange shows this:
poll([{fd=4, events=POLLIN}, {fd=3, events=POLLIN}, {fd=8, events=
read(3, 0x8725c60, 4096) = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=4, events=POLLIN}, {fd=3, events=POLLIN}, {fd=8, events=
read(3, 0x8725c60, 4096) = -1 EAGAIN (Resource temporarily unavailable)
lsof for evolution-exchange is here:
evolution 31918 ibrezina 0u CHR 1,3 2977 /dev/null
evolution 31918 ibrezina 1u CHR 1,3 2977 /dev/null
evolution 31918 ibrezina 2u CHR 1,3 2977 /dev/null
evolution 31918 ibrezina 3u unix 0xf2295a80 2442614 socket
evolution 31918 ibrezina 4r FIFO 0,6 2442616 pipe
evolution 31918 ibrezina 5w FIFO 0,6 2442616 pipe
evolution 31918 ibrezina 6r FIFO 0,6 2442617 pipe
evolution 31918 ibrezina 7w FIFO 0,6 2442617 pipe
evolution 31918 ibrezina 8r FIFO 0,6 2442618 pipe
evolution 31918 ibrezina 9w FIFO 0,6 2442618 pipe
evolution 31918 ibrezina 10u unix 0xf2295e00 2442619 socket
evolution 31918 ibrezina 11u unix 0xf2154700 2442621 socket
evolution 31918 ibrezina 12u unix 0xf22b8380 2442623 socket
evolution 31918 ibrezina 13u unix 0xf22b81c0 2442626 socket
evolution 31918 ibrezina 14u unix 0xf5fb4540 2442628 /tmp/orbit-
evolution 31918 ibrezina 15u unix 0xf228d000 2442631 /tmp/orbit-
evolution 31918 ibrezina 16u unix 0xf2294e00 2442635 /tmp/orbit-
evolution 31918 ibrezina 17u unix 0xf228d8c0 2442632 socket
evolution 31918 ibrezina 18r FIFO 0,6 2442636 pipe
evolution 31918 ibrezina 19w FIFO 0,6 2442636 pipe
evolution 31918 ibrezina 20r FIFO 0,6 2442637 pipe
evolution 31918 ibrezina 21w FIFO 0,6 2442637 pipe
evolution 31918 ibrezina 22u IPv4 2444693 UDP *:31919
evolution 31918 ibrezina 23u unix 0xf2294380 2442642 /tmp/.exchange-
evolution 31918 ibrezina 25u unix 0xf21391c0 2442666 /tmp/.exchange-
evolution 31918 ibrezina 47u sock 0,4 2444620 can't identify protocol
As you see here, there is no socket no 24, but even of there is no socket no. 24 evolution process tries continuesly
loop through pool and read. I wander why is it trying to read from socket no. 3 if the pool syscall returned an error.
Here is stacktrace too:
(gdb) bt
#0 0xb7f1a430 in __kernel_vsyscall ()
#1 0xb6e54ae7 in poll () from /lib/tls/
#2 0xb6f2874b in IA__g_poll (fds=0x87db858, nfds=7, timeout=-1) at /build/
#3 0xb6f1af82 in g_main_
#4 0xb6f1b5ba in IA__g_main_loop_run (loop=0x878ada8) at /build/
#5 0xb7168cc3 in bonobo_main () from /usr/lib/
#6 0x0805bb9b in main (argc=3, argv=Cannot access memory at address 0xb
) at main.c:278
I just went through glib2 sources and now I am quite sure, that this is a bug in glib2 not in evolution.
The man page for poll says: "On success, a positive number is returned; this is the number of structures which have non-zero revents fields (in other words, those descriptors with events or errors reported)". So if the peer closes a TCP connection while the thread is waiting for poll, then the poll call "succeeds" - it returns positive number 1. The errno is set on affected fd - POLLNVAL or other flag is set.
Unfortunately there is no code in glib2(gmain.c gpoll.c) that handles such a situation. I guess that the function g_main_ context_ check should if there is really something to read from the socket and possibly remove failed/closed TCP connection from the fd list.