• kscreenlocker kicks out user sessions

    From Max Nikulin@21:1/5 to All on Tue Nov 7 16:20:02 2023
    Hi,

    I have faced an issue with kscreenlocker: session may be aborted on
    attempt to unlock it. I am unsure if some package is missed in my case
    (I am trying to avoid applications that I have never used) or the bug
    may be reproduced by others.

    - Plasma X11 login
    - Activate screen locker
    - Switch to another user
    - Select the same user in the desktop manager.
    I have tried SDDM and LightDM with lightdm-gtk-greeter.
    - Type password

    In my case the created earlier session is terminated and desktop manager
    screen appears again. The following line appears in logs:

    kscreenlocker_greet[2446]: pam_unix(kde:auth): authentication failure;
    logname= uid=1001 euid=1001 tty= ruser= rhost= user=test

    If the password typed incorrectly then the display manager reports an
    error and control is not passed to kscreenlocker.

    Session may be successfully unlocked from kscreenlocker.

    Session may be unlocked from the display manager if kscreenlocker has
    not activated yet. E.g. "switch user" action from krunner sends directly
    to the display manager, so success of unlock depends on switch to the VT
    where the session is running.

    I have noticed the issue on my laptop and to find exact conditions I
    have used a qemu VM. Set of packages are not identical, but still quite similar.

    Debian 12 bookworm.

    There is a similar to some extent bug
    https://bugs.debian.org/858596
    but .xsession-errors is rather small in my case.

    I have never bitten by this bug on Kubuntu-20.04 and lightdm-gtk-greeter
    on another laptop despite temporary switching to another user is routine.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Max Nikulin@21:1/5 to Max Nikulin on Thu Nov 9 12:50:01 2023
    On 07/11/2023 21:53, Max Nikulin wrote:

    - Plasma X11 login
    - Activate screen locker
    - Switch to another user
    - Select the same user in the desktop manager.
      I have tried SDDM and LightDM with lightdm-gtk-greeter.
    - Type password

    In my case the created earlier session is terminated and desktop manager screen appears again.

    This recipe to get crash works rater reliable inside a VM, but not on
    the host.

    The following line appears in logs:

    kscreenlocker_greet[2446]: pam_unix(kde:auth): authentication failure; logname= uid=1001 euid=1001 tty= ruser= rhost=  user=test

    This message appears even in cases when the session is successfully
    unlocked. So it is a misleading error.

    kscreenlocker significantly increases probability of session
    termination, but with more repetitions it may be experienced even with
    fluxbox.

    Actually I have seen 2 scenarios of crash as they appear in Xorg logs.

    1. Perhaps something involved with polkit and a race with granting
    permissions to current user:

    [ 4721.881] (WW) qxl(0): drmSetMaster failed: Device or resource busy
    [ 4721.881] (EE) qxl(0): failed to set mode: Permission denied(EE)
    Fatal server error:
    [ 4721.881] (EE) EnterVT failed for screen 0
    [ 4721.881] (EE)

    2. Segfault

    [ 3444.301] (EE) Backtrace:
    [ 3444.301] (EE) 0: /usr/lib/xorg/Xorg (OsLookupColor+0x139)
    [0x55fc14832d29]
    [ 3444.302] (EE) 1: /lib/x86_64-linux-gnu/libc.so.6 (__sigaction+0x40) [0x7f983dc5afd0]
    [ 3444.302] (EE) unw_get_proc_name failed: no unwind info found [-10]
    [ 3444.302] (EE) 2: /usr/lib/xorg/modules/drivers/qxl_drv.so (?+0x0) [0x7f983d65e0e7]
    [ 3444.302] (EE) unw_get_proc_name failed: no unwind info found [-10]
    [ 3444.302] (EE) 3: /usr/lib/xorg/modules/drivers/qxl_drv.so (?+0x0) [0x7f983d65f1a7]
    [ 3444.302] (EE) 4: /usr/lib/xorg/Xorg (xf86CrtcSetModeTransform+0x27f) [0x55fc1473561f]
    [ 3444.302] (EE) 5: /usr/lib/xorg/Xorg (xf86SetDesiredModes+0xec) [0x55fc14735b4c]
    [ 3444.302] (EE) unw_get_proc_name failed: no unwind info found [-10]
    [ 3444.303] (EE) 6: /usr/lib/xorg/modules/drivers/qxl_drv.so (?+0x0) [0x7f983d65ddc4]
    [ 3444.303] (EE) 7: /usr/lib/xorg/Xorg (xf86CVTMode+0x23ae)
    [0x55fc1473c52e]
    [ 3444.303] (EE) 8: /usr/lib/xorg/Xorg (xf86VTEnter+0x81) [0x55fc146fee31]
    [ 3444.303] (EE) 9: /usr/lib/xorg/Xorg (WakeupHandler+0xb3)
    [0x55fc146c4243]
    [ 3444.303] (EE) 10: /usr/lib/xorg/Xorg (WaitForSomething+0x198) [0x55fc1482c6e8]
    [ 3444.303] (EE) 11: /usr/lib/xorg/Xorg (SendErrorToClient+0x113) [0x55fc146bf473]
    [ 3444.303] (EE) 12: /usr/lib/xorg/Xorg (InitFonts+0x3bc) [0x55fc146c36cc]
    [ 3444.303] (EE) 13: /lib/x86_64-linux-gnu/libc.so.6
    (__libc_init_first+0x8a) [0x7f983dc461ca]
    [ 3444.304] (EE) 14: /lib/x86_64-linux-gnu/libc.so.6
    (__libc_start_main+0x85) [0x7f983dc46285]
    [ 3444.304] (EE) 15: /usr/lib/xorg/Xorg (_start+0x21) [0x55fc146acb71]
    [ 3444.304] (EE)
    [ 3444.304] (EE) Segmentation fault at address 0x55f94a6d9e35
    [ 3444.304] (EE)
    Fatal server error:
    [ 3444.304] (EE) Caught signal 11 (Segmentation fault). Server aborting

    I have seen some bugs with OsLookupColor, but "xf86CrtcSetModeTransform"
    does not appear in search results.

    So likely it is something related with (deprecated?) QXL video driver. kscreenlocker just makes the issue more apparent.

    I am less sure now that I have really seen the bug on the host.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)