Bug 331595 - ~/.cache/upstart/dbus.log filled with 60 MiB of KConfigIni errors on opening chat window
Summary: ~/.cache/upstart/dbus.log filled with 60 MiB of KConfigIni errors on opening ...
Status: RESOLVED UNMAINTAINED
Alias: None
Product: telepathy
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 0.6.3
Platform: Ubuntu Linux
: NOR normal
Target Milestone: Future
Assignee: Telepathy Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-28 03:41 UTC by Chemtox
Modified: 2015-07-31 16:31 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
ktp-text-ui churning my CPU while spewing errors to init (57.85 KB, image/png)
2014-02-28 15:31 UTC, Chemtox
Details
Environment variables (Debian unstable) (2.98 KB, application/octet-stream)
2014-04-17 07:45 UTC, Alessio Carenini
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chemtox 2014-02-28 03:41:35 UTC
I noticed Telepathy was quite slow to open the chat window for over a month, but only today I found the cause, when trying to figure out why my hard drive was full.

Turns out Telepathy is filling ~/.cache/upstart/dbus.log with errors, apparently trying to read /initrd.img as a config file, like this:

Activating service name='org.freedesktop.Telepathy.Client.KTp.TextUi'
QDBusConnection: session D-Bus connection created before QCoreApplication. Application may misbehave.
"KConfigIni: In file /boot/initrd.img-3.11.0-15-generic, line 1: " Invalid entry (missing ']') 
[error repeated once for every byte in initrd...]
Successfully activated service 'org.freedesktop.Telepathy.Client.KTp.TLSHandler'

This is happening to me in a vanilla Ubuntu 13.10.  Last log file is over 1 GiB, with 10461888 KConfigIni errors.  Fun!

I can see the error on all the dbus.log.* at ~/.cache/upstart, going back to January

Tried "sudo touch /a" to see if Telepathy would try to read an empty file instead, but didn't work.

Reproducible: Always

Steps to Reproduce:
1. Make sure the chat window is closed.
2. Open chat window by double clicking a contact or an incoming message notification.

Actual Results:  
I have to wait 15 seconds while Telepathy "processes" initrd and dumps some 60 MiB of errors.

Expected Results:  
Should not try to read random binary files as configuration.

Marking critical as filling the hard drive can cause data loss.
Comment 1 David Edmundson 2014-02-28 06:19:35 UTC
I struggle to believe this is us. 

~/.cache/upstart/dbus.log is going to contain errors from all apps surely? 

Could you run:
strace /usr/share/kde4/lib/kde4/libexec/ktp-text-ui  |& grep  open
and attach the output. It will show all files that get opened when our application is launched normally.
Comment 2 Martin Klapetek 2014-02-28 10:09:41 UTC
Thanks for the report, quite interesting.

But as David says; I'm on Kubuntu 13.10 and my dbus.log is only 28K with no KConfig errors.

Also, you state you're on Ubuntu, is that really Ubuntu and not Kubuntu?
Comment 3 Chemtox 2014-02-28 15:29:34 UTC
Hey guys, thanks for the prompt response.

> ~/.cache/upstart/dbus.log is going to contain errors from all apps surely? 

Indeed it does.  It only grows by 60 MiB when I open the chat window though, and I can see ktp-text-ui and init eating my CPU in the ~15 secs. it takes to open, presumably because the former is sending errors to the latter (screenshot attached).

> Also, you state you're on Ubuntu, is that really Ubuntu and not Kubuntu?
You're right, I went straight for Kubuntu in my last reinstall.  But aren't they about the same anymore? :)

I tried the suggested 'trace -e open -o strace_ktp_text_ui.txt /usr/lib/kde4/libexec/ktp-text-ui', but with no luck: when I open the chat window it opens normally, without triggering the glitch!  But if I close and reopen it immediately without stracing it again, the glitch happens every time.  Is there a way to open it straight from the command line?

I did see a suspicious <<ktp-text-ui(3707)/Telepathy-Qt tp-qt:0.9.3: Error parsing config file for connection manager "haze" - introspecting  
Activating service name='org.freedesktop.Telepathy.ConnectionManager.haze'>> error (suspicious because of this https://bugs.kde.org/show_bug.cgi?id=216627), but seems it's caused by a missing haze.manager file.

I wiped my accounts.cfg and added just a Gmail account, with no improvement (apart from eliminating the haze config error).  Also tried walking out of the room and back inside; same thing.  Will try going a bit further once my running shoes are dry. ;)  Any other suggestions?
Comment 4 Chemtox 2014-02-28 15:31:05 UTC
Created attachment 85360 [details]
ktp-text-ui churning my CPU while spewing errors to init
Comment 5 Martin Klapetek 2014-03-02 22:00:11 UTC
> You're right, I went straight for Kubuntu in my last reinstall.  But aren't they about the same anymore? :)

Well with Ubuntu you first install different desktop etc and only then put KDE on top of it while Kubuntu comes fine-tuned with KDE. Not really sure how big the difference is though :)

> Is there a way to open it straight from the command line?

Yup, just run /usr/lib/kde4/libexec/ktp-text-ui directly, you might want to add --debug --persist though, for copy-paste purposes: /usr/lib/kde4/libexec/ktp-text-ui --persist --debug

> I did see a suspicious <<ktp-text-ui(3707)/Telepathy-Qt tp-qt:0.9.3: Error parsing config file for connection manager "haze" - introspecting  

Nah, you can ignore that one.

> Any other suggestions?

Can you run "env" in konsole and paste the output (remove any private data of course). You might want to file a bug with Kubuntu on this one, I think it might be misconfiguration of some sort.
Comment 6 Alessio Carenini 2014-04-17 07:45:14 UTC
Same for me on Debian unstable. Checking the log files both KTp.TLSHandler and BlueDevil.Service are trying to read wrong files as config file ((/boot/vmlinuz-3.13-1-amd64 in my case).
Comment 7 Alessio Carenini 2014-04-17 07:45:57 UTC
Created attachment 86134 [details]
Environment variables (Debian unstable)
Comment 8 Chemtox 2014-04-17 23:39:29 UTC
(In reply to comment #5)

> > Is there a way to open it straight from the command line?
> 
> Yup, just run /usr/lib/kde4/libexec/ktp-text-ui directly, you might want to
> add --debug --persist though, for copy-paste purposes:
> /usr/lib/kde4/libexec/ktp-text-ui --persist --debug

ktp-text-ui doesn't actually opens the chat window in my system, I still have to double click a name in the contact window.  But when I run it, the next time I open the chat window it opens normally, without triggering the glitch, as I mentioned in my previous post.

I couldn't replicate this with a new system account (no dbus.log was ever created for it after using it several times), so I just changed to another IM client and moved on. :-0
Comment 9 Martin Klapetek 2015-07-31 16:31:44 UTC
I'll close this for now as everything has been ported to qt5 (including KConfig).

Please verify that it still happens with 15.04 or better with 15.08 and reopen.