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

Failed to upgrade to Pop!OS 22.04 due to Pipewire dependency issue #12

Closed
johnsistiiv opened this issue Jun 17, 2022 · 5 comments
Closed

Comments

@johnsistiiv
Copy link

I attempted to upgrade from Pop!_OS 21.10 to 22.04. When I click the "download" button in the Settings, Settings crashes. Previously, it showed an error that I tracked to a dependency issue with Pipewire. Some sample output:

$ sudo apt upgrade pipewire
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 gstreamer1.0-pipewire : Depends: pipewire (= 0.3.51-1~ubuntu21.10) but 0.3.32-1 is installed
                         Depends: libpipewire-0.3-0 (= 0.3.51-1~ubuntu21.10) but 0.3.32-1 is installed
 libpipewire-0.3-dev : Depends: libpipewire-0.3-0 (= 0.3.51-1~ubuntu21.10) but 0.3.32-1 is installed
 pipewire-audio-client-libraries : Depends: pipewire (= 0.3.51-1~ubuntu21.10) but 0.3.32-1 is installed
                                   Depends: libpipewire-0.3-0 (= 0.3.51-1~ubuntu21.10) but 0.3.32-1 is installed
 pipewire-media-session : Depends: pipewire (>= 0.3.39) but 0.3.32-1 is installed
                          Depends: libpipewire-0.3-0 (>= 0.3.39) but 0.3.32-1 is installed
                          Breaks: pipewire-pulse (< 0.3.39-1)
                          Breaks: pipewire-pulse:i386 (< 0.3.39-1)
 pipewire-tests : Depends: pipewire (= 0.3.51-1~ubuntu21.10) but 0.3.32-1 is installed
                  Depends: libpipewire-0.3-0 (= 0.3.51-1~ubuntu21.10) but 0.3.32-1 is installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

Naturally:

$ sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Correcting dependencies... failed.
The following packages have unmet dependencies:
 gstreamer1.0-pipewire : Depends: pipewire (= 0.3.51-1~ubuntu21.10) but 0.3.32-1 is installed
                         Depends: libpipewire-0.3-0 (= 0.3.51-1~ubuntu21.10) but 0.3.32-1 is installed
 libpipewire-0.3-dev : Depends: libpipewire-0.3-0 (= 0.3.51-1~ubuntu21.10) but 0.3.32-1 is installed
 pipewire-audio-client-libraries : Depends: pipewire (= 0.3.51-1~ubuntu21.10) but 0.3.32-1 is installed
                                   Depends: libpipewire-0.3-0 (= 0.3.51-1~ubuntu21.10) but 0.3.32-1 is installed
 pipewire-media-session : Depends: pipewire (>= 0.3.39) but 0.3.32-1 is installed
                          Depends: libpipewire-0.3-0 (>= 0.3.39) but 0.3.32-1 is installed
                          Breaks: pipewire-pulse (< 0.3.39-1)
                          Breaks: pipewire-pulse:i386 (< 0.3.39-1)
 pipewire-tests : Depends: pipewire (= 0.3.51-1~ubuntu21.10) but 0.3.32-1 is installed
                  Depends: libpipewire-0.3-0 (= 0.3.51-1~ubuntu21.10) but 0.3.32-1 is installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
E: Unable to correct dependencies

I'm not sure what to do after searching for a solution; I found two others who posted the same issue in the last month or two elsewhere, but it appears the results are inconclusive for them and they did not work for me.

After attempting some of the fixes, it seems nothing is showing up in qpwgraph except ALSA MIDI Through source and sink. Qjackctl won't even open.

Any help you can provide would be great. I'm hoping I can fix enough to upgrade to 22.04 because word is Pipewire comes by default with that upgrade.

@jacobgkau
Copy link
Member

This seems like a duplicate of pop-os/upgrade#301. Can you please provide the output of these commands:

ls -alh /etc/apt/sources.list.d
apt policy pipewire gstreamer1.0-pipewire libpipewire-0.3-0 libpipewire-0.3-dev pipewire-audio-client-libraries pipewire-media-session pipewire-tests pipewire-pulse pipewire-pulse:i386

This Pop!_OS PipeWire package is only for version 22.04, so if you're still on 21.10, then the issue is not with this repository (it sounds like pop-upgrade is the correct repository if it started when you attempted to upgrade.)

@jacobgkau
Copy link
Member

The way to fix this is going to be similar to this comment, you just need to specify compatible version numbers for each of the packages that apt is complaining about.

@johnsistiiv
Copy link
Author

This does look like the issue you've linked. Not sure how I missed that one.

$ ls -alh /etc/apt/sources.list.d
total 56K
drwxr-xr-x 2 root root 4.0K Jun  4 12:10 .
drwxr-xr-x 7 root root 4.0K Jun  4 12:10 ..
-rw-r--r-- 1 root root  186 Jun  4 12:10 openfoam.list
-rw-r--r-- 1 root root  186 Jun  4 12:10 openfoam.list.save
-rw-r--r-- 1 root root  174 Jun  4 12:10 pipewire-debian-ubuntu-pipewire-upstream-hirsute.list
-rw-r--r-- 1 root root  172 Jun  4 12:10 pipewire-debian-ubuntu-pipewire-upstream-hirsute.list.save
-rw-r--r-- 1 root root  180 Jun  4 12:10 pipewire-debian-ubuntu-wireplumber-upstream-impish.list
-rw-r--r-- 1 root root  178 Jun  4 12:10 pipewire-debian-ubuntu-wireplumber-upstream-impish.list.save
-rw-r--r-- 1 root root  124 Jun  4 12:10 pop-os-apps.sources
-rw-r--r-- 1 root root  124 Jun  4 12:10 pop-os-apps.sources.save
-rw-r--r-- 1 root root  139 Jun  4 12:10 pop-os-release.sources
-rw-r--r-- 1 root root  139 Jun  4 12:10 pop-os-release.sources.save
-rw-r--r-- 1 root root  287 Jun  4 12:10 system.sources
-rw-r--r-- 1 root root  287 Jun  4 12:10 system.sources.save
$ apt policy pipewire gstreamer1.0-pipewire libpipewire-0.3-0 libpipewire-0.3-dev pipewire-audio-client-libraries pipewire-media-session pipewire-tests pipewire-pulse pipewire-pulse:i386
pipewire:
  Installed: 0.3.32-1
  Candidate: 0.3.32-1
  Version table:
 *** 0.3.32-1 500
        500 http://us.archive.ubuntu.com/ubuntu impish/main amd64 Packages
        100 /var/lib/dpkg/status
gstreamer1.0-pipewire:
  Installed: 0.3.51-1~ubuntu21.10
  Candidate: 0.3.51-1~ubuntu21.10
  Version table:
 *** 0.3.51-1~ubuntu21.10 100
        100 /var/lib/dpkg/status
     0.3.32-1 500
        500 http://us.archive.ubuntu.com/ubuntu impish/main amd64 Packages
libpipewire-0.3-0:
  Installed: 0.3.32-1
  Candidate: 0.3.32-1
  Version table:
 *** 0.3.32-1 500
        500 http://us.archive.ubuntu.com/ubuntu impish/main amd64 Packages
        100 /var/lib/dpkg/status
libpipewire-0.3-dev:
  Installed: 0.3.51-1~ubuntu21.10
  Candidate: 0.3.51-1~ubuntu21.10
  Version table:
 *** 0.3.51-1~ubuntu21.10 100
        100 /var/lib/dpkg/status
     0.3.32-1 500
        500 http://us.archive.ubuntu.com/ubuntu impish/main amd64 Packages
pipewire-audio-client-libraries:
  Installed: 0.3.51-1~ubuntu21.10
  Candidate: 0.3.51-1~ubuntu21.10
  Version table:
 *** 0.3.51-1~ubuntu21.10 100
        100 /var/lib/dpkg/status
     0.3.32-1 500
        500 http://us.archive.ubuntu.com/ubuntu impish/universe amd64 Packages
pipewire-media-session:
  Installed: 0.4.1.r10.gf715063-1~ubuntu21.10
  Candidate: 0.4.1.r10.gf715063-1~ubuntu21.10
  Version table:
 *** 0.4.1.r10.gf715063-1~ubuntu21.10 100
        100 /var/lib/dpkg/status
     0.3.32-1 500
        500 http://us.archive.ubuntu.com/ubuntu impish/main amd64 Packages
pipewire-tests:
  Installed: 0.3.51-1~ubuntu21.10
  Candidate: 0.3.51-1~ubuntu21.10
  Version table:
 *** 0.3.51-1~ubuntu21.10 100
        100 /var/lib/dpkg/status
     0.3.32-1 500
        500 http://us.archive.ubuntu.com/ubuntu impish/universe amd64 Packages
pipewire-pulse:
  Installed: 0.3.32-1
  Candidate: 0.3.32-1
  Version table:
 *** 0.3.32-1 500
        500 http://us.archive.ubuntu.com/ubuntu impish/universe amd64 Packages
        100 /var/lib/dpkg/status
pipewire-pulse:i386:
  Installed: (none)
  Candidate: 0.3.32-1
  Version table:
     0.3.32-1 500
        500 http://us.archive.ubuntu.com/ubuntu impish/universe i386 Packages

I tried the following:

$ sudo apt install libpipewire=0.3.51-1~ubuntu21.10 pipewire=0.3.51-1~ubuntu21.10
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package pipewire is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
  pipewire-audio-client-libraries pipewire-audio-client-libraries:i386 pipewire-bin:i386 pipewire:i386
  libspa-0.2-modules:i386 libpipewire-0.3-modules:i386 pipewire-bin libspa-0.2-modules libpipewire-0.3-modules

E: Unable to locate package libpipewire
E: Version '0.3.51-1~ubuntu21.10' for 'pipewire' was not found

@johnsistiiv
Copy link
Author

Fixed a typo in my command and used all the replaced packages in the following:

$ sudo apt install libpipewire-0.3-0:i386 pipewire-audio-client-libraries pipewire-audio-client-libraries:i386 pipewire-bin:i386 pipewire:i386 libspa-0.2-modules:i386 libpipewire-0.3-modules:i386 pipewire-bin libspa-0.2-modules libpipewire-0.3-modules
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
libpipewire-0.3-modules is already the newest version (0.3.32-1).
libspa-0.2-modules is already the newest version (0.3.32-1).
pipewire-bin is already the newest version (0.3.32-1).
pipewire-audio-client-libraries is already the newest version (0.3.51-1~ubuntu21.10).
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 gstreamer1.0-pipewire : Depends: pipewire (= 0.3.51-1~ubuntu21.10) but 0.3.32-1 is to be installed
                         Depends: libpipewire-0.3-0 (= 0.3.51-1~ubuntu21.10) but 0.3.32-1 is to be installed
 libpipewire-0.3-0:i386 : Depends: libc6:i386 (>= 2.33) but it is not going to be installed
 libpipewire-0.3-dev : Depends: libpipewire-0.3-0 (= 0.3.51-1~ubuntu21.10) but 0.3.32-1 is to be installed
 libpipewire-0.3-modules:i386 : Depends: libc6:i386 (>= 2.33) but it is not going to be installed
                                Depends: libdbus-1-3:i386 (>= 1.9.14) but it is not going to be installed
                                Depends: libgcc-s1:i386 (>= 3.0) but it is not going to be installed
                                Depends: libpulse0:i386 (>= 11.1) but it is not going to be installed
                                Depends: libstdc++6:i386 (>= 5) but it is not going to be installed
                                Depends: libsystemd0:i386 but it is not going to be installed
                                Depends: libwebrtc-audio-processing1:i386 but it is not going to be installed
 libspa-0.2-modules:i386 : Depends: libasound2:i386 (>= 1.2.1.1) but it is not going to be installed
                           Depends: libc6:i386 (>= 2.33) but it is not going to be installed
                           Depends: libdbus-1-3:i386 (>= 1.9.14) but it is not going to be installed
                           Depends: libsystemd0:i386 but it is not going to be installed
                           Depends: libudev1:i386 (>= 183) but it is not going to be installed
 pipewire-audio-client-libraries : Depends: pipewire (= 0.3.51-1~ubuntu21.10) but 0.3.32-1 is to be installed
                                   Depends: libpipewire-0.3-0 (= 0.3.51-1~ubuntu21.10) but 0.3.32-1 is to be installed
                                   Breaks: pipewire-audio-client-libraries:i386 (!= 0.3.51-1~ubuntu21.10) but 0.3.32-1 is to be installed
 pipewire-audio-client-libraries:i386 : Depends: libasound2:i386 (>= 1.1.7) but it is not going to be installed
                                        Depends: libc6:i386 (>= 2.17) but it is not going to be installed
                                        Breaks: pipewire-audio-client-libraries (!= 0.3.32-1) but 0.3.51-1~ubuntu21.10 is to be installed
 pipewire-bin : Conflicts: pipewire-bin:i386
 pipewire-bin:i386 : Depends: libasound2:i386 (>= 1.2.1.1) but it is not going to be installed
                     Depends: libc6:i386 (>= 2.33) but it is not going to be installed
                     Depends: libdbus-1-3:i386 (>= 1.9.14) but it is not going to be installed
                     Depends: libncursesw6:i386 (>= 6) but it is not going to be installed
                     Depends: libsndfile1:i386 (>= 1.0.20) but it is not going to be installed
                     Depends: libtinfo6:i386 (>= 6) but it is not going to be installed
                     Conflicts: pipewire-bin
 pipewire-media-session : Depends: pipewire (>= 0.3.39) but 0.3.32-1 is to be installed
                          Depends: libpipewire-0.3-0 (>= 0.3.39) but 0.3.32-1 is to be installed
                          Breaks: pipewire-pulse (< 0.3.39-1)
                          Breaks: pipewire-pulse:i386 (< 0.3.39-1)
 pipewire-tests : Depends: pipewire (= 0.3.51-1~ubuntu21.10) but 0.3.32-1 is to be installed
                  Depends: libpipewire-0.3-0 (= 0.3.51-1~ubuntu21.10) but 0.3.32-1 is to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

@johnsistiiv
Copy link
Author

As the linked comment suggested (with a few extra packages not listed in my first error), I appeared to have fixed it with:

sudo apt install gstreamer1.0-pipewire=0.3.32-1 libpipewire-0.3-dev=0.3.32-1 pipewire-media-session=0.3.32-1 pipewire-audio-client-libraries=0.3.32-1 pipewire-tests=0.3.32-1 libspa-0.2-dev=0.3.32-1

It appears I can now use the Pop!Shop to upgrade OS.

mmstick pushed a commit that referenced this issue Jul 1, 2022
`client::name` points to a string that is owned by `client::props`,
so when the property list is updated, it needs to be refreshed as well.
Otherwise, various use-after-frees can be triggered, for example:

==1471586==ERROR: AddressSanitizer: heap-use-after-free on address 0x60200007e7d0 at pc 0x7f14390755d0 bp 0x7ffe23edee30 sp 0x7ffe23ede5a8
READ of size 3 at 0x60200007e7d0 thread T0
    #0 0x7f14390755cf in printf_common /usr/src/debug/gcc/libsanitizer/sanitizer_common/sanitizer_common_interceptors_format.inc:553
    #1 0x7f1439077215 in __interceptor_vsnprintf /usr/src/debug/gcc/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:1665
    #2 0x7f1434ead47d in spa_vscnprintf ../spa/include/spa/utils/string.h:239
    #3 0x7f1434eae2ae in impl_log_logtv ../spa/plugins/support/logger.c:138
    #4 0x7f14385cacc7 in pw_log_logt ../src/pipewire/log.c:135
    #5 0x7f1433aef8e9 in do_set_profile ../src/modules/module-protocol-pulse/pulse-server.c:4656
    #6 0x7f1433b0af4d in handle_packet ../src/modules/module-protocol-pulse/server.c:109
    #7 0x7f1433b0e747 in do_read ../src/modules/module-protocol-pulse/server.c:276
    #8 0x7f1433b0eb04 in on_client_data ../src/modules/module-protocol-pulse/server.c:306
    #9 0x7f1434ec56a0 in source_io_func ../spa/plugins/support/loop.c:442
    #10 0x7f1434ec4a21 in loop_iterate ../spa/plugins/support/loop.c:430
    #11 0x7f14385dc23d in pw_main_loop_run ../src/pipewire/main-loop.c:148
    #12 0x55b065d73722 in main ../src/daemon/pipewire.c:131
    #13 0x7f143742928f  (/usr/lib/libc.so.6+0x2928f)
    #14 0x7f1437429349 in __libc_start_main (/usr/lib/libc.so.6+0x29349)
    #15 0x55b065d722a4 in _start (./src/daemon/pipewire-pulse+0x42a4)

0x60200007e7d0 is located 0 bytes inside of 16-byte region [0x60200007e7d0,0x60200007e7e0)
freed by thread T0 here:
    #0 0x7f14390be672 in __interceptor_free /usr/src/debug/gcc/libsanitizer/asan/asan_malloc_linux.cpp:52
    #1 0x7f14386a775a in do_replace ../src/pipewire/properties.c:414
    #2 0x7f14386a785e in pw_properties_set ../src/pipewire/properties.c:441
    #3 0x7f14386a658b in pw_properties_update ../src/pipewire/properties.c:309
    #4 0x7f1433adb055 in do_update_proplist ../src/modules/module-protocol-pulse/pulse-server.c:3246
    #5 0x7f1433b0af4d in handle_packet ../src/modules/module-protocol-pulse/server.c:109
    #6 0x7f1433b0e747 in do_read ../src/modules/module-protocol-pulse/server.c:276
    #7 0x7f1433b0eb04 in on_client_data ../src/modules/module-protocol-pulse/server.c:306
    #8 0x7f1434ec56a0 in source_io_func ../spa/plugins/support/loop.c:442
    #9 0x7f1434ec4a21 in loop_iterate ../spa/plugins/support/loop.c:430
    #10 0x7f14385dc23d in pw_main_loop_run ../src/pipewire/main-loop.c:148
    #11 0x55b065d73722 in main ../src/daemon/pipewire.c:131
    #12 0x7f143742928f  (/usr/lib/libc.so.6+0x2928f)

previously allocated by thread T0 here:
    #0 0x7f1439072faa in __interceptor_strdup /usr/src/debug/gcc/libsanitizer/asan/asan_interceptors.cpp:439
    #1 0x7f14386a6fe2 in do_replace ../src/pipewire/properties.c:394
    #2 0x7f14386a785e in pw_properties_set ../src/pipewire/properties.c:441
    #3 0x7f1433a6c52d in read_props ../src/modules/module-protocol-pulse/message.c:147
    #4 0x7f1433a6f467 in message_get ../src/modules/module-protocol-pulse/message.c:359
    #5 0x7f1433ab3191 in do_set_client_name ../src/modules/module-protocol-pulse/pulse-server.c:1030
    #6 0x7f1433b0af4d in handle_packet ../src/modules/module-protocol-pulse/server.c:109
    #7 0x7f1433b0e747 in do_read ../src/modules/module-protocol-pulse/server.c:276
    #8 0x7f1433b0eb04 in on_client_data ../src/modules/module-protocol-pulse/server.c:306
    #9 0x7f1434ec56a0 in source_io_func ../spa/plugins/support/loop.c:442
    #10 0x7f1434ec4a21 in loop_iterate ../spa/plugins/support/loop.c:430
    #11 0x7f14385dc23d in pw_main_loop_run ../src/pipewire/main-loop.c:148
    #12 0x55b065d73722 in main ../src/daemon/pipewire.c:131
    #13 0x7f143742928f  (/usr/lib/libc.so.6+0x2928f)
mmstick pushed a commit that referenced this issue Dec 30, 2022
It is not enough for `buffer` to be alive in its current
scope because when execution enters that branch, `format`
will be set to `fmt`, which points inside `buffer`. And
since `format` is used outside that scope, `buffer` must
live longer.

This was detected by ASAN when Audacity was starting up.

  ==25007==ERROR: AddressSanitizer: stack-use-after-scope on address 0x7ffdbcfef560 at pc 0x7fe44ca95db3 bp 0x7ffdbcfeeda0 sp 0x7ffdbcfeed90
  READ of size 4 at 0x7ffdbcfef560 thread T0
      #0 0x7fe44ca95db2 in spa_pod_parser_pod ../spa/include/spa/pod/parser.h:67
      #1 0x7fe44ca9a805 in spa_format_parse ../spa/include/spa/param/format-utils.h:44
      #2 0x7fe44cad293a in port_set_format ../spa/plugins/audioconvert/audioconvert.c:1934
      #3 0x7fe44cadad14 in impl_node_port_set_param ../spa/plugins/audioconvert/audioconvert.c:2038
      #4 0x7fe44ca587e2 in configure_format ../spa/plugins/audioconvert/audioadapter.c:509
      #5 0x7fe44ca60dff in negotiate_format ../spa/plugins/audioconvert/audioadapter.c:822
      #6 0x7fe44ca62bbf in impl_node_send_command ../spa/plugins/audioconvert/audioadapter.c:846
      #7 0x7fe45ea1c2f1 in node_update_state ../src/pipewire/impl-node.c:407
      #8 0x7fe45ea5137e in pw_impl_node_set_state ../src/pipewire/impl-node.c:2251
      #9 0x7fe45eb3355f in pw_work_queue_destroy ../src/pipewire/work-queue.c:142
      #10 0x7fe45b2cd6f4 in source_event_func ../spa/plugins/support/loop.c:615
      #11 0x7fe45b2c634f in loop_iterate ../spa/plugins/support/loop.c:452
      #12 0x7fe45e9ebebc in spa_hook_list_clean ../spa/include/spa/utils/hook.h:395
      #13 0x5561e03dc722 in main ../src/daemon/pipewire.c:131
      #14 0x7fe45da3c28f  (/usr/lib/libc.so.6+0x2328f)
      #15 0x7fe45da3c349 in __libc_start_main (/usr/lib/libc.so.6+0x23349)
      #16 0x5561e03db2a4 in _start ../sysdeps/x86_64/start.S:115

  Address 0x7ffdbcfef560 is located in stack of thread T0 at offset 160 in frame
      #0 0x7fe44ca56fa9 in configure_format ../spa/plugins/audioconvert/audioadapter.c:475

    This frame has 4 object(s):
      [32, 36) 'state' (line 493)
      [48, 56) 'fmt' (line 494)
      [80, 128) 'b' (line 492)
      [160, 4256) 'buffer' (line 491) <== Memory access at offset 160 is inside this variable
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

2 participants