[PATCH xserver] xwayland: Only force monotonic clock once

Jonas Ådahl jadahl at gmail.com
Thu Jul 14 00:54:06 UTC 2016


On Fri, Jul 08, 2016 at 03:17:05PM -0400, Adam Jackson wrote:
> Otherwise on regeneration we get:
> 
> (EE) BUG: triggered 'if (clockid)'
> (EE) BUG: utils.c:440 in ForceClockId()
> (EE)
> (EE) Backtrace:
> (EE) 0: ./hw/xwayland/Xwayland (ForceClockId+0x5c) [0x47713c]
> (EE) 1: ./hw/xwayland/Xwayland (OsInit+0x25) [0x4763d5]
> (EE) 2: ./hw/xwayland/Xwayland (dix_main+0x11c) [0x43e60c]
> (EE) 3: /lib64/libc.so.6 (__libc_start_main+0xf1) [0x7f627b2f9731]
> (EE) 4: ./hw/xwayland/Xwayland (_start+0x29) [0x4238e9]
> (EE) 5: ? (?+0x29) [0x29]
> 
> Signed-off-by: Adam Jackson <ajax at redhat.com>

Maybe changing the BUG_RETURN() statement to

    BUG_RETURN(clockid && clockid != forced_clockid);

in ForceClockId() might be a better idea?
That way we'd still trigger BUG_RETURN on inproper use, instead of
ignoring it.

Anyway, this patch seems to fix it as well, so consider it

Reviewed-by: Jonas Ådahl <jadahl at gmail.com>


Jonas

> ---
>  hw/xwayland/xwayland.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/hw/xwayland/xwayland.c b/hw/xwayland/xwayland.c
> index 4a3b270..c65a22f 100644
> --- a/hw/xwayland/xwayland.c
> +++ b/hw/xwayland/xwayland.c
> @@ -53,7 +53,8 @@ AbortDDX(enum ExitCode error)
>  void
>  OsVendorInit(void)
>  {
> -    ForceClockId(CLOCK_MONOTONIC);
> +    if (serverGeneration == 1)
> +        ForceClockId(CLOCK_MONOTONIC);
>  }
>  
>  void
> -- 
> 2.7.4
> 


More information about the xorg-devel mailing list