Bug 128845

Summary: Kopete sometimes blocks during startup
Product: [Unmaintained] kopete Reporter: Henning Rogge <HRogge>
Component: generalAssignee: Kopete Developers <kopete-bugs-null>
Status: RESOLVED NOT A BUG    
Severity: crash CC: bonne, me, mss, olivier.lahaye
Priority: NOR    
Version: 0.12   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Henning Rogge 2006-06-08 18:54:17 UTC
Version:           0.12 (using KDE KDE 3.5.3)
Installed from:    Gentoo Packages
Compiler:          GCC 4.1.1 i686-pc-linux-gnu-gcc (GCC) 4.1.1 (Gentoo 4.1.1)
OS:                Linux

Kopete 0.12 crashs (without any error report) during startup when the Composite Extension of X-Org is active. The tray icon appears for a moment, then it's gone again. I have to kill the Kopete task by hand to get rid of it.

There is no error message when I start Kopete on the console and no error log for the X server.

The crash can be reproduced on the experimental XGL server too.
Comment 1 Andrew Barr 2006-06-08 19:09:18 UTC
I run Kopete 0.12+svn on AIGLX with Composite without any problems. Just in case it is relevant, what is your window manager and/or compositing manager?
Comment 2 Henning Rogge 2006-06-08 19:22:03 UTC
I run a normal KDE 3.5.3, X-Org 7.0 system with a native NVidia driver (I use the standard KDE window manager).

In addition to this I had the same problem with XGL (and Compiz as a window manager).

The problems vanish when I switch off Compiz and remove this section from my xorg.conf:
Section "Extensions"
    Option "Composite" "Enable"
EndSection

---
I'm recompiling Kopete with debug informations enabled at the moment, I hope I will get a few more answers this way.
Comment 3 Henning Rogge 2006-06-08 20:30:36 UTC
Okay, I got some news for you.

The crash seems to happen because of a timing problem during startup. I usually start kopete by a saved session and with the composite manager active it sometimes crash. The only debug messages I got before kopete crashed are:

libkopete: [void Kopete::ContactList::setSelectedItems(QPtrList<Kopete::MetaContact>, QPtrList<Kopete::Group>)] 0 metacontacts, 0 groups selected
kopete: [void KopeteEditGlobalIdentityWidget::setIconSize(int)] Manually changing the iconsize.
Comment 4 Henning Rogge 2006-06-08 21:12:34 UTC
Another update...

I got Kopete 0.12 running with XGL and Compiz... by delaying it's start by 3 seconds.

I still have no clue what cause the crash on startup, but I have a workaround now.
Comment 5 Henning Rogge 2006-06-11 19:48:05 UTC
The bug reappeared yesterday (it seems worse on Compiz), so I did some more testing.

It does most times block kopete (have to use kill -9 to end the thread), but not always.
It does not output any kind of useful error message, even when compiled with the 'debug' option.

But when I removed the Jingle support from the programm it did not crash at all. I will keep an eye on it the next few days.
Comment 6 Olivier Goffart 2006-06-13 11:44:13 UTC
Does it works if you disable auto-away ?

If it's not related to auto-away, i have no idea what's causing this.
Comment 7 ottmarm 2006-07-12 23:14:18 UTC
I have this problem without any AIGLX, XGL or composite extension. When I'm starting Kopete (gentoo kopete-0.12.0-r2 or kopete-0.12.0, but not in a 0.12.0-r1 version) a gray icon lights for a while in systray. Then will gone (or sometimes won't, but it is gray and doesn't make any response). Kopete remains in memory. I'm using autoaway and module for automatic reconnection, hiding on start and after 10 seconds. Used protocols: 2xjabber, ICQ. The strange is, the only change from -r1 to -r2 is a patch changing ICQ identification (and some USE flags was added). But it is possible, that -r1 was compiled with gcc-4.1, and the others with gcc 3.4.6. I will try to remove changes (except that ICQ patch :-)) from that -r2 ebuild and recompile it with the newer gcc version and then... Then I don't know what... :-/
Comment 8 ottmarm 2006-07-13 15:08:09 UTC
Yes! I changed nothing in that new kopete-0.12.0-r2.ebuild, only the compiler from gcc-3.4.6 to 4.1.1. I did emerge again and it works! :-) 
Comment 9 Boris DuĊĦek 2006-07-19 05:46:42 UTC
I have Gentoo Linux 2.6.17, glibc 2.4, KDE 3.5.3, kopete 0.12.1. The same problem appears to me with 0.12.0. I don't have Composite extension enabled.

To solve the problem, I kill kopete, then start it with "strace -f kopete 2> /dev/null" (The reason I know this is that I thought that strace might show where kopete hangs, but under strace "supervision", kopete always starts normally). Then, I quit kopete and start it normally, i.e. without strace, and it works.

If I try strace -p$(pidof kopete) when kopete is frozen, it shows something like "waiting for futex". And what I have seen, frozen kopete (or unfreezing it) has high correlance with the bug when entries from "Most Used Applications" in kicker get deleted once a while. (i.e. after or before unfreezing, I see the entries are deleted again).

This is indeed a really interesting bug. :-)

I have system compiled mostly with -O1 -ggdb, including kdelibs, qt, glibc. Even kernel has debugging info - so if you know any crazy way how to track down where the problem is, please feel free to instruct me.
Comment 10 Lloeki 2006-09-03 14:06:41 UTC
Gentoo Linux 2.6.17, glibc 2.4, KDE 3.5.4, kopete 0.12.2
Just upgraded from gcc 3.4.6 to gcc 4.1.1 and from glibc 2.3 to 2.4. that was the only change.
randomly (50% chance) freeze on startup. kill, restart, might freeze or might not.
when frozen, no cpu hit, so I bet that's some mutex deadlock, not some runaway loop.
jingle support built in. xorg 7.0 without composite. rebuilding or downgrading kopete does not help.

just rebuilt without jingle: no crash at all. conclusion is obvious: either gcc 4.1.1 or glibc 2.4 (or both) are harmful to jingle support. it was not the more stable in the first place (see bug #126036) but now it's a real showstopper.
Comment 11 Malte S. Stretz 2006-10-28 15:27:41 UTC
I tend to encounter the same bug.  It seems to be related to KMail somehow and maybe the KWallet.

I've got both Kopete and KMail automatically started with my session.  In maybe 80% of all logins both don't start up;  Kopete adds its icon to the tray but nothing happens (and the icon isn't refreshed so when the tray was hidden I've just got an empty space) and KMail doesn't start up.

If I go and kill kopete, KMail comes up and KWallet asks me for my password.  If I try it the other way round and kill KMail, Kopete doesn't start though.  The same is true if I start Kopete while KMail is busy/blocked (eg. decrypting a mail).

Judging from the DCOP debug output there might be a deadlock somewhere; the following I got when I killed KMail the last time:
DCOP aborting (delayed) call from 'anonymous-10624' to 'kmail'
DCOP aborting while waiting for answer from 'kopete'
Comment 12 Malte S. Stretz 2006-10-31 12:38:04 UTC
As I just found out does this bug also causes bug 135448 to happen; bug 133795 also sounds very similar.  Seems like Kopete (or the Jingle plugin?) blocks DBus, KWallet or the sound system or something?

As this doesn't seem to be Composite-related anymore I changed the subject accordingly.
Comment 13 Bram Schoenmakers 2006-10-31 14:31:11 UTC
*** Bug 135448 has been marked as a duplicate of this bug. ***
Comment 14 Bram Schoenmakers 2006-10-31 14:32:22 UTC
Since I upgraded to KDE 3.5.5 I haven't seen this problem sofar.
Comment 15 Malte S. Stretz 2006-11-03 08:19:20 UTC
Ok, this is definitely a Jingle bug.  I recompiled Kopete without Jingle support and now it starts fine.

The other bug I encountered is just a side-effect I think.  I'll reopen bug 135448 and use that one as a tracker for the other issue.
Comment 16 Matt Rogers 2006-11-10 06:07:32 UTC
who else has jingle support enabled?
Comment 17 Olivier LAHAYE 2007-02-27 15:47:40 UTC
It seems that I encounter the same problem with kopete 0.12.4 / KDE 3.5.6 on Mandriva Kooker.
I've reported the bug there with a strace  (very hard to catch)
http://qa.mandriva.com/show_bug.cgi?id=28426

It seems to be a race condition as the bug is 100% reproductible on my old 
very slow disk (50MB/minute) and seems gone on my new disk (old and new systems are pure byte copies using xfs_copy (same xfs id), no upgrade between.
Comment 18 bonne 2007-04-24 09:28:42 UTC
I have the problem where Kopete locks Kontact. When I kill Kopete, Kontact starts and asks me for the Kwallet password. I have Kopete 0.12.3 with Jingle compiled in. 
Comment 19 Will Stephenson 2007-08-14 11:56:19 UTC
Bonne: you actually have #135448, it seems.

Since this is related to the unsupported and currently being rewritten support for jingle, i'll close this bug.