awesome

Welcome to awesome bug tracking system.
Tasklist

FS#990 - Bitcoin-qt crashes Awesome

Attached to Project: awesome
Opened by eurekafag (eurekafag) - Saturday, 21 April 2012, 18:23 GMT
Last edited by Uli Schlachter (psychon) - Saturday, 05 May 2012, 08:08 GMT
Task Type Bug Report
Category Core
Status Closed
Assigned To No-one
Operating System Linux
Severity Medium
Priority Normal
Reported Version git/master
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Awesome crashes when I start bitcoin-qt v0.6.0.6 app (http://bitcoin.org):

E: awesome: signal_fatal:259: dumping backtrace
awesome(backtrace_get+0x41) [0x424561]
awesome() [0x40dfdc]
/lib/x86_64-linux-gnu/libc.so.6() [0x31940324f0]
/usr/lib/libstartup-notification-1.so.0() [0x30c6205097]
/usr/lib/libstartup-notification-1.so.0() [0x30c620625c]
/usr/lib/libstartup-notification-1.so.0(sn_list_foreach+0x2c) [0x30c6204c3c]
/usr/lib/libstartup-notification-1.so.0(sn_internal_xmessage_process_client_message+0x1c8) [0x30c6206868]
/usr/lib/libstartup-notification-1.so.0(sn_xcb_display_process_event+0x49) [0x30c6203cf9]
awesome(event_handle+0x747) [0x411d27]
awesome() [0x40dcf4]
/usr/lib/libev.so.4(ev_invoke_pending+0x8f) [0x7f534474366f]
/usr/lib/libev.so.4(ev_run+0x835) [0x7f53447466f5]
awesome(main+0xa79) [0x40da49]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xfd) [0x319401eead]
awesome() [0x40dbe9]

It doesn't crash every time but usually after 2-3 restarts of bitcoin client it does. My rc.lua: http://pastebin.com/vm5tzfuR I'm using Debian Wheezy amd64. I tried both repository version 3.4.11 and latest git without any difference.
This task depends upon

Closed by  Uli Schlachter (psychon)
Saturday, 05 May 2012, 08:08 GMT
Reason for closing:  Not a bug
Additional comments about closing:  Hm, we don't have a "Not our bug" reason for closing tasks. Anyway, bug seems to be elsewhere.
Comment by Uli Schlachter (psychon) - Saturday, 21 April 2012, 19:11 GMT
Can you get debug symbols for awesome and libstartup-notification (nope, looks like there is no debian package for that)? Could you run awesome under gdb and get me a "bt full"? Or perhaps run awesome under valgrind?
Comment by Uli Schlachter (psychon) - Saturday, 21 April 2012, 19:29 GMT
Oh and I'd like to see the result of "p *event" in frame 8 ("frame 8" in gdb, if I count right, frame 8 should be event_handle()) and the result of running xlsclients to see which event awesome is handling while it dies.
Comment by eurekafag (eurekafag) - Wednesday, 25 April 2012, 08:15 GMT
Oh, sorry for a delay, I expected the bugtracker send me an email on updates but it was set to jabber which probably doesn't work. Anyway, I'll do what you ask today. For now some update, I don't experience crashes on another Debian installation (32 bit though) on Intel video. I do all the tests on a separate X instance to keep things clean and to keep my other apps running so there should be two clients: xfce4-terminal and bitcoin-qt. Though crash occures even without xfce4-terminal.
Comment by eurekafag (eurekafag) - Wednesday, 25 April 2012, 19:59 GMT
Well, I need a little help figuring it out. I'm python guy so I have close to zero experience with C/C++ on GNU/Linux. What exactly should I do to build Awesome with debug symbols? I'd like to install it to the separate directory as well as libstartup-notification. I hope export CMAKE_PREFIX_PATH=/opt/awesome should do it but I doubt debug is enabled by default. Also no gdb knowledge either so please tell me step by step what commands to enter in gdb.
Comment by Uli Schlachter (psychon) - Wednesday, 25 April 2012, 20:18 GMT
Meh, I can't find any bitcoin-qt packages for debian. Will try to try on my archlinux box, but that might take a while. Let's hope that it crashes here, too.

For compiling awesome with debug symbols: http://awesome.naquadah.org/wiki/Debugging
No clue for libstartup-notification.
No clue if the export works. The wiki seems to suggest make CMAKE_ARGS="-DCMAKE_PREFIX_PATH=/opt/awesome", but I'm not sure on that one.
Comment by eurekafag (eurekafag) - Thursday, 26 April 2012, 07:01 GMT
Bitcoin-qt is included in the official package of Bitcoin (tgz, universal 32 and 64-bit binaries without packaging): http://bitcoin.org/ I tried compiling bitcoin from the git source and it crashed Awesome the same way so there's no difference. I'll experiment with a clean VM and Debian netinst amd64 to make sure none of my other programs affects this.
Comment by Uli Schlachter (psychon) - Thursday, 26 April 2012, 07:03 GMT
bitcoin-qt (6.0.6-beta) and startup-notification (0.12-2) from arch, awesome is v3.4-592-gf3f9834 (master branch). Started bitcoin-qt a couple of times and nothing crashed yet.

Could you try running bitcoin-qt under a clean profile? In other words, add a new user and start it from there. This is basically what I did and no crahes here.
Comment by eurekafag (eurekafag) - Thursday, 26 April 2012, 07:08 GMT
Did you use my rc.lua? It didn't crash for me, too, when I used the default rc.lua but with my custom one it did. Ok, I'll try with the empty profile. Also, I have libstartup-notification0 of version 0.12-1.
Comment by Arvydas Sidorenko (Asido) - Thursday, 26 April 2012, 09:50 GMT
I tried it on Gentoo with yesterday built Awesome from git. The distro is running on [testing] repo. No crashes with my own nor your provided rc.lua
Comment by eurekafag (eurekafag) - Friday, 27 April 2012, 19:31 GMT
You're right, no crash when running on a newly created user. But our culprit seems to be found, it's Qt. Here's my ~/.config/Trolltech.conf : http://pastebin.com/sfVZ6ide After copying it to that test user awesome started crashing after launching bitcoin-qt -testnet -server
I'm using those flags to speedup the launch process because testnet is much smaller and loads faster than the main network.
Comment by eurekafag (eurekafag) - Monday, 30 April 2012, 08:45 GMT
Since I'm using GTK+ theme for Qt here are two configs of GTK: ~/.gtkrc-2.0 http://pastebin.com/i70V2ZrW and ~/.gtkrc.mine http://pastebin.com/6kNcfQVf
Comment by eurekafag (eurekafag) - Monday, 30 April 2012, 09:04 GMT
Did some tests, the problem is definitely GTK+ style for Qt. Other styles like Motif, CDE, Cleanlooks etc. doesn't lead to crash. Choosing GTK+ in qtconfig does. It happens regardless of the actual GTK theme, I choose Debian, Nodoka Silver, Glossy and Clearlooks, Awesome crashed anyway.
Comment by Arvydas Sidorenko (Asido) - Monday, 30 April 2012, 10:06 GMT
FYI, in my test on gentoo i was using qtcurve set to GTK+.
Comment by eurekafag (eurekafag) - Monday, 30 April 2012, 12:42 GMT
I set up a VM with Debian Wheezy amd64 and I can't reproduce this problem myself. On my main system it still crashes. Maybe it's a configuration issue but I have no idea which configs may affect this. I managed to compile libstartup-notification and awesome with debug symbols, here is the complete backtrace: http://pastebin.com/5bqMzu7C I see some <optimized out> values but I did exactly as said in http://awesome.naquadah.org/wiki/Debugging
Comment by eurekafag (eurekafag) - Monday, 30 April 2012, 12:47 GMT
Oh, and that frame.

(gdb) frame 8
#8 0x000000000040fa38 in a_xcb_check_cb (loop=<optimized out>, w=<optimized out>,
revents=<optimized out>) at /home/eurekafag/svn-soft/awesome/awesome.c:196
196 event_handle(event);
(gdb) p *event
$2 = {response_type = 161 '\241', pad0 = 8 '\b', sequence = 2148, pad = {8388620, 336, 973093437,
3816777, 4130262728, 32767, 0}, full_sequence = 2148}
Comment by Uli Schlachter (psychon) - Monday, 30 April 2012, 12:59 GMT
Could attach the output of xlsatoms for the same X server that you generate that backtrace with?

If you already closed that server (which I kind of expect...), could you get a new backtrace together with the corresponding xlsatoms output?
Also, that "p *event" is a good idea. But since I'm lazy, could you also provide "p *(xcb_client_message_event_t*)event"?
Comment by eurekafag (eurekafag) - Monday, 30 April 2012, 13:02 GMT
Not only I didn't close that X server I even keep gdb with crashed awesome running. Here is the xlsatoms output: http://pastebin.com/i0FTAAh5
And that command:

(gdb) p *(xcb_client_message_event_t*)event
$3 = {response_type = 161 '\241', format = 8 '\b', sequence = 2148, window = 8388620, type = 336,
data = {data8 = "=:\000:I=:\000\310\316.\366\377\177\000\000\000\000\000", data16 = {14909, 14848,
15689, 58, 52936, 63022, 32767, 0, 0, 0}, data32 = {973093437, 3816777, 4130262728, 32767, 0}}}
Comment by eurekafag (eurekafag) - Monday, 30 April 2012, 13:07 GMT
Aww, wrong xserver, forgot to export DISPLAY=:1
Here's the right atoms output: http://pastebin.com/EY5y1i0C
Comment by Uli Schlachter (psychon) - Monday, 30 April 2012, 13:13 GMT
Thanks, you had me questioning my sanity for a moment there. :-P (THROTTLE sounded weird, _NET_STARTUP_INFO_BEGIN makes way more sense)

So for whatever reason your bitcoin-qt is sending a badly malformed message ( bug 1 ) which libstartup-notification mishandles ( bug 2 , don't follow the NULL pointer, for only horror awaits you at its end!).

I will report  bug 2  upstream, no clue who is responsible for  bug 1  (although I'd be surprised if your qt theme sends startup notifications).
Which exact qt version do you use?
Comment by eurekafag (eurekafag) - Monday, 30 April 2012, 13:19 GMT
According to dpkg it's 4.7.4-3. Also, I'm using uim but I don't know if it can interfere with startup.
Comment by eurekafag (eurekafag) - Monday, 30 April 2012, 13:42 GMT
Hmm, that's uim. Only if uim is configured, crash occures. If uim is just set up by default everything is fine. I'll try to find the exact setting which triggers the crash.
Comment by eurekafag (eurekafag) - Monday, 30 April 2012, 14:01 GMT
Ok, seems like solved. uim-pref-gtk — Toolbar — Enable menu-based input method switcher [uncheck]. While unchecked no crash occured, did about 15-20 successful launches. While checked after 3-5 starts it crashes. Thanks for your time and efforts!
Comment by Uli Schlachter (psychon) - Monday, 30 April 2012, 16:52 GMT
Reported for libstartup-notification: https://bugs.freedesktop.org/show_bug.cgi?id=49305

Now I just need a good idea how to figure out where that evil ClientMessage is coming from. Qt's source says "it's not qt" (it only ever sends a "remove" message), uim's source code says "it's not uim" (no _NET_STARTUP_NOTIFICATION_BEGIN).
Comment by Julien Danjou (jd) - Wednesday, 02 May 2012, 15:19 GMT
So likely a memory corruption somewhere in awesome. Try to rerun this with valgrind?
Comment by eurekafag (eurekafag) - Wednesday, 02 May 2012, 17:03 GMT
It seems to be unrelated to awesome since the problem is somewhere in between libstartup-notification and uim which is known to be buggy. So I think this bug can be closed.

Loading...