Morganamilo / paru

Feature packed AUR helper
GNU General Public License v3.0
6.26k stars 237 forks source link

Panic when update #652

Closed Aetf closed 2 years ago

Aetf commented 2 years ago

Affected Version

paru -V: paru v1.9.2 - libalpm v13.0.1

Also affects latest master commit: 501e0ba

Description

I have the local AUR repository and chroot build enabled. Today, when doing a normal paru -Syu, I wanted to skip the AUR package upgrade temporarily, and the panic occurs.

Have you checked previous issues? Not found in open issues.

Output

Output when running from source to show backtrace:

$ RUST_BACKTRACE=full cargo run
    Finished dev [unoptimized + debuginfo] target(s) in 0.09s
     Running `target/debug/paru`
no new news
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 community is up to date
 aur is up to date
 multilib is up to date
:: Looking for AUR upgrades
:: Looking for devel upgrades
9 extra/alsa-card-profiles  1:0.3.43-1       -> 1:0.3.43-5
8 extra/libical             3.0.12-1         -> 3.0.13-1
7 extra/pipewire            1:0.3.43-1       -> 1:0.3.43-5
6 extra/pipewire-alsa       1:0.3.43-1       -> 1:0.3.43-5
5 extra/pipewire-jack       1:0.3.43-1       -> 1:0.3.43-5
4 extra/pipewire-pulse      1:0.3.43-1       -> 1:0.3.43-5
3 community/crun            1.4-1            -> 1.4.1-1
2 community/fuse-overlayfs  1.8-1            -> 1.8.1-1
1 aur/latte-dock-git        r5852.2b039e12-1 -> r5853.e326dddb-1
:: Packages to exclude (eg: 1 2 3, 1-3):
:: 1
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: PkgNotFound', /dev/shm/aetf/workspace/paru/src/upgrade.rs:340:46
stack backtrace:
   0:     0x56272a17bbfc - std::backtrace_rs::backtrace::libunwind::trace::hf6a6dfd7da937cb0
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/../../backtrace/src/backtrace/libunwind.rs:90:5
   1:     0x56272a17bbfc - std::backtrace_rs::backtrace::trace_unsynchronized::hc596a19e4891f7f3
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x56272a17bbfc - std::sys_common::backtrace::_print_fmt::hb16700db31584325
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/sys_common/backtrace.rs:67:5
   3:     0x56272a17bbfc - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h231c4190cfa75162
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/sys_common/backtrace.rs:46:22
   4:     0x56272a1a2d6c - core::fmt::write::h2a1462b5f8eea807
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/core/src/fmt/mod.rs:1163:17
   5:     0x56272a173d75 - std::io::Write::write_fmt::h71ddfebc68685972
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/io/mod.rs:1696:15
   6:     0x56272a17dd80 - std::sys_common::backtrace::_print::hcc197d4bebf2b369
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/sys_common/backtrace.rs:49:5
   7:     0x56272a17dd80 - std::sys_common::backtrace::print::h335a66af06738c7c
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/sys_common/backtrace.rs:36:9
   8:     0x56272a17dd80 - std::panicking::default_hook::{{closure}}::h6fac9ac9c8b79e52
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/panicking.rs:210:50
   9:     0x56272a17d935 - std::panicking::default_hook::h341c1030c6a1161b
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/panicking.rs:227:9
  10:     0x56272a17e434 - std::panicking::rust_panic_with_hook::h50680ff4b44510c6
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/panicking.rs:624:17
  11:     0x56272a17df10 - std::panicking::begin_panic_handler::{{closure}}::h9371c0fbb1e8465a
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/panicking.rs:521:13
  12:     0x56272a17c0a4 - std::sys_common::backtrace::__rust_end_short_backtrace::h9b3efa22a5768c0f
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/sys_common/backtrace.rs:139:18
  13:     0x56272a17de79 - rust_begin_unwind
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/panicking.rs:517:5
  14:     0x56272934b921 - core::panicking::panic_fmt::h23b9203e89cc61cf
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/core/src/panicking.rs:100:14
  15:     0x56272934ba13 - core::result::unwrap_failed::h32ef6b3156e8fc57
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/core/src/result.rs:1616:5
  16:     0x562729437316 - core::result::Result<T,E>::unwrap::hbddf4d50c96f1b22
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/core/src/result.rs:1298:23
  17:     0x5627294c556f - paru::upgrade::get_upgrades::{{closure}}::h8caf7a85ebad722a
                               at /dev/shm/aetf/workspace/paru/src/upgrade.rs:340:22
  18:     0x5627294fc539 - <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::h211393bfa3cd1e95
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/core/src/future/mod.rs:80:19
  19:     0x56272935aeb2 - paru::install::install::{{closure}}::h97e2e8c42247332c
                               at /dev/shm/aetf/workspace/paru/src/install.rs:394:24
  20:     0x5627294febb1 - <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::h9b961367bf823b01
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/core/src/future/mod.rs:80:19
  21:     0x5627293a5b02 - paru::handle_sync::{{closure}}::ha55631046c856926
                               at /dev/shm/aetf/workspace/paru/src/lib.rs:275:9
  22:     0x5627294ff191 - <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::ha5146b55422fb2e0
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/core/src/future/mod.rs:80:19
  23:     0x5627293a29dc - paru::handle_cmd::{{closure}}::h86ad6d06ab1d10a7
                               at /dev/shm/aetf/workspace/paru/src/lib.rs:167:21
  24:     0x5627294fe8b1 - <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::h8b49d402dabf959c
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/core/src/future/mod.rs:80:19
  25:     0x5627293a8174 - paru::run2::{{closure}}::hacf1925456edc0ec
                               at /dev/shm/aetf/workspace/paru/src/lib.rs:153:5
  26:     0x5627294ffab1 - <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::hb6d66ce2d1550ad1
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/core/src/future/mod.rs:80:19
  27:     0x5627293a73e2 - paru::run::{{closure}}::h4f737d2a84428ee7
                               at /dev/shm/aetf/workspace/paru/src/lib.rs:131:11
  28:     0x5627294feca9 - <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::h9d557788557174c7
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/core/src/future/mod.rs:80:19
  29:     0x5627293a9a5c - paru::main::{{closure}}::h659493f46aba2ae0
                               at /dev/shm/aetf/workspace/paru/src/main.rs:7:15
  30:     0x5627294fcb1b - <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::h38d4e4b9e7805e3c
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/core/src/future/mod.rs:80:19
  31:     0x56272953dbd0 - tokio::park::thread::CachedParkThread::block_on::{{closure}}::hef02fe640d1b7af2
                               at /home/aetf/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.14.0/src/park/thread.rs:263:54
  32:     0x56272936bf10 - tokio::coop::with_budget::{{closure}}::hb4dbd349d376d15a
                               at /home/aetf/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.14.0/src/coop.rs:106:9
  33:     0x562729425908 - std::thread::local::LocalKey<T>::try_with::h2989de46ea651a45
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/thread/local.rs:399:16
  34:     0x5627294256cd - std::thread::local::LocalKey<T>::with::h9a2036716fc7cdff
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/thread/local.rs:375:9
  35:     0x56272953da4c - tokio::coop::with_budget::h5cf785c69047e85d
                               at /home/aetf/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.14.0/src/coop.rs:99:5
  36:     0x56272953da4c - tokio::coop::budget::h87f79db59e80e1e1
                               at /home/aetf/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.14.0/src/coop.rs:76:5
  37:     0x56272953da4c - tokio::park::thread::CachedParkThread::block_on::hdf71214d226eba7a
                               at /home/aetf/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.14.0/src/park/thread.rs:263:31
  38:     0x5627294a6af9 - tokio::runtime::enter::Enter::block_on::h5788ebc6ef6d9509
                               at /home/aetf/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.14.0/src/runtime/enter.rs:151:13
  39:     0x56272936dfee - tokio::runtime::thread_pool::ThreadPool::block_on::hf7c358b97d42fcb0
                               at /home/aetf/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.14.0/src/runtime/thread_pool/mod.rs:77:9
  40:     0x5627295186a3 - tokio::runtime::Runtime::block_on::h1ddafc424081b9cf
                               at /home/aetf/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.14.0/src/runtime/mod.rs:463:43
  41:     0x5627295188d2 - paru::main::hd8cd0daf46105e9e
                               at /dev/shm/aetf/workspace/paru/src/main.rs:8:5
  42:     0x56272940d65b - core::ops::function::FnOnce::call_once::h62a235c12bb2f731
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/core/src/ops/function.rs:227:5
  43:     0x56272949d87e - std::sys_common::backtrace::__rust_begin_short_backtrace::h5d3903ba65c1414a
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/sys_common/backtrace.rs:123:18
  44:     0x5627295675e1 - std::rt::lang_start::{{closure}}::h87beb758c530fb47
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/rt.rs:146:18
  45:     0x56272a17b8db - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::hc56adab7a77ec6e3
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/core/src/ops/function.rs:259:13
  46:     0x56272a17b8db - std::panicking::try::do_call::h29f013120c5abc65
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/panicking.rs:403:40
  47:     0x56272a17b8db - std::panicking::try::h86d5b2b66caec4cf
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/panicking.rs:367:19
  48:     0x56272a17b8db - std::panic::catch_unwind::h7dd136d787f51397
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/panic.rs:133:14
  49:     0x56272a17b8db - std::rt::lang_start_internal::{{closure}}::h4a199351e630a8a5
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/rt.rs:128:48
  50:     0x56272a17b8db - std::panicking::try::do_call::h20ceb9e5dff838c6
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/panicking.rs:403:40
  51:     0x56272a17b8db - std::panicking::try::hc2abb46a5e41bd43
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/panicking.rs:367:19
  52:     0x56272a17b8db - std::panic::catch_unwind::h52c3eb4408ad6dfb
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/panic.rs:133:14
  53:     0x56272a17b8db - std::rt::lang_start_internal::hd15a47be08101c28
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/rt.rs:128:20
  54:     0x5627295675b0 - std::rt::lang_start::h273ed34ede32d69e
                               at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/rt.rs:145:17
  55:     0x56272951896c - main
  56:     0x7fd445db8b25 - __libc_start_main
  57:     0x56272934c11e - _start
  58:                0x0 - <unknown>

I have no ~/.config/paru/paru.conf, only /etc/paru.conf

#
# $PARU_CONF
# /etc/paru.conf
# ~/.config/paru/paru.conf
#
# See the paru.conf(5) manpage for options

#
# GENERAL OPTIONS
#
[options]
PgpFetch
Devel
Provides
DevelSuffixes = -git -cvs -svn -bzr -darcs -always -hg
#AurOnly
#BottomUp
#RemoveMake
#SudoLoop
#UseAsk
#SaveChanges
#CombinedUpgrade
#CleanAfter
#UpgradeMenu
#NewsOnUpgrade

#LocalRepo
#Chroot
#Sign
#SignDb

#
# Binary OPTIONS
#
#[bin]
#FileManager = vifm
#MFlags = --skippgpcheck
#Sudo = doas
# BEGIN ANSIBLE MANAGED BLOCK
# Custom options from ansible
[options]
BottomUp
RemoveMake
SudoLoop
CombinedUpgrade
CleanAfter
UpgradeMenu
NewsOnUpgrade
LocalRepo
Chroot
# END ANSIBLE MANAGED BLOCK

My pacman.conf is splitted across multiple files: /etc/pacman.conf

#
# /etc/pacman.conf
#
# See the pacman.conf(5) manpage for option and repository directives

#
# GENERAL OPTIONS
#
[options]
# The following paths are commented out with their default values listed.
# If you wish to use different paths, uncomment and update the paths.
#RootDir     = /
#DBPath      = /var/lib/pacman/
CacheDir    = /var/cache/pacman/pkg/
#LogFile     = /var/log/pacman.log
#GPGDir      = /etc/pacman.d/gnupg/
#HookDir     = /etc/pacman.d/hooks/
HoldPkg     = pacman glibc
#XferCommand = /usr/bin/curl -L -C - -f -o %o %u
#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
#CleanMethod = KeepInstalled
Architecture = auto

# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup
#IgnorePkg   =
#IgnoreGroup =

#NoUpgrade   =
#NoExtract   =

# Misc options
#UseSyslog
#Color
#NoProgressBar
CheckSpace
#VerbosePkgLists
#ParallelDownloads = 5

# By default, pacman accepts packages signed by keys that its local keyring
# trusts (see pacman-key and its man page), as well as unsigned packages.
SigLevel    = Required DatabaseOptional
LocalFileSigLevel = Optional
#RemoteFileSigLevel = Required

# NOTE: You must run `pacman-key --init` before first using pacman; the local
# keyring can then be populated with the keys of all official Arch Linux
# packagers with `pacman-key --populate archlinux`.

#
# REPOSITORIES
#   - can be defined here or included from another file
#   - pacman will search repositories in the order defined here
#   - local/custom mirrors can be added here or in separate files
#   - repositories listed first will take precedence when packages
#     have identical names, regardless of version number
#   - URLs will have $repo replaced by the name of the current repo
#   - URLs will have $arch replaced by the name of the architecture
#
# Repository entries are of the format:
#       [repo-name]
#       Server = ServerName
#       Include = IncludePath
#
# The header [repo-name] is crucial - it must be present and
# uncommented to enable the repo.
#

# The testing repositories are disabled by default. To enable, uncomment the
# repo name header and Include lines. You can add preferred servers immediately
# after the header, and they will be used before the default mirrors.

#[testing]
#Include = /etc/pacman.d/mirrorlist

[core]
Include = /etc/pacman.d/mirrorlist

[extra]
Include = /etc/pacman.d/mirrorlist

#[community-testing]
#Include = /etc/pacman.d/mirrorlist

[community]
Include = /etc/pacman.d/mirrorlist

# If you want to run 32 bit applications on your x86_64 system,
# enable the multilib repositories as required here.

#[multilib-testing]
#Include = /etc/pacman.d/mirrorlist

#[multilib]
#Include = /etc/pacman.d/mirrorlist

# An example of a custom package repository.  See the pacman manpage for
# tips on creating your own repositories.
#[custom]
#SigLevel = Optional TrustAll
#Server = file:///home/custompkgs
# BEGIN ANSIBLE MANAGED BLOCK
# Custom options
[options]
Include = /etc/pacman.d/confs/*.conf
# END ANSIBLE MANAGED BLOCK
$ cat /etc/pacman.d/confs/*.conf
# Enable fancier output for pacman
[options]
Color
VerbosePkgLists
ILoveCandy
# maintained by repo-add and paru --chroot
[options]
# this will append to existing list
CacheDir = /var/lib/repo/aur

[aur]
SigLevel = Never
Server = file:///var/lib/repo/aur
# do not require database signature, no repo provides them anyway
[options]
SigLevel    = Required DatabaseNever
# BEGIN ANSIBLE MANAGED BLOCK
[options]
NoExtract = usr/share/vulkan/icd.d/nvidia_icd.json
# END ANSIBLE MANAGED BLOCK
# syslinux is installed as a dependency of libguestfs, but we do not use it as a bootloader for host os
# so do not let it pollute /boot
[options]
NoExtract = boot/syslinux/*
# Enable parallel downloads
[options]
ParallelDownloads = 5
[multilib]
Include = /etc/pacman.d/mirrorlist
Aetf commented 2 years ago

Actually, even when not skip upgrading the aur package, the same panic happens:

$ RUST_BACKTRACE=full cargo run
    Finished dev [unoptimized + debuginfo] target(s) in 0.09s
     Running `target/debug/paru`
no new news
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 community is up to date
 aur is up to date
 multilib is up to date
:: Looking for AUR upgrades
:: Looking for devel upgrades
9 extra/alsa-card-profiles  1:0.3.43-1       -> 1:0.3.43-5
8 extra/libical             3.0.12-1         -> 3.0.13-1
7 extra/pipewire            1:0.3.43-1       -> 1:0.3.43-5
6 extra/pipewire-alsa       1:0.3.43-1       -> 1:0.3.43-5
5 extra/pipewire-jack       1:0.3.43-1       -> 1:0.3.43-5
4 extra/pipewire-pulse      1:0.3.43-1       -> 1:0.3.43-5
3 community/crun            1.4-1            -> 1.4.1-1
2 community/fuse-overlayfs  1.8-1            -> 1.8.1-1
1 aur/latte-dock-git        r5852.2b039e12-1 -> r5853.e326dddb-1
:: Packages to exclude (eg: 1 2 3, 1-3):
:: 
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: PkgNotFound', /dev/shm/aetf/workspace/paru/src/upgrade.rs:340:46
Aetf commented 2 years ago

To provide more context, I think this may be related to the previous paru -Syu run, where in addition to those pipewire updates in the offical repos, there are extra-cmake-modules-git and latte-dock-git from AUR.

However, this run of paru failed because pipewire-jack now conflicts with jack2, and paru automatically failed the prompt without me getting a chance to confirm the removal:

:: Starting full system upgrade...
resolving dependencies...
looking for conflicting packages...
:: pipewire-jack and jack2 are in conflict (jack). Remove jack2? [y/N]
error: unresolvable package conflicts detected
error: failed to prepare transaction (conflicting dependencies)
:: pipewire-jack and jack2 are in conflict

Now wondering why I didn't get a chance to confirm, I rerun parun -Syu and got the panic reported in the beginning.

Morganamilo commented 2 years ago

You paru conf shows the local repo options commented out. Is that correct?

Aetf commented 2 years ago

It's enabled at the bottom:

# Custom options from ansible
[options]
BottomUp
RemoveMake
SudoLoop
CombinedUpgrade
CleanAfter
UpgradeMenu
NewsOnUpgrade
LocalRepo
Chroot
# END ANSIBLE MANAGED BLOCK
Morganamilo commented 2 years ago

Oh right i saw the [bin] line and glossed over. Doesn't matter, fixed it anyway :P