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

Mir crashes when wayvnc connection opened while Mir is on a non-active TTY #2701

Closed
wmww opened this issue Oct 15, 2022 · 9 comments
Closed

Comments

@wmww
Copy link
Contributor

wmww commented Oct 15, 2022

Open Mir with all extensions enabled, run wayvnc, which to a different TTY, run gnome-connections and connect. Sway has weird behavior indicating there's something hard about making this work, but Mir completely crashes.

@AlanGriffiths
Copy link
Contributor

I can imagine that the Mir display configuration may be "confused" and some GPU resources may be unavailable. But I agree, crashing isn't appropriate. Logs? Stack trace?

@wmww
Copy link
Contributor Author

wmww commented Oct 20, 2022

So far I have been unable to replicate this while running Mir from SSH, so no stack trace.

@Saviq
Copy link
Collaborator

Saviq commented Oct 20, 2022

I reproduced with gdb -p $( pidof miriway-shell ):

Thread 92 (Thread 0x7faf5bfff6c0 (LWP 1300471) "Mir/Wayland"):
#0  0x00007fb100b95b96 in wl_list_empty () at /lib/x86_64-linux-gnu/libwayland-server.so.0
#1  0x00007fb100b976e5 in wl_client_destroy () at /lib/x86_64-linux-gnu/libwayland-server.so.0
#2  0x00007fb1016d5a3d in (anonymous namespace)::halt_eventloop(int, uint32_t, void*) (fd=31, data=0x5635c03dfcb0) at /home/michal/dev/MirServer/mir/src/server/frontend_wayland/wayland_connector.cpp:154
#3  0x00007fb100b970fa in wl_event_loop_dispatch () at /lib/x86_64-linux-gnu/libwayland-server.so.0
#4  0x00007fb100b978d5 in wl_display_run () at /lib/x86_64-linux-gnu/libwayland-server.so.0
#5  0x00007fb1016d7312 in operator()(wl_display*) const (__closure=0x5635bfca4268, d=0x5635c03dfcb0) at /home/michal/dev/MirServer/mir/src/server/frontend_wayland/wayland_connector.cpp:393
#6  0x00007fb1016d9872 in std::__invoke_impl<void, mir::frontend::WaylandConnector::start()::<lambda(wl_display*)>, wl_display*>(std::__invoke_other, struct {...} &&) (__f=...) at /usr/include/c++/12/bits/invoke.h:61
#7  0x00007fb1016d9817 in std::__invoke<mir::frontend::WaylandConnector::start()::<lambda(wl_display*)>, wl_display*>(struct {...} &&) (__fn=...) at /usr/include/c++/12/bits/invoke.h:96
#8  0x00007fb1016d9787 in std::thread::_Invoker<std::tuple<mir::frontend::WaylandConnector::start()::<lambda(wl_display*)>, wl_display*> >::_M_invoke<0, 1>(std::_Index_tuple<0, 1>) (this=0x5635bfca4268) at /usr/include/c++/12/bits/std_thread.h:252
#9  0x00007fb1016d9740 in std::thread::_Invoker<std::tuple<mir::frontend::WaylandConnector::start()::<lambda(wl_display*)>, wl_display*> >::operator()(void) (this=0x5635bfca4268) at /usr/include/c++/12/bits/std_thread.h:259
#10 0x00007fb1016d9724 in std::thread::_State_impl<std::thread::_Invoker<std::tuple<mir::frontend::WaylandConnector::start()::<lambda(wl_display*)>, wl_display*> > >::_M_run(void) (this=0x5635bfca4260) at /usr/include/c++/12/bits/std_thread.h:210
#11 0x00007fb101e573a3 in  () at /lib/x86_64-linux-gnu/libstdc++.so.6
#12 0x00007fb101be6402 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#13 0x00007fb101c75590 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
[2022-10-20 12:50:34.234739] < - ERROR - > gbm-kms: Failed to set DRM CRTC. Screen contents may be incomplete. Try plugging the monitor in again.
[2022-10-20 12:50:34.242145] <information> evdev-input: Removed /dev/input/event3
[2022-10-20 12:50:34.242355] <information> evdev-input: Removed /dev/input/event13: Dell Universal Receiver
[2022-10-20 12:50:34.242500] <information> evdev-input: Removed /dev/input/event2
[2022-10-20 12:50:34.242562] <information> evdev-input: Removed /dev/input/event31
[2022-10-20 12:50:34.242700] <information> evdev-input: Removed /dev/input/event8: USB Keyboard
[2022-10-20 12:50:34.242771] <information> evdev-input: Removed /dev/input/event12: Dell Universal Receiver
[2022-10-20 12:50:34.242886] <information> evdev-input: Removed /dev/input/event10: USB Keyboard
[2022-10-20 12:50:34.243000] <information> evdev-input: Removed /dev/input/event256
[2022-10-20 12:50:34.243104] <information> evdev-input: Removed /dev/input/event7
[2022-10-20 12:50:34.243164] <information> evdev-input: Removed /dev/input/event0
[2022-10-20 12:50:34.243204] < -warning- > gbm-kms: clear_cursor: drmModeSetCursor failed (Permission denied)
[2022-10-20 12:50:34.243254] <information> evdev-input: Removed /dev/input/event15
[2022-10-20 12:50:34.243344] <information> evdev-input: Removed /dev/input/event6: Laptop Camera
[2022-10-20 12:50:34.243433] <information> evdev-input: Removed /dev/input/event1
[2022-10-20 12:50:34.243517] <information> evdev-input: Removed /dev/input/event11: Dell Universal Receiver
[2022-10-20 12:50:34.243599] <information> evdev-input: Removed /dev/input/event16: HD Pro Webcam C920
[2022-10-20 12:50:34.243683] <information> evdev-input: Removed /dev/input/event5
[2022-10-20 12:50:34.243795] <information> evdev-input: Removed /dev/input/event9: USB Keyboard
[2022-10-20 12:50:34.243884] <information> evdev-input: Removed /dev/input/event14: Dell Universal Receiver
[2022-10-20 12:50:34.290983] < - ERROR - > gbm-kms: Failed to set DRM CRTC. Screen contents may be incomplete. Try plugging the monitor in again.
[2022-10-20 12:50:34.291178] < - ERROR - > gbm-kms: Output DisplayPort-2 has no associated CRTC to schedule page flips on
[2022-10-20 12:50:34.291242] < - ERROR - > gbm-kms: Failed to set DRM CRTC. Screen contents may be incomplete. Try plugging the monitor in again.
!!! Fatal signal received. Attempting cleanup, but deadlock may occur
[2022-10-20 12:51:14.384351] < - ERROR - > gbm-kms: Output eDP-1 has no associated CRTC to schedule page flips on
[2022-10-20 12:51:14.384455] < - ERROR - > gbm-kms: Failed to set DRM CRTC. Screen contents may be incomplete. Try plugging the monitor in again.
Mir fatal error: Unsupported attempt to continue after a fatal signal: SIGSEGV
!!! Fatal signal received. Attempting cleanup, but deadlock may occur
Mir fatal error: Unsupported attempt to continue after a fatal signal: SIGABRT
(EE) failed to read Wayland events: Broken pipe
Aborted (core dumped)

@AlanGriffiths
Copy link
Contributor

Thread 92 (Thread 0x7faf5bfff6c0 (LWP 1300471) "Mir/Wayland"):
#0  0x00007fb100b95b96 in wl_list_empty () at /lib/x86_64-linux-gnu/libwayland-server.so.0
#1  0x00007fb100b976e5 in wl_client_destroy () at /lib/x86_64-linux-gnu/libwayland-server.so.0
#2  0x00007fb1016d5a3d in (anonymous namespace)::halt_eventloop(int, uint32_t, void*) (fd=31, data=0x5635c03dfcb0) at /home/michal/dev/MirServer/mir/src/server/frontend_wayland/wayland_connector.cpp:154

That is the Wayland thread closing down. Was the thread handling SIGSEGV?

@AlanGriffiths
Copy link
Contributor

[2022-10-20 12:50:34.234739] < - ERROR - > gbm-kms: Failed to set DRM CRTC. Screen contents may be incomplete. Try plugging the monitor in again.

This is the sort of thing I'd expect as Mir doesn't "own" any output, nor the associated graphics card.

@AlanGriffiths
Copy link
Contributor

!!! Fatal signal received. Attempting cleanup, but deadlock may occur
[2022-10-20 12:51:14.384351] < - ERROR - > gbm-kms: Output eDP-1 has no associated CRTC to schedule page flips on
[2022-10-20 12:51:14.384455] < - ERROR - > gbm-kms: Failed to set DRM CRTC. Screen contents may be incomplete. Try plugging the monitor in again.
Mir fatal error: Unsupported attempt to continue after a fatal signal: SIGSEGV
!!! Fatal signal received. Attempting cleanup, but deadlock may occur
Mir fatal error: Unsupported attempt to continue after a fatal signal: SIGABRT

So, first we receive a SIGSEGV and enter fatal_signal_cleanup(). That calls perform_emergency_cleanup() and then checks for an "old" handler for SIGSEGV (which ought to be the default). When the existing handler returns (it should not return) we call fatal_error_abort() which in turn raises SIGABRT and we start over by entering .fatal_signal_cleanup() a second time.

@Saviq
Copy link
Collaborator

Saviq commented Oct 21, 2022

This sounds like the same issue I have when just switching TTY away from Miriway, I'm seeing the same logs and trace.

@AlanGriffiths
Copy link
Contributor

This sounds like the same issue I have when just switching TTY away from Miriway, I'm seeing the same logs and trace.

Perhaps this is also fixed by #2712?

@AlanGriffiths
Copy link
Contributor

Fixed by #2712

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

No branches or pull requests

3 participants