xdg-desktop-portal-wlr: After sharing a few times (~3) it no longer works (using systemd unit)

Hi,

this is working pretty good in general, but the main problem is that after sharing and stop sharing the screen a few times, it no longer works. I have tested this in Chromium and Firefox. I am using the systemd unit, where I have edited the ExecStart lines as follows, so that it works with the browsers and uses the output I want:

ExecStart=/usr/lib/xdg-desktop-portal-wlr -p BGRx -o DP-1

The status of xdg-desktop-portal.service shows the following error:

~$ systemctl status --user xdg-desktop-portal.service 
● xdg-desktop-portal.service - Portal service
     Loaded: loaded (/usr/lib/systemd/user/xdg-desktop-portal.service; static; vendor preset: enabled)
     Active: active (running) since Wed 2020-04-29 08:57:28 CEST; 2h 12min ago
   Main PID: 5898 (xdg-desktop-por)
     CGroup: /user.slice/user-1000.slice/user@1000.service/xdg-desktop-portal.service
             └─5898 /usr/lib/xdg-desktop-portal

Apr 29 08:57:28 tapia-laptop systemd[5544]: Starting Portal service...
Apr 29 08:57:28 tapia-laptop systemd[5544]: Started Portal service.
Apr 29 08:57:58 tapia-laptop xdg-desktop-por[5898]: Failed to get application states: GDBus.Error:org.freedesktop.portal.Error.Failed: Could not get window list

Could you tell me, how to further debug this?

Thanks!

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 18

Most upvoted comments

Arch has updated the official pipewire package to version 0.3.4, so you will no longer need to use the pipewire-git AUR package to use this fix on Arch.

I’ve not seen any more complaints about this bug, so I’m gonna close it. If you think you are still experiencing intermittent failures that require a pipewire restart, you have segfaults in pipewire-media-session, and you’re using version 0.3.3 or newer, comment here and I’ll reopen this.

@danshick “Rock solid” seems like an accurate description to me 😉 I have tested this with the new pipewire patch and it is working perfectly. Right on time for a video-workshop I was planning to give next week at the university.

Thanks!

I havnt’t have time today to try to reliably reproduce this. I will report as soon as I have done it (if I can).

[tapia@tapia-laptop]:~$ coredumpctl debug 123722
           PID: 123722 (xdg-desktop-por)
           UID: 1000 (tapia)
           GID: 1000 (tapia)
        Signal: 11 (SEGV)
     Timestamp: Wed 2020-05-06 13:08:29 CEST (1 day 4h ago)
  Command Line: /usr/lib/xdg-desktop-portal-wlr -p BGRx -o DP-1
    Executable: /usr/lib/xdg-desktop-portal-wlr
 Control Group: /user.slice/user-1000.slice/user@1000.service/xdg-desktop-portal-wlr.service
          Unit: user@1000.service
     User Unit: xdg-desktop-portal-wlr.service
         Slice: user-1000.slice
     Owner UID: 1000 (tapia)
       Boot ID: c171270b37e14914978d9d0fe299393d
    Machine ID: 81a7f722a0ba49e19b273b89c2b0f42f
      Hostname: tapia-laptop
       Storage: /var/lib/systemd/coredump/core.xdg-desktop-por.1000.c171270b37e14914978d9d0fe299393d.123722.1588763309000000000000.lz4
       Message: Process 123722 (xdg-desktop-por) of user 1000 dumped core.
                
                Stack trace of thread 123723:
                #0  0x00007f167f66413b n/a (libpipewire-0.3.so.0 + 0x3013b)
                #1  0x00007f167ec0e12f n/a (libpipewire-module-client-node.so + 0x1c12f)
                #2  0x00007f167f9e2be8 n/a (libspa-support.so + 0x5be8)
                #3  0x00007f167f9e179e n/a (libspa-support.so + 0x479e)
                #4  0x00007f167f9e1ccc n/a (libspa-support.so + 0x4ccc)
                #5  0x00007f167f68d590 n/a (libpipewire-0.3.so.0 + 0x59590)
                #6  0x00007f167f60246f start_thread (libpthread.so.0 + 0x946f)
                #7  0x00007f167f8903d3 __clone (libc.so.6 + 0xff3d3)
                
                Stack trace of thread 123722:
                #0  0x00007f167f8814fc __read (libc.so.6 + 0xf04fc)
                #1  0x00007f167f9e0ab4 n/a (libspa-support.so + 0x3ab4)
                #2  0x00007f167f9e2e8f n/a (libspa-support.so + 0x5e8f)
                #3  0x00007f167ec0992b n/a (libpipewire-module-client-node.so + 0x1792b)
                #4  0x00007f167ec0f573 n/a (libpipewire-module-client-node.so + 0x1d573)
                #5  0x00007f167ec016f1 n/a (libpipewire-module-client-node.so + 0xf6f1)
                #6  0x00007f167ec49adf n/a (libpipewire-module-protocol-native.so + 0x21adf)
                #7  0x00007f167ec4a038 n/a (libpipewire-module-protocol-native.so + 0x22038)
                #8  0x00007f167f9e1ccc n/a (libspa-support.so + 0x4ccc)
                #9  0x0000557bee81f665 n/a (xdg-desktop-portal-wlr + 0x3665)
                #10 0x00007f167f7b8023 __libc_start_main (libc.so.6 + 0x27023)
                #11 0x0000557bee81f95e n/a (xdg-desktop-portal-wlr + 0x395e)

GNU gdb (GDB) 9.1
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/lib/xdg-desktop-portal-wlr...
(No debugging symbols found in /usr/lib/xdg-desktop-portal-wlr)
[New LWP 123723]
[New LWP 123722]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
Core was generated by `/usr/lib/xdg-desktop-portal-wlr -p BGRx -o DP-1'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00007f167f66413b in ?? () from /usr/lib/libpipewire-0.3.so.0
[Current thread is 1 (Thread 0x7f167f464700 (LWP 123723))]
(gdb) bt full
#0  0x00007f167f66413b in ?? () from /usr/lib/libpipewire-0.3.so.0
No symbol table info available.
#1  0x00007f167ec0e12f in ?? () from /usr/lib/pipewire-0.3/libpipewire-module-client-node.so
No symbol table info available.
#2  0x00007f167f9e2be8 in ?? () from /usr/lib/spa-0.2/support/libspa-support.so
No symbol table info available.
#3  0x00007f167f9e179e in ?? () from /usr/lib/spa-0.2/support/libspa-support.so
No symbol table info available.
#4  0x00007f167f9e1ccc in ?? () from /usr/lib/spa-0.2/support/libspa-support.so
No symbol table info available.
#5  0x00007f167f68d590 in ?? () from /usr/lib/libpipewire-0.3.so.0
No symbol table info available.
#6  0x00007f167f60246f in start_thread () from /usr/lib/libpthread.so.0
No symbol table info available.
#7  0x00007f167f8903d3 in clone () from /usr/lib/libc.so.6
No symbol table info available.

@cristobaltapia FYI

Okay, I’ve now tested dozens of casts, starting and stopping, in parallel and serially. It seems rock solid now.

I think this is fixed, but I’ll leave the issue open for a couple of days in case we have any more people experiencing issues. If you are running pipewire master and you get a pipewire-media-session segfault, please let us know and attach a backtrace to your comment if you can. Thanks!

Quick note for anyone wanting to test, pipewire-git in AUR is currently broken. Needed to update the _pick lines to:

--removed--

I’ve also commented on the AUR package, so it’ll probably be fixed soon. Just read the PKGBUILD before you use it.

Edit: The PKGBUILD is now fixed.