On Aug 29 2022, Matthieu Herrb wrote: > On Sat, Aug 27, 2022 at 01:07:30PM +0200, Walter Alejandro Iglesias wrote: > > X crashes when moving cursor from keyboard bindings. I can reproduce > > the bug with cwm, fvwm or fvwm2 (because this window managers have that > > option). According to the logs the cause could be in wsmouse. > > > > **IT'S NOT EASY TO REPRODUCE IT**. Generally, but not necessarily is > > easier right after X started (when wsmouse is still being loaded), and > > stressing it, changing fast the direction. > > > > Hi, > > I also cannot reproduce it, however, I've some idea on what could be > happening. > > Can you try the patch below ? It adds locking with the input thread of > the X server while adding new devices.
Matthieu, I'm very very sorry to say that I'm still able to reproduce it. Again, it doesn't happen every time, I have to insist. If you can think of anything else I can try let me know. I didn't mention the following warning that shows up every time I run startx, I ignore if it's related or even relevant: WARNING: Kernel has no file descriptor comparison support: No such a file or directory > > Index: config/wscons.c > =================================================================== > RCS file: /cvs/OpenBSD/xenocara/xserver/config/wscons.c,v > retrieving revision 1.25 > diff -u -r1.25 wscons.c > --- config/wscons.c 11 Jun 2019 14:51:34 -0000 1.25 > +++ config/wscons.c 29 Aug 2022 18:53:31 -0000 > @@ -113,9 +113,12 @@ > } > close(fd); > > + input_lock(); > input_options = input_option_new(input_options, "_source", > "server/wscons"); > - if (input_options == NULL) > + if (input_options == NULL) { > + input_unlock(); > return; > + } > > LogMessage(X_INFO, "config/wscons: checking input device %s\n", > WSCONS_KBD_DEVICE); > @@ -178,6 +181,7 @@ > } > unwind: > input_option_free_list(&input_options); > + input_unlock(); > } > > static void > @@ -194,9 +198,12 @@ > if (!config_info) > return; > > + input_lock(); > input_options = input_option_new(input_options, "_source", > "server/wscons"); > - if (input_options == NULL) > + if (input_options == NULL) { > + input_unlock(); > return; > + } > > input_options = input_option_new(input_options, "name", strdup(path)); > input_options = input_option_new(input_options, "driver", > strdup(driver)); > @@ -213,6 +220,7 @@ > } > unwind: > input_option_free_list(&input_options); > + input_unlock(); > } > > static void > > -- > Matthieu Herrb