Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

swaylock causes labwc to go blank when user is on another tty #392

Open
krythim opened this issue Jan 25, 2025 · 4 comments
Open

swaylock causes labwc to go blank when user is on another tty #392

krythim opened this issue Jan 25, 2025 · 4 comments

Comments

@krythim
Copy link

krythim commented Jan 25, 2025

It's possible that segmentation fault occurs and swaylock causes labwc to go blank in the following situations.

  • Executing swaylock directly on another tty.
  • swaylock is executed by swayidle when user is on another tty.

And in the following situations it works properly.

  • User is on another tty, but swaylock is executed in a terminal emulator in labwc.

I also tested with waylock, and it works properly.

Versions:

  • swaylock 1.8.0
  • swayidle 1.8.0
  • labwc 0.8.2
  • waylock 1.3.0

Distribution: Archlinux

@kennylevinsen
Copy link
Member

If you see a segfault, share the stack trace from the generated coredump and any log output. Make sure it's not swaylock-effects you're testing.

Going blank is labwc itself, and that's part of the lock screen spec. alsway shows a red screen for example.

@krythim
Copy link
Author

krythim commented Jan 25, 2025

Going blank is labwc itself, and that's part of the lock screen spec. alsway shows a red screen for example.

It's not just going blank.
After segfault occurs, I can't control labwc anymore.
It doesn't respond to keyboard interaction, and I can only move cursor, which is useless.

If you see a segfault, share the stack trace from the generated coredump and any log output. Make sure it's not swaylock-effects you're testing.

Stack trace is here.

           PID: 1456 (swaylock)
           UID: 1000 (pg)
           GID: 984 (users)
        Signal: 11 (SEGV)
     Timestamp: Sat 2025-01-25 16:39:53 CST (6h ago)
  Command Line: swaylock
    Executable: /usr/bin/swaylock
 Control Group: /user.slice/user-1000.slice/session-3.scope
          Unit: session-3.scope
         Slice: user-1000.slice
       Session: 3
     Owner UID: 1000 (pg)
       Boot ID: e6d3b69d56d340fda55896bd580314ff
    Machine ID: 56bb08b77e5843d38c745c0d948c73dc
      Hostname: Archlinux
       Storage:  #none
       Message: Process 1456 (swaylock) of user 1000 dumped core.

                Stack trace of thread 1456:
                #0  0x0000753bd94ec914 xkb_keymap_num_layouts (libxkbcommon.so.0 + 0x1a914)
                #1  0x000061c373b22f2b n/a (/usr/bin/swaylock + 0x9f2b)
                #2  0x0000753bd89c0596 n/a (libffi.so.8 + 0x7596)
                #3  0x0000753bd89bd00e n/a (libffi.so.8 + 0x400e)
                #4  0x0000753bd89bfbd3 ffi_call (libffi.so.8 + 0x6bd3)
                #5  0x0000753bd94c78b0 n/a (libwayland-client.so.0 + 0x48b0)
                #6  0x0000753bd94c8139 n/a (libwayland-client.so.0 + 0x5139)
                #7  0x0000753bd94c8553 wl_display_dispatch_queue_pending (libwayland-client.so.0 + 0x5553)
                #8  0x000061c373b20e75 n/a (/usr/bin/swaylock + 0x7e75)
                #9  0x000061c373b1da61 n/a (/usr/bin/swaylock + 0x4a61)
                #10 0x0000753bd92e4e08 n/a (libc.so.6 + 0x25e08)
                #11 0x0000753bd92e4ecc __libc_start_main (libc.so.6 + 0x25ecc)
                #12 0x000061c373b1e5c5 n/a (/usr/bin/swaylock + 0x55c5)
                ELF object binary architecture: AMD x86-64

@kennylevinsen
Copy link
Member

It's not just going blank.
After segfault occurs, I can't control labwc anymore.
It doesn't respond to keyboard interaction, and I can only move cursor, which is useless

That's by design, it would be a huge security issue if a crashed lock screen lead to an unlocked session. All Wayland servers should behave this way if they implemented the protocol correctly

Stack trace is here.

It lacks debug symbols (all the n/a), but maybe there's an issue with null XKB state.

@krythim
Copy link
Author

krythim commented Jan 27, 2025

It lacks debug symbols (all the n/a), but maybe there's an issue with null XKB state.

I compiled swaylock in debug mode and tested again.

           PID: 7545 (swaylock)
           UID: 1000 (pg)
           GID: 984 (users)
        Signal: 11 (SEGV)
     Timestamp: Mon 2025-01-27 21:39:53 CST (26s ago)
  Command Line: ./swaylock
    Executable: /home/pub/data/repo/remote/swaylock-1.8.0/build/swaylock
 Control Group: /user.slice/user-1000.slice/session-3.scope
          Unit: session-3.scope
         Slice: user-1000.slice
       Session: 3
     Owner UID: 1000 (pg)
       Boot ID: 60ca748bc795478089729ea98aa3bfe3
    Machine ID: 56bb08b77e5843d38c745c0d948c73dc
      Hostname: Archlinux
       Storage: none
       Message: Process 7545 (swaylock) of user 1000 dumped core.

                Stack trace of thread 7545:
                #0  0x00007f1e40798914 xkb_keymap_num_layouts (libxkbcommon.so.0 + 0x1a914)
                #1  0x000060082f9bd4fe render_frame (/home/pub/data/repo/remote/swaylock-1.8.0/build/swaylock + 0xb4fe)
                #2  0x000060082f9b9496 ext_session_lock_surface_v1_handle_configure (/home/pub/data/repo/remote/swaylock-1.8.0/build/swaylock + 0x7496)
                #3  0x00007f1e3fc6b596 n/a (libffi.so.8 + 0x7596)
                #4  0x00007f1e3fc6800e n/a (libffi.so.8 + 0x400e)
                #5  0x00007f1e3fc6abd3 ffi_call (libffi.so.8 + 0x6bd3)
                #6  0x00007f1e407738b0 n/a (libwayland-client.so.0 + 0x48b0)
                #7  0x00007f1e40774139 n/a (libwayland-client.so.0 + 0x5139)
                #8  0x00007f1e40774553 wl_display_dispatch_queue_pending (libwayland-client.so.0 + 0x5553)
                #9  0x000060082f9bb127 display_in (/home/pub/data/repo/remote/swaylock-1.8.0/build/swaylock + 0x9127)
                #10 0x000060082f9b81bc loop_poll (/home/pub/data/repo/remote/swaylock-1.8.0/build/swaylock + 0x61bc)
                #11 0x000060082f9bbb4e main (/home/pub/data/repo/remote/swaylock-1.8.0/build/swaylock + 0x9b4e)
                #12 0x00007f1e40590e08 n/a (libc.so.6 + 0x25e08)
                #13 0x00007f1e40590ecc __libc_start_main (libc.so.6 + 0x25ecc)
                #14 0x000060082f9b69c5 _start (/home/pub/data/repo/remote/swaylock-1.8.0/build/swaylock + 0x49c5)
                ELF object binary architecture: AMD x86-64

And log from labwc.

The XKEYBOARD keymap compiler (xkbcomp) reports:
> Warning:          Unsupported maximum keycode 708, clipping.
>                   X11 cannot support keycodes above 255.
> Warning:          Could not resolve keysym XF86KbdInputAssistPrevgrou
> Warning:          Could not resolve keysym XF86KbdInputAssistNextgrou
Errors from xkbcomp are not fatal to the X server
The XKEYBOARD keymap compiler (xkbcomp) reports:
> Warning:          Unsupported maximum keycode 708, clipping.
>                   X11 cannot support keycodes above 255.
> Warning:          Could not resolve keysym XF86KbdInputAssistPrevgrou
> Warning:          Could not resolve keysym XF86KbdInputAssistNextgrou
Errors from xkbcomp are not fatal to the X server
(EE) failed to read Wayland events: Broken pipe

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants