[Wayland-bugs] [Bug 87322] Weston confuses SIGUSR1 signals from Xwayland and VT switch

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon Dec 15 04:10:20 PST 2014


https://bugs.freedesktop.org/show_bug.cgi?id=87322

David Herrmann <dh.herrmann at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dh.herrmann at gmail.com

--- Comment #1 from David Herrmann <dh.herrmann at gmail.com> ---
(In reply to Pekka Paalanen from comment #0)
> Javier complained the other day, that Weston freezes on starting any X11 app
> via Xwayland. I can't recall the details. The Weston log was very
> interesting, though: it showed that as soon as XWM initializes, Weston
> thinks it's leaving the VT.
> 
> Looking at the code, I'm surprised it hasn't blown up for anyone else yet.
> 
> Weston routinely uses SIGUSR1 for VT-switching signalling. Weston-launch
> watches SIGUSR1, that is not a problem. However, when Weston is started
> without weston-launch, Weston itself may be watching for SIGUSR1:
> - src/launcher-util.c (Weston as root, without logind?)
> - src/logind-util.c (non-root with logind support?)
> 
> Those two seem mutually exclusive, but there is a third one:
> - xwayland/launcher.c (for Xwayland server start-up notification)
> 
> I guess what happens in Javier's case, is that when Xwayland server starts,
> it sends SIGUSR1 to Weston, which then runs all SIGUSR1 handlers in some
> arbitary order: VT switch and XWM init. This leads to Weston thinking it's
> no longer current, likely refusing all input, and you have a frozen VT.
> 
> Seems like something should be moved to another signal number.

Simply switch logind-util.c to use SIGRTMIN+1. Patch is appended.

> 
> (And why does logind-util.c call signalfd() manually instead of
> wl_event_loop_add_signal()?)

I guess back in the days I wasn't aware of wl_event_loop_add_signal(). Feel
free to change it.

Thanks
David

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/wayland-bugs/attachments/20141215/8c796995/attachment.html>


More information about the wayland-bugs mailing list