Bug 220357

Summary: Kontact sometimes waits on socket forever when I start it
Product: [Applications] kontact Reporter: Martin Steigerwald <Martin>
Component: generalAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED WORKSFORME    
Severity: normal    
Priority: NOR    
Version: 4.3   
Target Milestone: ---   
Platform: Debian testing   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Martin Steigerwald 2009-12-28 10:15:19 UTC
Version:            (using KDE 4.3.4)
OS:                Linux
Installed from:    Debian testing/unstable Packages

About every second or third time I try to start kontact, it doesn't fully start. It doesn't open its window and a process /usr/bin/kontact is sitting around and waiting for something (see below). When I pkill kontact and try again it usually comes up.

strace reports:

martin@shambhala:~> strace -ff -p 19491
Process 19491 attached with 2 threads - interrupt to quit
[pid 19505] select(7, [6], NULL, NULL, NULL <unfinished ...>
[pid 19491] restart_syscall(<... resuming interrupted call ...>^C <unfinished ...>
Process 19491 detached                                                            
Process 19505 detached                                                            
martin@shambhala:~> strace -fF -p 19491
Process 19491 attached with 2 threads - interrupt to quit
[pid 19505] select(7, [6], NULL, NULL, NULL <unfinished ...>
[pid 19491] restart_syscall(<... resuming interrupted call ...>) = 0
[pid 19491] read(8, 0x8273c38, 4096)    = -1 EAGAIN (Resource temporarily unavailable)
[pid 19491] clock_gettime(CLOCK_MONOTONIC, {30312, 840662437}) = 0                    
[pid 19491] clock_gettime(CLOCK_MONOTONIC, {30312, 840759097}) = 0                    
[pid 19491] read(8, 0x8273c38, 4096)    = -1 EAGAIN (Resource temporarily unavailable)
[pid 19491] clock_gettime(CLOCK_MONOTONIC, {30312, 840956608}) = 0                    
[pid 19491] poll([{fd=3, events=POLLIN}, {fd=9, events=POLLIN}, {fd=8, events=POLLIN}, {fd=5, events=POLLIN}, {fd=19, events=POLLIN}, {fd=22, events=POLLIN}], 6, 9991) = 0 (Timeout)                                                                       
[pid 19491] read(8, 0x8273c38, 4096)    = -1 EAGAIN (Resource temporarily unavailable)                                        
[pid 19491] clock_gettime(CLOCK_MONOTONIC, {30322, 843992696}) = 0                                                            
[pid 19491] clock_gettime(CLOCK_MONOTONIC, {30322, 844088797}) = 0                                                            
[pid 19491] read(8, 0x8273c38, 4096)    = -1 EAGAIN (Resource temporarily unavailable)                                        
[pid 19491] clock_gettime(CLOCK_MONOTONIC, {30322, 844284074}) = 0                                                            
[pid 19491] poll([{fd=3, events=POLLIN}, {fd=9, events=POLLIN}, {fd=8, events=POLLIN}, {fd=5, events=POLLIN}, {fd=19, events=POLLIN}, {fd=22, events=POLLIN}], 6, 9988) = 1 ([{fd=8, revents=POLLIN}])                                                      
[pid 19491] read(8, "a\0v\244s\0\0\0\2\0`\2\1\0\0\0\35\276\316\1\34\276\316\1\350\351\230\t\240j\345\277", 4096) = 32         
[pid 19491] read(8, 0x8273c38, 4096)    = -1 EAGAIN (Resource temporarily unavailable)                                        
[pid 19491] read(8, 0x8273c38, 4096)    = -1 EAGAIN (Resource temporarily unavailable)                                        
[pid 19491] read(8, 0x8273c38, 4096)    = -1 EAGAIN (Resource temporarily unavailable)                                        
[pid 19491] read(8, 0x8273c38, 4096)    = -1 EAGAIN (Resource temporarily unavailable)                                        
[pid 19491] read(8, 0x8273c38, 4096)    = -1 EAGAIN (Resource temporarily unavailable)                                        
[pid 19491] clock_gettime(CLOCK_MONOTONIC, {30326, 302928534}) = 0                                                            
[pid 19491] poll([{fd=3, events=POLLIN}, {fd=9, events=POLLIN}, {fd=8, events=POLLIN}, {fd=5, events=POLLIN}, {fd=19, events=POLLIN}, {fd=22, events=POLLIN}], 6, 6529) = 1 ([{fd=8, revents=POLLIN}])                                                      
[pid 19491] read(8, "\34\377v\244s\0\0\0D\1\0\0!\276\316\1\0j\345\277\n\22\t\10\30k\345\277s\0\0\0", 4096) = 32               
[pid 19491] read(8, 0x8273c38, 4096)    = -1 EAGAIN (Resource temporarily unavailable)                                        
[pid 19491] read(8, 0x8273c38, 4096)    = -1 EAGAIN (Resource temporarily unavailable)                                        
[pid 19491] read(8, 0x8273c38, 4096)    = -1 EAGAIN (Resource temporarily unavailable)                                        
[pid 19491] clock_gettime(CLOCK_MONOTONIC, {30326, 308949692}) = 0                                                            
[pid 19491] poll([{fd=3, events=POLLIN}, {fd=9, events=POLLIN}, {fd=8, events=POLLIN}, {fd=5, events=POLLIN}, {fd=19, events=POLLIN}, {fd=22, events=POLLIN}], 6, 6523) = 1 ([{fd=8, revents=POLLIN}])                                                      
[pid 19491] read(8, "a\0v\244s\0\0\0\2\0`\2\1\0\0\0\224\276\316\1\224\276\316\1\350\351\230\t\240j\345\277"..., 4096) = 64    
[pid 19491] read(8, 0x8273c38, 4096)    = -1 EAGAIN (Resource temporarily unavailable)                                        
[pid 19491] read(8, 0x8273c38, 4096)    = -1 EAGAIN (Resource temporarily unavailable)                                        
[pid 19491] read(8, 0x8273c38, 4096)    = -1 EAGAIN (Resource temporarily unavailable)                                        
[pid 19491] read(8, 0x8273c38, 4096)    = -1 EAGAIN (Resource temporarily unavailable)                                        
[pid 19491] read(8, 0x8273c38, 4096)    = -1 EAGAIN (Resource temporarily unavailable)                                        
[pid 19491] clock_gettime(CLOCK_MONOTONIC, {30326, 421993159}) = 0                                                            
[pid 19491] poll([{fd=3, events=POLLIN}, {fd=9, events=POLLIN}, {fd=8, events=POLLIN}, {fd=5, events=POLLIN}, {fd=19, events=POLLIN}, {fd=22, events=POLLIN}], 6, 6410) = 1 ([{fd=8, revents=POLLIN}])                                                      
[pid 19491] read(8, "a\0v\244s\0\0\0\2\0\200\2;\1\0\0\357\276\316\1\224\276\316\1\350\31H\t\240j\345\277"..., 4096) = 64      
[pid 19491] read(8, 0x8273c38, 4096)    = -1 EAGAIN (Resource temporarily unavailable)                                        
[pid 19491] read(8, 0x8273c38, 4096)    = -1 EAGAIN (Resource temporarily unavailable)                                        
[pid 19491] read(8, 0x8273c38, 4096)    = -1 EAGAIN (Resource temporarily unavailable)                                        
[pid 19491] read(8, 0x8273c38, 4096)    = -1 EAGAIN (Resource temporarily unavailable)                                        
[pid 19491] read(8, 0x8273c38, 4096)    = -1 EAGAIN (Resource temporarily unavailable)                                        
[pid 19491] clock_gettime(CLOCK_MONOTONIC, {30326, 511836176}) = 0                                                            
[pid 19491] poll([{fd=3, events=POLLIN}, {fd=9, events=POLLIN}, {fd=8, events=POLLIN}, {fd=5, events=POLLIN}, {fd=19, events=POLLIN}, {fd=22, events=POLLIN}], 6, 6320) = 1 ([{fd=8, revents=POLLIN}])
[... and so on ...]

Even after 5 or 10 minutes. It appears to be waiting on some socket:

martin@shambhala:/proc/19491> ls -l fd
insgesamt 0                           
lr-x------ 1 martin martin 64 28. Dez 10:03 0 -> pipe:[37670]
l-wx------ 1 martin martin 64 28. Dez 10:03 1 -> /home/martin/.xsession-errors
lr-x------ 1 martin martin 64 28. Dez 10:03 10 -> /var/tmp/kdecache-martin/ksycoca4
lrwx------ 1 martin martin 64 28. Dez 10:03 11 -> socket:[6897]                    
lrwx------ 1 martin martin 64 28. Dez 10:03 14 -> socket:[6906]                    
lrwx------ 1 martin martin 64 28. Dez 10:03 19 -> socket:[37919]                   
l-wx------ 1 martin martin 64 28. Dez 10:03 2 -> /home/martin/.xsession-errors     
lr-x------ 1 martin martin 64 28. Dez 10:03 22 -> inotify                          
lr-x------ 1 martin martin 64 28. Dez 10:03 3 -> pipe:[37691]                      
lr-x------ 1 martin martin 64 28. Dez 10:03 36 -> pipe:[38145]                     
l-wx------ 1 martin martin 64 28. Dez 10:03 37 -> pipe:[38145]                     
l-wx------ 1 martin martin 64 28. Dez 10:03 4 -> pipe:[37691]                      
lrwx------ 1 martin martin 64 28. Dez 10:03 5 -> socket:[37680]                    
lr-x------ 1 martin martin 64 28. Dez 10:03 6 -> pipe:[37692]                      
l-wx------ 1 martin martin 64 28. Dez 10:03 7 -> pipe:[37692]                      
lrwx------ 1 martin martin 64 28. Dez 10:03 8 -> socket:[37693]                    
lrwx------ 1 martin martin 64 28. Dez 10:03 9 -> socket:[37695]

19505 appears to be some thread. 19491 is kontact.

martin@shambhala:/proc/19491> ps aux | grep 19505 | grep -v grep
martin@shambhala:/proc/19491#1> ps aux | grep 19491 | grep -v grep
martin   19491  0.2 11.2 356560 233816 ?       Sl   Dec26   7:08 /usr/bin/kontact

I am sending this now, as this time Kontact crashed after the pkill kontact and starting it again habit of working around that issue. I started Kontact on the konsole cause I wanted to try several cycles to have it hang again, maybe it says something to the console. I will report the second crash via DrKonqi before adding more info to this one.
Comment 1 Martin Steigerwald 2009-12-28 10:53:35 UTC
It appears to me that the crash on exit bug is a different one. I reported it as bug #220361, but it might be a duplicate of bug #204107.

I was not able to reproduce this one after several start, quit, start again cycles. I thought about this a bit and well the bug usually happens when I start kontact again after a snapshot cycle with TuxOnIce.

Due to having some crash bugs with the X.org/radeon I usually stop Kontact before I let TuxOnIce hibernate. And then I start it again after resuming. I will try to remember using Konsole to start kontact next time, maybe it displays something on stdout thats helpful.
Comment 2 Martin Steigerwald 2011-04-28 10:49:00 UTC
I did not see this for a very long time. Resolving as WORKSFORME, cause its not sure whether the cause of this has been fixed.