Bug#926554: xbindkeys-config: segfault upon "Get key"

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Bug#926554: xbindkeys-config: segfault upon "Get key"

Adam Borowski-3
Package: xbindkeys-config
Version: 0.1.3-2+b2
Severity: important

Hi!
There's already a separate bug about "Get key" segfaulting when there's no
default config (#268630) -- but for me, it segfaults a bit later when the
config is there.

Without the config, "Get key" segfaults immediately.
After generating it manually, a window appears, but trying to interact with
it results in:


Program received signal SIGSEGV, Segmentation fault.
middle_get_key (data=<optimized out>, parent=<optimized out>) at middle.c:364

(gdb) bt full
#0  middle_get_key (data=<optimized out>, parent=<optimized out>) at middle.c:364
        f = 0x55556f5c80
        buf = "Press combination of keys or/and click under the window.\nYou can use one of the two lines after \"NoCommand\"\nin $HOME/.xbindkeysrc to bind a key.\n\344\347\255=\246\245\264\300\335\377\377\177\000\000\000|#۷\177", '\000' <repeats 12 times>, "\344\347\255=\246\245\264@\336\377\377\177\000\000\000\274\251۷\177\000\000\000\060\211"...
        buf2 = "0\000\000\000\000\000\000\000p\334\377\377\177\000\000\000\060\000\000\000\000\000\000\000P\000\000\000\000\000\000\000\200\333\377\377\177\000\000\000\214\241S\267\177\000\000\000@\000\000\000\000\000\000\000\360\324oUU\000\000\000\000\271qUU\000\000\000\320;pUU\000\000\000Z\000\000\000\000\000\000\000u\000\000\000\000\000\000\000\020\271qU"
        pl1 = 0x1 <error: Cannot access memory at address 0x1>
        pl2 = <optimized out>
        buf3 = {0xb4a5a63dade7e400 <error: Cannot access memory at address 0xb4a5a63dade7e400>, 0x7fffffdba0 "", 0x7fb7abba20 "\307\002@\271\363\003", 0x55556fd508 "c\002",
          0x7fb7abc6a4 "\352w@\271!\a@\371?\300", <incomplete sequence \353>, 0x7fffffdc00 "\220\334\377\377\177",
          0x7fb7abc6a4 "\352w@\271!\a@\371?\300", <incomplete sequence \353>, 0x555571b910 "0", 0x5555703be0 " 1rUU", 0x555571b910 "0", 0x7fb7abb5a8 "\375{\273\251\177",
          0x55556fd4f8 "\002", 0x75 <error: Cannot access memory at address 0x75>, 0x55556fd4f0 "\004", 0x5555703bd0 "\340\265qUU", 0x555571b900 "c\002",
          0x7fffffdda0 "\300\335\377\377\177", 0x7fffffdc90 "", 0x7fb7abccd8 <gdk_region_destroy+40> "\341\003\023\252", 0x55556fd240 "\300\324oUU", 0x55555c6360 "\020@\\UU",
          0x55556fd6d0 "@\322oUU", 0x55555c6360 "\020@\\UU", 0x0, 0x0, 0x0, 0x55555c6480 "\020@\\UU", 0x20 <error: Cannot access memory at address 0x20>, 0x7fb763b490 "\002",
          0x7fffffdcb0 "`\335\377\377\177",
          0x7fb7ac7a84 "\367cC\251\371kD\251\350'Fm\275\377\377\027\300v@\371 \377\377\264\300:@\371\340\376\377\265\351\377\377\027@\033@\371\340O", 0x7fb7b4c000 "",
          0x55555c6360 "\020@\\UU", 0x55556fd6d0 "@\322oUU", 0x55555c6360 "\020@\\UU", 0x0, 0x0, 0x7fb7b4c000 "", 0x55555c6360 "\020@\\UU",
          0x7fffffdd60 "s after \"NoCommand\"\nin $HOME/.xbindkeysrc to bind a key.\n\344\347\255=\246\245\264\300\335\377\377\177",
          0x7fb7ac7d50 "\340\003\025\252\327\323\377\227\367\033@\371\333\377\377\027\341#\001\221\340\003\024\252\365\003\001\252\342S\001\221\341C\001\221\377'",
          0x7fb7b4c000 "", 0x55555c6360 "\020@\\UU", 0x55556fd6d0 "@\322oUU", 0x0, 0x1 <error: Cannot access memory at address 0x1>,
          0xa2 <error: Cannot access memory at address 0xa2>, 0x1b <error: Cannot access memory at address 0x1b>, 0x338 <error: Cannot access memory at address 0x338>,
          0x20 <error: Cannot access memory at address 0x20>}
        len = 145
        i = <optimized out>
        __s1_len = <optimized out>
        __s2_len = <optimized out>
#1  0x0000007fb76299f0 in g_closure_invoke () from /usr/lib/aarch64-linux-gnu/libgobject-2.0.so.0
No symbol table info available.
#2  0x0000007fb763e2c4 in ?? () from /usr/lib/aarch64-linux-gnu/libgobject-2.0.so.0
No symbol table info available.
#3  0x0000007fb764660c in g_signal_emit_valist () from /usr/lib/aarch64-linux-gnu/libgobject-2.0.so.0
No symbol table info available.
#4  0x0000007fb7646b78 in g_signal_emit () from /usr/lib/aarch64-linux-gnu/libgobject-2.0.so.0
No symbol table info available.
#5  0x0000007fb7bde9e0 in ?? () from /usr/lib/aarch64-linux-gnu/libgtk-x11-2.0.so.0
No symbol table info available.
#6  0x0000007fb7c8e63c in ?? () from /usr/lib/aarch64-linux-gnu/libgtk-x11-2.0.so.0
No symbol table info available.
#7  0x0000007fb76299f0 in g_closure_invoke () from /usr/lib/aarch64-linux-gnu/libgobject-2.0.so.0
No symbol table info available.
#8  0x0000007fb763db38 in ?? () from /usr/lib/aarch64-linux-gnu/libgobject-2.0.so.0
No symbol table info available.
#9  0x0000007fb7646030 in g_signal_emit_valist () from /usr/lib/aarch64-linux-gnu/libgobject-2.0.so.0
No symbol table info available.
#10 0x0000007fb7646b78 in g_signal_emit () from /usr/lib/aarch64-linux-gnu/libgobject-2.0.so.0
No symbol table info available.
#11 0x0000007fb7db1ca0 in ?? () from /usr/lib/aarch64-linux-gnu/libgtk-x11-2.0.so.0
No symbol table info available.
--Type <RET> for more, q to quit, c to continue without paging--
#12 0x0000007fb7c8c53c in gtk_propagate_event () from /usr/lib/aarch64-linux-gnu/libgtk-x11-2.0.so.0
No symbol table info available.
#13 0x0000007fb7c8c9a4 in gtk_main_do_event () from /usr/lib/aarch64-linux-gnu/libgtk-x11-2.0.so.0
No symbol table info available.
#14 0x0000007fb7ae559c in ?? () from /usr/lib/aarch64-linux-gnu/libgdk-x11-2.0.so.0
No symbol table info available.
#15 0x0000007fb7534634 in g_main_context_dispatch () from /usr/lib/aarch64-linux-gnu/libglib-2.0.so.0
No symbol table info available.
#16 0x0000007fb75348a8 in ?? () from /usr/lib/aarch64-linux-gnu/libglib-2.0.so.0
No symbol table info available.
#17 0x0000007fb7534c40 in g_main_loop_run () from /usr/lib/aarch64-linux-gnu/libglib-2.0.so.0
No symbol table info available.
#18 0x0000007fb7c8b858 in gtk_main () from /usr/lib/aarch64-linux-gnu/libgtk-x11-2.0.so.0
No symbol table info available.
#19 0x0000005555558ba0 in main (argc=<optimized out>, argv=<optimized out>) at xbindkeys_config.c:107
        window = 0x55555e00d0
        menu = <optimized out>
        middle = 0x555563d020
        vbox = <optimized out>
        hbox = <optimized out>
        accel_group = <optimized out>
        buf = "/home/kilobyte/.xbindkeysrc\000\177\000\000\000\220\355\377\377\177\000\000\000\250\204\375\267\177\000\000\000\207\360\226|\000\000\000\000pm\377\267\177\000\000\000\247K$\267\177\000\000\000\250\356\377\377\177\000\000\000 \203\237\266\177\000\000\000\001\000\000\000\000\000\000\000\020j\377\267\177", '\000' <repeats 11 times>, "(\356\377\377\177\000\000\000\070\356\377\377\177", '\000' <repeats 11 times>, "\224L#\267\177\000\000\000 \203\237\266\177\000\000\000h\355\377\377\177\000\000\000@5$\267\177\000\000\000\302[\362\001\000\000\000\000\320\355\377\377\177\000\000\000\214\205*\267\177\000\000\000\000\001\000\000\000\000\000\000"...
        i = <optimized out>
        show = <optimized out>


I have no access to an x86 box to check if it's something arch-specific.


-- System Information:
Debian Release: buster/sid
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: arm64 (aarch64)

Kernel: Linux 4.4.154-1128-rockchip-ayufan-g61b4b1151f9a (SMP w/6 CPU cores)
Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE=C.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)

Versions of packages xbindkeys-config depends on:
ii  libatk1.0-0          2.30.0-2
ii  libc6                2.28-8
ii  libcairo2            1.16.0-4
ii  libfontconfig1       2.13.1-2
ii  libfreetype6         2.9.1-3
ii  libgdk-pixbuf2.0-0   2.38.1+dfsg-1
ii  libglib2.0-0         2.58.3-1
ii  libgtk2.0-0          2.24.32-3
ii  libpango-1.0-0       1.42.4-6
ii  libpangocairo-1.0-0  1.42.4-6
ii  libpangoft2-1.0-0    1.42.4-6
ii  xbindkeys            1.8.6-1+b1

xbindkeys-config recommends no packages.

xbindkeys-config suggests no packages.

-- no debconf information
Reply | Threaded
Open this post in threaded view
|

Bug#926554: xbindkeys-config: segfault upon "Get key"

Bernhard Übelacker-3
Hello Adam Borowski,
I am just looking through crashes of random packages and tried to
get some more information from that.

The line information from your backtrace and that in 268630
looks quite equal, so it might still be the same cause.
In this bug and in 268630 xbindkeys-config might crash
because xbindkeys gives no or unexpected output to stdout.
And probably just an error message to stderr.

So might your manually created .xbindkeysrc contain an
error that makes "xbindkeys -k" to fail?

In 268630 I have attached a patch that tries to avoid
the crash at least.

And it seems not limited to just arm64.

Kind regards,
Bernhard

Reply | Threaded
Open this post in threaded view
|

Bug#926554: xbindkeys-config: segfault upon "Get key"

Adam Borowski-3
On Sat, Apr 20, 2019 at 01:48:08AM +0200, Bernhard Übelacker wrote:
> The line information from your backtrace and that in 268630
> looks quite equal, so it might still be the same cause.
> In this bug and in 268630 xbindkeys-config might crash
> because xbindkeys gives no or unexpected output to stdout.
> And probably just an error message to stderr.

Possibly -- I still did not manage to get xbindkeys-config to produce
an usable result, but I did not try very hard.

> So might your manually created .xbindkeysrc contain an
> error that makes "xbindkeys -k" to fail?

Alas, I don't know what is valid and what is not -- I tried the GUI
specifically to avoid having to research that.

> In 268630 I have attached a patch that tries to avoid
> the crash at least.

Indeed, it fixes my crash as well.

On the other hand, I wonder how much effort would be appropriate to put
into the package -- it has a pretty dead smell.


Meow!
--
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Did ya know that typing "test -j8" instead of "ctest -j8"
⢿⡄⠘⠷⠚⠋⠀ will make your testsuite pass much faster, and fix bugs?
⠈⠳⣄⠀⠀⠀⠀