Nothing Special   »   [go: up one dir, main page]

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

Assert failure in lab_wlr_scene_output_commit() #1667

Closed
Tamaranch opened this issue Mar 28, 2024 · 3 comments
Closed

Assert failure in lab_wlr_scene_output_commit() #1667

Tamaranch opened this issue Mar 28, 2024 · 3 comments
Labels
bug Something isn't working
Milestone

Comments

@Tamaranch
Copy link

I don't think I can reproduce this, and it's not quite with the latest commit (I was running 11b6836), but I think it's best to report it if it helps.

After doing some display manipulation (scaling etc. via wlr-output-management), I switched to my X11 session in tty 7, then back to my Wayland session in tty 3 labwc crashed:

labwc: ../src/common/scene-helpers.c :44 : lab_wlr_scene_output_commit:  l'assertion « scene_output » a échoué.

Core was generated by `labwc --startup xfce4-session'.
Program terminated with signal SIGABRT, Aborted.
#0  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
44	      return INTERNAL_SYSCALL_ERROR_P (ret) ? INTERNAL_SYSCALL_ERRNO (ret) : 0;
[Current thread is 1 (Thread 0x717a46452f80 (LWP 67473))]
(gdb) bt
#0  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
#1  0x0000717a494ab393 in __pthread_kill_internal (signo=6, threadid=<optimized out>) at pthread_kill.c:78
#2  0x0000717a4945a6c8 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#3  0x0000717a494424b8 in __GI_abort () at abort.c:79
#4  0x0000717a494423dc in __assert_fail_base
    (fmt=0x717a4a5a7355 "%s%s%s :%u : %s%s l'assertion « %s » a échoué.\n%n", assertion=assertion@entry=0x5e5a9c40d513 "scene_output", file=file@entry=0x5e5a9c40d4f0 "../src/common/scene-helpers.c", line=line@entry=44, function=function@entry=0x5e5a9c40d5a0 <__PRETTY_FUNCTION__.0> "lab_wlr_scene_output_commit") at assert.c:94
#5  0x0000717a49452d46 in __assert_fail
    (assertion=0x5e5a9c40d513 "scene_output", file=0x5e5a9c40d4f0 "../src/common/scene-helpers.c", line=44, function=0x5e5a9c40d5a0 <__PRETTY_FUNCTION__.0> "lab_wlr_scene_output_commit") at assert.c:103
#6  0x00005e5a9c3f0a07 in lab_wlr_scene_output_commit (scene_output=0x0) at ../src/common/scene-helpers.c:44
#7  0x00005e5a9c3d5054 in output_frame_notify (listener=0x5e5a9e8317d8, data=0x5e5a9e8f7580) at ../src/output.c:94
#8  0x0000717a4a57f01e in wl_signal_emit_mutable (signal=<optimized out>, data=0x5e5a9e8f7580) at ../wayland-1.22.0/src/wayland-server.c:2241
#9  0x0000717a4a4b0809 in handle_page_flip (fd=<optimized out>, seq=24288, tv_sec=25292, tv_usec=234900, crtc_id=<optimized out>, data=<optimized out>) at ../wlroots-0.17.2/backend/drm/drm.c:1767
#10 0x0000717a49d0a907 in drmHandleEvent () at /usr/lib/libdrm.so.2
#11 0x0000717a4a4ae57e in handle_drm_event (fd=<optimized out>, mask=<optimized out>, data=0x5e5a9dff42a0) at ../wlroots-0.17.2/backend/drm/drm.c:1779
#12 0x0000717a4a580ae2 in wl_event_loop_dispatch (loop=0x5e5a9dfe4e20, timeout=timeout@entry=-1) at ../wayland-1.22.0/src/event-loop.c:1027
#13 0x0000717a4a5812d7 in wl_display_run (display=0x5e5a9dfe4aa0) at ../wayland-1.22.0/src/wayland-server.c:1493
#14 0x00005e5a9c3d349a in main (argc=3, argv=0x7ffd8c210cf8) at ../src/main.c:179

I have a bunch of this error in the logs a bit before that, but if it's related it's not a systematic cause, as I seem to get these errors every time I switch between my X11 and Wayland sessions:

[ERROR] [../src/common/scene-helpers.c:58] Failed to commit output HDMI-A-1
@Consolatis Consolatis added bug Something isn't working help wanted Extra attention is needed investigation required Needs further investigation labels Mar 28, 2024
@Consolatis Consolatis added this to the 0.7.2 milestone Mar 28, 2024
@Consolatis Consolatis removed help wanted Extra attention is needed investigation required Needs further investigation labels Mar 28, 2024
@Consolatis
Copy link
Member

Thanks, it asserts on output->scene_output. AFAIR that in combination with output layouts was something that wlroots 0.17 before it was released had an issue with and we added a workaround in the 0.17 tracking PR at that time. Later on, wlroots 0.17 then changed the behavior slightly but we are still using the workaround that might miss some specific case like blocking a DRM node due to VT switching.

In case this is something that happens again, you can patch src/output.c output_frame_notify() to return early on !output_is_usable(output) || !output->scene_output.

The proper solution is likely to create the scene_output in new_output_notify() and destroy it in output_destroy_notify().

@stefonarch
Copy link
Contributor

I see the same line [ERROR] [../src/common/scene-helpers.c:58] Failed to commit output eDP-1 printed 3 times /second in red on the tty konsole after exiting a session with a different user started with startlxqtlabwc while my regular session is running on another konsole started by sddm.

@Consolatis
Copy link
Member

We could remove the logging but can't really fix the error. We just react to frame events by the backend and commit the new state, there is not much more we can do.

I am feeling sligthly uncomfortable changing the scene output stuff (e.g. the original issue) at this stage in the dev cycle. I'll propose a PR fix later that simply disables the assert() and returns instead + removes the log line (or at least reduces its severity so it doesn't show up by default).

Consolatis added a commit to Consolatis/labwc that referenced this issue Apr 8, 2024
Also reduce log spam from failed output commits that
can happen for various reasons outside of our control.

Fixes: labwc#1667
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants