Created attachment 141089 [details] trigger program Hello, We are observing an X server crash when at-spi's registryd remaps the keyboard layout to simulate keypresses. I'm attaching here the program to reproduce the issue, and I will attach the .xinitrc I am using to start it, and the Xorg log. Samuel
Created attachment 141090 [details] xinitrc script to run the session Here is the xinitrc script that I am using to run the session in which to run the trigger program. So basically I run startx $PWD/xinitrc which starts Xorg, the dbus bus, the at-spi2 daemons, and runs xterm, and in the xterm, I run the generate_keyboard_event.py script. Interestingly, in my original .xinitrc, I had a setxkbmap call early in the script, to work around https://bugs.freedesktop.org/show_bug.cgi?id=26402 . It happens that this makes the crash not to happen. So possibly this bug is related to 26402.
Created attachment 141091 [details] Xorg log And here is the Xorg log, and here are the actual lines: 0x1b38dd is in xorg_backtrace (../../../../os/backtrace.c:127). 127 for (i = 0; i < size; i++) { 0x1b7599 is in OsSigHandler (../../../../os/osinit.c:138). 135 xorg_backtrace(); 138 if (sip->si_code == SI_USER) { 0x153ddd is in _XkbSetMapChecks (../../../../xkb/xkb.c:2387). 2387 xkb = xkbi->desc; 0x15b37f is in ProcXkbSetMap (../../../../xkb/xkb.c:2656). 2655 rc = _XkbSetMapChecks(client, other, stuff, tmp); 2656 if (rc != Success) 0x5b008 is in Dispatch (../../../../dix/dispatch.c:478). 476 result = XaceHookDispatch(client, client->majorOp); 477 if (result == Success) so it seems like an issue within xkb.
And to explain what at-spi's registryd is doing, it is basically changing one keycode of the keymap temporarily to be able to simulate through XTest any keysym, even if not currently available in the current keyboard map. One can read that in https://gitlab.gnome.org/GNOME/at-spi2-core/blob/master/registryd /deviceeventcontroller-x11.c#L693 which looks for a keycode which will not pose problem https://gitlab.gnome.org/GNOME/at-spi2-core/blob/master/registryd/deviceeventcontroller-x11.c#L211 which checks whether the keysym is available somewhere in the keyboard map. https://gitlab.gnome.org/GNOME/at-spi2-core/blob/master/registryd/deviceeventcontroller-x11.c#L164 which does the actual temporary change.
Created attachment 141093 [details] simpler reproducer Here is a simpler reproducer, just copy/pasted from at-spi's registryd. Now I can just run startx /usr/bin/xterm and run ./remap in the xterm, and get the same crash.
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/xorg/xserver/issues/574.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.