Bug 267853 - x11/waybar: crashs since latest upgrade (of wayland?)
Summary: x11/waybar: crashs since latest upgrade (of wayland?)
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Jan Beich
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-11-18 16:30 UTC by Loïc Bartoletti
Modified: 2022-11-21 11:45 UTC (History)
0 users

See Also:
jbeich: maintainer-feedback+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Loïc Bartoletti freebsd_committer freebsd_triage 2022-11-18 16:30:45 UTC
Hi,

waybar crashes since my latest ports upgrade. 

I haven't made any changes in my configuration, so I guess there is a problem with a dependency. But, I don't know exactly which causes troubles.

I tried with my configuration and the default one, and I get the same problem:

sway crashes
and I get this error:

[wayland|window|etc.] `unable to receive ipc header`
Comment 1 Jan Beich freebsd_committer freebsd_triage 2022-11-18 16:52:15 UTC
(In reply to Loïc Bartoletti from comment #0)
> waybar crashes since my latest ports upgrade. 

I can't reproduce with waybar inside jail while sway or sway-devel runs outside. Can you show a backtrace with no/default config after rebuilding WITH_DEBUG=1 ?

> sway crashes

Can you reproduce with sway-devel?
Can you reproduce after reverting ports 3eb7d7b7f6a0?

> [wayland|window|etc.] `unable to receive ipc header`

Where does this message come from (sway, waybar, or something else)?
Can you reproduce by disabling Sway IPC support in Waybar by prepending "env -u SWAYSOCK" or "env SWAYSOCK=/dev/null" before "waybar"?
Comment 2 Loïc Bartoletti freebsd_committer freebsd_triage 2022-11-21 09:04:46 UTC
Seems ok with sway-devel and waybar from ports.
Comment 3 commit-hook freebsd_committer freebsd_triage 2022-11-21 11:24:26 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=a347cfee7327523b2a42ccc20b445c59658cf64a

commit a347cfee7327523b2a42ccc20b445c59658cf64a
Author:     Jan Beich <jbeich@FreeBSD.org>
AuthorDate: 2022-11-21 11:13:34 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2022-11-21 11:22:54 +0000

    x11-wm/sway: unbreak WLR_BACKENDS != drm after 3eb7d7b7f6a0

    $ echo 'exec swaymsg -t get_outputs' >/tmp/sway.conf
    $ WLR_BACKENDS=headless sway -c /tmp/sway.conf
    00:00:00.067 [wlr] [types/wlr_drm_lease_v1.c:716] No DRM backend supplied, failed to create wlr_drm_lease_v1_manager
    00:00:00.000 [common/ipc-client.c:87] Unable to receive IPC response
    Segmentation fault
    (lldb) bt
    * thread #1, name = 'sway', stop reason = signal SIGSEGV: invalid address (fault address: 0x0)
      * frame #0: 0x000000082b381e84 libc.so.7`strlen + 84
        frame #1: 0x0000000822cc530d libjson-c.so.5`json_object_new_string(s=0x0000000000000000) at json_object.c:1276:36
        frame #2: 0x0000000000234de9 sway`ipc_json_describe_output(output=0x0000000871982200, object=0x00000008755e63b0) at ipc-json.c:255:4
        frame #3: 0x000000000023441f sway`ipc_json_describe_node(node=0x0000000871982200) at ipc-json.c:707:3
        frame #4: 0x0000000000239d07 sway`ipc_client_handle_command(client=0x000000084e3a1380, payload_length=0, payload_type=IPC_GET_OUTPUTS) at ipc-server.c:672:31
        frame #5: 0x00000000002397fa sway`ipc_client_handle_readable(client_fd=27, mask=1, data=0x000000084e3a1380) at ipc-server.c:267:3
        frame #6: 0x00000008271b88c7 libwayland-server.so.0`wl_event_source_fd_dispatch(source=0x000000084e3a16c0, ep=0x0000000820f4e360) at event-loop.c:112:9
        frame #7: 0x00000008271b9fd4 libwayland-server.so.0`wl_event_loop_dispatch(loop=0x000000084e344320, timeout=-1) at event-loop.c:1027:4
        frame #8: 0x00000008271b5c6f libwayland-server.so.0`wl_display_run(display=0x000000084e35e000) at wayland-server.c:1431:3
        frame #9: 0x000000000023e205 sway`server_run(server=0x00000000002a3070) at server.c:310:2
        frame #10: 0x000000000023cd84 sway`main(argc=3, argv=0x0000000820f4e608) at main.c:431:2
        frame #11: 0x000000000022ca10 sway`_start(ap=<unavailable>, cleanup=<unavailable>) at crt1_c.c:75:7
    (lldb) f 2
    frame #2: 0x0000000000234de9 sway`ipc_json_describe_output(output=0x0000000871982200, object=0x00000008755e63b0) at ipc-json.c:255:4
       252                          json_object_new_string(
       253                                  ipc_json_orientation_description(L_NONE)));
       254          json_object_object_add(object, "make",
    -> 255                          json_object_new_string(wlr_output->make));
       256          json_object_object_add(object, "model",
       257                          json_object_new_string(wlr_output->model));
       258          json_object_object_add(object, "serial",
    (lldb) p *wlr_output
    (wlr_output) $0 = {
    [...]
      make = 0x0000000000000000
      model = 0x0000000000000000
      serial = 0x0000000000000000
    [...]

    PR:             267853
    Reported by:    lbartoletti
    Regressed by:   https://gitlab.freedesktop.org/wlroots/wlroots/-/commit/be86145322e6

 x11-wm/sway/Makefile | 4 +++-
 x11-wm/sway/distinfo | 4 ++++
 2 files changed, 7 insertions(+), 1 deletion(-)
Comment 4 Jan Beich freebsd_committer freebsd_triage 2022-11-21 11:45:37 UTC
Accidentally reproduced by running Sway under Sway. comment 0 didn't mention how Sway was started (steps to reproduce) and comment 2 didn't include backtrace (fingerprint to distinguish from other crashes), so required more "crystal ball" guessing.