Bug 5809 - openbox-3.5.0 crashes on resize of a window
Status: RESOLVED FIXED
Alias: None
Product: Openbox
Classification: Unclassified
Component: general
Version: 3.5.0
Hardware: PC Linux
: P3 normal
Assignee: Dana Jansens
QA Contact:
URL:
Depends on:
Blocks:
 
Reported: 2012-11-27 15:50 EST by overgrunk
Modified: 2012-11-28 19:54:45 EST
0 users

See Also:


Attachments
bandaid patch (557 bytes, patch)
2012-11-27 15:51 EST, overgrunk

Description overgrunk 2012-11-27 15:50:47 EST
I was messing around with evilvte-0.5.1 (see below for source tarball link) and resizing its window several times over a few seconds when openbox died on SIGSEGV.

(gdb) bt
#0  0xb777f424 in __kernel_vsyscall ()
#1  0xb71b62cf in __GI_raise (sig=6)
    at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#2  0xb71b7b65 in __GI_abort () at abort.c:91
#3  0xb77288c2 in sighandler (sig=11) at obt/signal.c:281
#4  <signal handler called>
#5  client_configure (self=0x0, x=168, y=148, w=770, h=477, user=1, final=1,
    force_reply=0) at openbox/client.c:3057
#6  0x0807fe14 in moveresize_end (cancel=1) at openbox/moveresize.c:333
#7  0x08070980 in event_handle_client (e=0xbfa60a3c, client=0x813c378)
    at openbox/event.c:1491
#8  event_process (ec=0xbfa60ba0, data=0x0) at openbox/event.c:625
#9  0xb77297cc in event_read (source=0x813b710, callback=0, data=0x0)
    at obt/xqueue.c:338
#10 0xb74c2566 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#11 0xb74c2905 in ?? () from /usr/lib/libglib-2.0.so.0
#12 0xb74c2d4b in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
#13 0x080565dc in main (argc=1, argv=0xbfa60e24) at openbox/openbox.c:378
(gdb) up 5
#5  client_configure (self=0x0, x=168, y=148, w=770, h=477, user=1, final=1,
    force_reply=0) at openbox/client.c:3057
3057        guint fdecor = self->frame->decorations;

I made a bandaid patch for moveresize_end to check whether moveresize_client is NULL before calling client_configure with it, but I don't think that fixes the real problem. event_handle_client is beyond my ken, so I can't fix this entirely on my own.

To reproduce (reminder: this will bring down X):
Get http://www.calno.com/evilvte/evilvte-0.5.1.tar.xz (it's only 59k)
tar xJf evilvte-0.5.1.tar.xz
cd evilvte-0.5.1
./configure --prefix=/usr --with-gtk=3.0
make
src/evilvte

and then resize the window a lot, as fast as you can. You might need to use the gtk resize handle only, or release the handle over another window or something.

I'm sorry I don't know how to make a smaller test case. Let me know if there's any way I can help debug this.
Comment 1 overgrunk 2012-11-27 15:51:44 EST
Created attachment 3299 [details]
bandaid patch
Comment 2 overgrunk 2012-11-27 19:52:05 EST
I'm unable to reproduce this with the git master branch. Looks like the solution is to use a newer version.
Comment 3 overgrunk 2012-11-28 19:54:45 EST
I'll go ahead and close this if I can; my distro was using an older snapshot, and we're switching to a version where I can't reproduce this. (I just looked at the latest release tarball; I didn't think to try the git master at first)

For the curious, the downstream bug is https://bugs.gentoo.org/show_bug.cgi?id=444882