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

paru -Syu will lock up with a mem-leak (?) when looking for devel updates #360

Closed
Taijian opened this issue May 6, 2021 · 40 comments
Closed

Comments

@Taijian
Copy link

Taijian commented May 6, 2021

Affected Version

paru v1.6.1 - libalpm v12.0.2

Description

When invoking paru -Syu, execution of paru will stall at the Looking for devel upgrades stage. One CPU core will be utilized at 100% while RAM usage will start to climb indefinitely (until OOM hits).

I am using a local repo for my AUR packages, which is configured in paru.conf and has been working fine until the latest update.

Output

~/.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
#BottomUp
RemoveMake
SudoLoop
#UseAsk
#CombinedUpgrade
CleanAfter
SortBy = popularity
NewsOnUpgrade
UpgradeMenu
BatchInstall
Rebuild = all
BuildDir = /home/gunnar/.cache/AUR
MovePkgs
LocalRepo = local_aur
Chroot = /home/gunnar/.chroot

Binary OPTIONS

#[bin]
#FileManager = vifm

@Morganamilo
Copy link
Owner

Morganamilo commented May 6, 2021

How many git packages do you have? Only thing I can think is you have so many it OMMs as they are all checked in parallel.

@Taijian
Copy link
Author

Taijian commented May 6, 2021

I currently have 9 (nine) -git packages installed. I also have 16 gigs of RAM and another 16 gigs of swap, so that would be some rather badly optimized routine that would fill that outside of a bug...

@Morganamilo
Copy link
Owner

Yeah 9 wont be anything close to cause that. Are you experienced with debugging? Could you get a backtrack?

@Taijian
Copy link
Author

Taijian commented May 6, 2021

Sure, if you could give me some pointers on what to do, I'll be happy to try to be helpful in debugging (can't guarantee I will, though, cause really not a software developer here...).

@Morganamilo
Copy link
Owner

While paru is running you can attach to it with GDB and print a backtrack with 'bt'. You'll need to run paru using cargo to get debugging symbols.

@Morganamilo
Copy link
Owner

Alternatively if you can limit how much ram paru is aloud to use it should panic from failure to allocate.

@Taijian
Copy link
Author

Taijian commented May 7, 2021

OK, because I do not know how to do the things you asked me to do, I instead did something I DO know how to do (don't you just love testers like me?...) - I ran a git bisect.

84d19af is the first bad commit
commit 84d19af
Author: morganamilo morganamilo@archlinux.org
Date: Sun May 2 22:48:48 2021 +0100

Refer to the right db in upgrade menu

Fixes #356

src/upgrade.rs | 19 +++++++++----------
1 file changed, 9 insertions(+), 10 deletions(-)

Anything prior to this one runs fine, anything after this will run 100% on one cpu core until all available memory is filled and then crash the session.

@Morganamilo
Copy link
Owner

Interesting. Does it still lock up with --nodevel?

@Morganamilo
Copy link
Owner

Oh and with --noupgrademenu?

@Taijian
Copy link
Author

Taijian commented May 7, 2021

--noupgrademenu works fine, --nodevel crashes.

@Morganamilo
Copy link
Owner

That's funny cause that commit only changed code in upgrade menu.

What's your pacman version? pacman -Q pacman

@Taijian
Copy link
Author

Taijian commented May 7, 2021

$ pacman -Q pacman
pacman 5.2.2-3

@Morganamilo
Copy link
Owner

And how about paru -Sua and paru -Su --repo? does one of those not crash?

@Taijian
Copy link
Author

Taijian commented May 7, 2021

paru -Su --repo is fine, the other one crashes. Which makes sense, because the crash always only occurs at the AUR stage, not before.

@Taijian
Copy link
Author

Taijian commented May 7, 2021

paru -Syu --repo is also fine, btw.

@Morganamilo
Copy link
Owner

My guess would be It's a bug in the AlpmLIstMut code in the alpm bindings. That's going to be a bit of a pain to find.

@Morganamilo
Copy link
Owner

Does it work on the debug branch? I changed the code to not call .retain in cause that is the buggy function.

@Taijian
Copy link
Author

Taijian commented May 7, 2021

$ paru -V
paru v1.6.0.r7.gdaf6f74 - libalpm v12.0.2

Sorry, no dice, still crashes... :(

@Morganamilo
Copy link
Owner

I don't think I can do much more unless you manage to get a backtrace of where it's stuck or get an mre.

@Taijian
Copy link
Author

Taijian commented May 7, 2021

OK, could you ELI5 for me how to get a backtrace, then?

@Morganamilo
Copy link
Owner

run paru, then in another terminal type gdb -tui --pid $(pgrep paru) and then in gdb type bt.

@Taijian
Copy link
Author

Taijian commented May 7, 2021

Attaching to process 252488
[New LWP 252489]
[New LWP 252490]
[New LWP 252491]
[New LWP 252492]
[New LWP 252493]
[New LWP 252494]
[New LWP 252495]
[New LWP 252496]
[New LWP 252504]
Error while reading shared library symbols for /usr/lib/libpthread.so.0:
Cannot find user-level thread for LWP 252504: generic error
--Type for more, q to quit, c to continue without paging--

This looks like it should be more helpful than it is.... What did I miss?

@Taijian
Copy link
Author

Taijian commented May 7, 2021

#0  0x000055c57fc3c7d0 in ?? ()
#1  0x000055c57fc548bf in ?? ()
#2  0x000055c57fc55362 in ?? ()
#3  0x000055c57fc3c6a4 in ?? ()
#4  0x000055c57fbf6195 in ?? ()
#5  0x000055c57fbfc2a9 in ?? ()
#6  0x000055c57fbc00ea in ?? ()
#7  0x000055c57fc1f08f in ?? ()
#8  0x000055c57fc06e13 in ?? ()
#9  0x000055c57fc051dd in ?? ()
#10 0x000055c57fb503c7 in ?? ()
#11 0x000055c57fc2c345 in ?? ()
#12 0x000055c57faee2e3 in ?? ()
#13 0x000055c57fc2da28 in ?? ()
#14 0x00007f5afa1a5b25 in __libc_start_main () from /usr/lib/libc.so.6

@Morganamilo
Copy link
Owner

Run paru through cargo. The package in the AUR is stripped of debugging symbols.

@Taijian
Copy link
Author

Taijian commented May 7, 2021

Ah, this is where that whole ELI5 comes in again. Because I have no idea how that works. :)

@Taijian
Copy link
Author

Taijian commented May 7, 2021

Would it work if I just compile it with !strip?

@trevorgunn
Copy link
Contributor

Run cargo run -- <pacman flags> inside the git repository.

@Morganamilo
Copy link
Owner

Would it work if I just compile it with !strip?

That would work.

Though if you don't know how to use cargo did you actually test the debug branch?

@Taijian
Copy link
Author

Taijian commented May 7, 2021

source=("git+https://github.com/morganamilo/paru.git#branch=debug") should work inside the PKGBUILD, sholdn't it?

@Taijian
Copy link
Author

Taijian commented May 7, 2021

Would it work if I just compile it with !strip?

That would work.

Though if you don't know how to use cargo did you actually test the debug branch?

Actually, it didn't...


Attaching to process 285886
[New LWP 285887]
[New LWP 285888]
[New LWP 285889]
[New LWP 285890]
[New LWP 285891]
[New LWP 285892]
[New LWP 285893]
[New LWP 285894]
[New LWP 285902]

warning: Dwarf Error: Cannot find DIE at 0x140ce referenced from DIE at 0x7167 [in module /usr/bin/paru]
Abgebrochen

@trevorgunn
Copy link
Contributor

The PKGBUILD compiles with --release which will affect the debug symbols; you should just run cargo run -- <pacman flags> manually.

@Taijian
Copy link
Author

Taijian commented May 7, 2021

     Running `target/debug/paru`
no new news
:: Synchronisiere Paketdatenbanken...
 local_aur ist aktuell
 core ist aktuell
 extra ist aktuell
 community ist aktuell
 multilib ist aktuell
:: Starte vollständige Systemaktualisierung...
 Es gibt nichts zu tun
:: Looking for AUR upgrades
:: Looking for devel upgrades
thread 'main' panicked at 'attempt to subtract with overflow', src/upgrade.rs:97:15
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

@Taijian
Copy link
Author

Taijian commented May 7, 2021

$ RUST_BACKTRACE=1 cargo run --
    Finished dev [unoptimized + debuginfo] target(s) in 0.08s
     Running `target/debug/paru`
no new news
:: Synchronisiere Paketdatenbanken...
 local_aur ist aktuell
 core ist aktuell
 extra ist aktuell
 community ist aktuell
 multilib ist aktuell
:: Starte vollständige Systemaktualisierung...
 Es gibt nichts zu tun
:: Looking for AUR upgrades
:: Looking for devel upgrades
thread 'main' panicked at 'attempt to subtract with overflow', src/upgrade.rs:97:15
stack backtrace:
   0: rust_begin_unwind
             at /build/rust/src/rustc-1.52.0-src/library/std/src/panicking.rs:493:5
   1: core::panicking::panic_fmt
             at /build/rust/src/rustc-1.52.0-src/library/core/src/panicking.rs:92:14
   2: core::panicking::panic
             at /build/rust/src/rustc-1.52.0-src/library/core/src/panicking.rs:50:5
   3: paru::upgrade::print_upgrade
             at ./src/upgrade.rs:97:15
   4: paru::upgrade::get_upgrades::{{closure}}
             at ./src/upgrade.rs:293:9
   5: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
             at /build/rust/src/rustc-1.52.0-src/library/core/src/future/mod.rs:80:19
   6: paru::install::install::{{closure}}
             at ./src/install.rs:347:24
   7: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
             at /build/rust/src/rustc-1.52.0-src/library/core/src/future/mod.rs:80:19
   8: paru::handle_sync::{{closure}}
             at ./src/main.rs:234:9
   9: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
             at /build/rust/src/rustc-1.52.0-src/library/core/src/future/mod.rs:80:19
  10: paru::handle_cmd::{{closure}}
             at ./src/main.rs:128:21
  11: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
             at /build/rust/src/rustc-1.52.0-src/library/core/src/future/mod.rs:80:19
  12: paru::run::{{closure}}
             at ./src/main.rs:114:5
  13: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
             at /build/rust/src/rustc-1.52.0-src/library/core/src/future/mod.rs:80:19
  14: paru::main2::{{closure}}
             at ./src/main.rs:92:11
  15: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
             at /build/rust/src/rustc-1.52.0-src/library/core/src/future/mod.rs:80:19
  16: paru::main::{{closure}}
             at ./src/main.rs:78:13
  17: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
             at /build/rust/src/rustc-1.52.0-src/library/core/src/future/mod.rs:80:19
  18: tokio::park::thread::CachedParkThread::block_on::{{closure}}
             at /home/gunnar/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.5.0/src/park/thread.rs:263:54
  19: tokio::coop::with_budget::{{closure}}
             at /home/gunnar/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.5.0/src/coop.rs:106:9
  20: std::thread::local::LocalKey<T>::try_with
             at /build/rust/src/rustc-1.52.0-src/library/std/src/thread/local.rs:272:16
  21: std::thread::local::LocalKey<T>::with
             at /build/rust/src/rustc-1.52.0-src/library/std/src/thread/local.rs:248:9
  22: tokio::coop::with_budget
             at /home/gunnar/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.5.0/src/coop.rs:99:5
  23: tokio::coop::budget
             at /home/gunnar/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.5.0/src/coop.rs:76:5
  24: tokio::park::thread::CachedParkThread::block_on
             at /home/gunnar/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.5.0/src/park/thread.rs:263:31
  25: tokio::runtime::enter::Enter::block_on
             at /home/gunnar/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.5.0/src/runtime/enter.rs:151:13
  26: tokio::runtime::thread_pool::ThreadPool::block_on
             at /home/gunnar/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.5.0/src/runtime/thread_pool/mod.rs:71:9
  27: tokio::runtime::Runtime::block_on
             at /home/gunnar/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.5.0/src/runtime/mod.rs:452:43
  28: paru::main
             at ./src/main.rs:73:1
  29: core::ops::function::FnOnce::call_once
             at /build/rust/src/rustc-1.52.0-src/library/core/src/ops/function.rs:227:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

@Taijian
Copy link
Author

Taijian commented May 7, 2021

$ RUST_BACKTRACE=full cargo run --
    Finished dev [unoptimized + debuginfo] target(s) in 0.07s
     Running `target/debug/paru`
no new news
:: Synchronisiere Paketdatenbanken...
 local_aur ist aktuell
 core ist aktuell
 extra ist aktuell
 community ist aktuell
 multilib ist aktuell
:: Starte vollständige Systemaktualisierung...
 Es gibt nichts zu tun
:: Looking for AUR upgrades
:: Looking for devel upgrades
thread 'main' panicked at 'attempt to subtract with overflow', src/upgrade.rs:97:15
stack backtrace:
   0:     0x55cc44d9ed10 - std::backtrace_rs::backtrace::libunwind::trace::h9a73ea6c6d5b12f7
                               at /build/rust/src/rustc-1.52.0-src/library/std/src/../../backtrace/src/backtrace/libunwind.rs:90:5
   1:     0x55cc44d9ed10 - std::backtrace_rs::backtrace::trace_unsynchronized::he907b405d618927b
                               at /build/rust/src/rustc-1.52.0-src/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x55cc44d9ed10 - std::sys_common::backtrace::_print_fmt::h5dd7ead096d4b0b6
                               at /build/rust/src/rustc-1.52.0-src/library/std/src/sys_common/backtrace.rs:67:5
   3:     0x55cc44d9ed10 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h102b8318678b8850
                               at /build/rust/src/rustc-1.52.0-src/library/std/src/sys_common/backtrace.rs:46:22
   4:     0x55cc44dc3f4c - core::fmt::write::hb5490af279fb4755
                               at /build/rust/src/rustc-1.52.0-src/library/core/src/fmt/mod.rs:1092:17
   5:     0x55cc44d96d05 - std::io::Write::write_fmt::h5e86b836ae2ff9e2
                               at /build/rust/src/rustc-1.52.0-src/library/std/src/io/mod.rs:1572:15
   6:     0x55cc44da1505 - std::sys_common::backtrace::_print::h3143325285c7f3d4
                               at /build/rust/src/rustc-1.52.0-src/library/std/src/sys_common/backtrace.rs:49:5
   7:     0x55cc44da1505 - std::sys_common::backtrace::print::hed5637aeb1557a6c
                               at /build/rust/src/rustc-1.52.0-src/library/std/src/sys_common/backtrace.rs:36:9
   8:     0x55cc44da1505 - std::panicking::default_hook::{{closure}}::hb5b6c19431a6a725
                               at /build/rust/src/rustc-1.52.0-src/library/std/src/panicking.rs:208:50
   9:     0x55cc44da0fb3 - std::panicking::default_hook::haba927ad7c571bd3
                               at /build/rust/src/rustc-1.52.0-src/library/std/src/panicking.rs:225:9
  10:     0x55cc44da1cb1 - std::panicking::rust_panic_with_hook::h8b2dd8f039a6b6cb
                               at /build/rust/src/rustc-1.52.0-src/library/std/src/panicking.rs:591:17
  11:     0x55cc44da17b7 - std::panicking::begin_panic_handler::{{closure}}::h779d86cf4d688542
                               at /build/rust/src/rustc-1.52.0-src/library/std/src/panicking.rs:495:13
  12:     0x55cc44d9f1ac - std::sys_common::backtrace::__rust_end_short_backtrace::h18fa3c198c8b0cc1
                               at /build/rust/src/rustc-1.52.0-src/library/std/src/sys_common/backtrace.rs:141:18
  13:     0x55cc44da1749 - rust_begin_unwind
                               at /build/rust/src/rustc-1.52.0-src/library/std/src/panicking.rs:493:5
  14:     0x55cc44dc1a01 - core::panicking::panic_fmt::h46826526782029d1
                               at /build/rust/src/rustc-1.52.0-src/library/core/src/panicking.rs:92:14
  15:     0x55cc44dc194d - core::panicking::panic::h3a150645414eb780
                               at /build/rust/src/rustc-1.52.0-src/library/core/src/panicking.rs:50:5
  16:     0x55cc4415e2b7 - paru::upgrade::print_upgrade::h665915c43183362f
                               at /home/gunnar/build/paru-git/src/paru/src/upgrade.rs:97:15
  17:     0x55cc441c396a - paru::upgrade::get_upgrades::{{closure}}::hc42098f632d2b89b
                               at /home/gunnar/build/paru-git/src/paru/src/upgrade.rs:293:9
  18:     0x55cc443f9a92 - <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::h8636b7f216da052a
                               at /build/rust/src/rustc-1.52.0-src/library/core/src/future/mod.rs:80:19
  19:     0x55cc443def2f - paru::install::install::{{closure}}::h4800e590a085d439
                               at /home/gunnar/build/paru-git/src/paru/src/install.rs:347:24
  20:     0x55cc443fb3b1 - <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::hd92a321ba0868752
                               at /build/rust/src/rustc-1.52.0-src/library/core/src/future/mod.rs:80:19
  21:     0x55cc44144314 - paru::handle_sync::{{closure}}::ha5e716482acdb01d
                               at /home/gunnar/build/paru-git/src/paru/src/main.rs:234:9
  22:     0x55cc443fb811 - <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::hdec289acbce451cb
                               at /build/rust/src/rustc-1.52.0-src/library/core/src/future/mod.rs:80:19
  23:     0x55cc4414039f - paru::handle_cmd::{{closure}}::h318325207a070ce0
                               at /home/gunnar/build/paru-git/src/paru/src/main.rs:128:21
  24:     0x55cc443fa191 - <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::h955b1ae8da72049c
                               at /build/rust/src/rustc-1.52.0-src/library/core/src/future/mod.rs:80:19
  25:     0x55cc4413f667 - paru::run::{{closure}}::hdc8ce7a014d2cfa6
                               at /home/gunnar/build/paru-git/src/paru/src/main.rs:114:5
  26:     0x55cc443f9611 - <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::h7e6f71a97d93c069
                               at /build/rust/src/rustc-1.52.0-src/library/core/src/future/mod.rs:80:19
  27:     0x55cc4413ecc0 - paru::main2::{{closure}}::h30cb2cba462b92a8
                               at /home/gunnar/build/paru-git/src/paru/src/main.rs:92:11
  28:     0x55cc443f9ca9 - <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::h8a3868fba7608f8f
                               at /build/rust/src/rustc-1.52.0-src/library/core/src/future/mod.rs:80:19
  29:     0x55cc44144c31 - paru::main::{{closure}}::hf2d3226a72fc5e7c
                               at /home/gunnar/build/paru-git/src/paru/src/main.rs:78:13
  30:     0x55cc443fb21b - <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::hc90150e572085cac
                               at /build/rust/src/rustc-1.52.0-src/library/core/src/future/mod.rs:80:19
  31:     0x55cc443f08a3 - tokio::park::thread::CachedParkThread::block_on::{{closure}}::h39ba6aef247c28fe
                               at /home/gunnar/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.5.0/src/park/thread.rs:263:54
  32:     0x55cc441d38f6 - tokio::coop::with_budget::{{closure}}::h677e5612c591557a
                               at /home/gunnar/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.5.0/src/coop.rs:106:9
  33:     0x55cc440afda5 - std::thread::local::LocalKey<T>::try_with::h86e5e8a826a9d2dc
                               at /build/rust/src/rustc-1.52.0-src/library/std/src/thread/local.rs:272:16
  34:     0x55cc440af62d - std::thread::local::LocalKey<T>::with::h05446ae1de1f7c50
                               at /build/rust/src/rustc-1.52.0-src/library/std/src/thread/local.rs:248:9
  35:     0x55cc443f0622 - tokio::coop::with_budget::h02f5f7b0edffdb24
                               at /home/gunnar/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.5.0/src/coop.rs:99:5
  36:     0x55cc443f0622 - tokio::coop::budget::h65b2bc200814685f
                               at /home/gunnar/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.5.0/src/coop.rs:76:5
  37:     0x55cc443f0622 - tokio::park::thread::CachedParkThread::block_on::h5a1942e47d403e4d
                               at /home/gunnar/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.5.0/src/park/thread.rs:263:31
  38:     0x55cc4418a691 - tokio::runtime::enter::Enter::block_on::he6e322656bc7c512
                               at /home/gunnar/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.5.0/src/runtime/enter.rs:151:13
  39:     0x55cc441dc776 - tokio::runtime::thread_pool::ThreadPool::block_on::hda8793325783ff57
                               at /home/gunnar/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.5.0/src/runtime/thread_pool/mod.rs:71:9
  40:     0x55cc44176746 - tokio::runtime::Runtime::block_on::ha58e1e0f318257cd
                               at /home/gunnar/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.5.0/src/runtime/mod.rs:452:43
  41:     0x55cc442351f5 - paru::main::h2d072fd19df77e89
                               at /home/gunnar/build/paru-git/src/paru/src/main.rs:73:1
  42:     0x55cc4410fd9b - core::ops::function::FnOnce::call_once::h2ce609f15ad9e3a3
                               at /build/rust/src/rustc-1.52.0-src/library/core/src/ops/function.rs:227:5
  43:     0x55cc44147fee - std::sys_common::backtrace::__rust_begin_short_backtrace::ha15457786ac8dc20
                               at /build/rust/src/rustc-1.52.0-src/library/std/src/sys_common/backtrace.rs:125:18
  44:     0x55cc4423d5b1 - std::rt::lang_start::{{closure}}::h84e9a1972bf94c50
                               at /build/rust/src/rustc-1.52.0-src/library/std/src/rt.rs:66:18
  45:     0x55cc44da21ba - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::hc95883d8abe9d701
                               at /build/rust/src/rustc-1.52.0-src/library/core/src/ops/function.rs:259:13
  46:     0x55cc44da21ba - std::panicking::try::do_call::h43c3e03a73a84eb6
                               at /build/rust/src/rustc-1.52.0-src/library/std/src/panicking.rs:379:40
  47:     0x55cc44da21ba - std::panicking::try::hd899ed74db09ecff
                               at /build/rust/src/rustc-1.52.0-src/library/std/src/panicking.rs:343:19
  48:     0x55cc44da21ba - std::panic::catch_unwind::h2eeda16427fc0d9d
                               at /build/rust/src/rustc-1.52.0-src/library/std/src/panic.rs:431:14
  49:     0x55cc44da21ba - std::rt::lang_start_internal::hbcc61802a8f0df8f
                               at /build/rust/src/rustc-1.52.0-src/library/std/src/rt.rs:51:25
  50:     0x55cc4423d587 - std::rt::lang_start::h4e57e8fb90aae380
                               at /build/rust/src/rustc-1.52.0-src/library/std/src/rt.rs:65:5
  51:     0x55cc4423529a - main
  52:     0x7fcd20fa0b25 - __libc_start_main
  53:     0x55cc440a009e - _start
  54:                0x0 - <unknown>

@Taijian
Copy link
Author

Taijian commented May 7, 2021

This is from the debug branch.

@Morganamilo
Copy link
Owner

Morganamilo commented May 7, 2021

thread 'main' panicked at 'attempt to subtract with overflow', src/upgrade.rs:97:15

Now that's useful. Will look when I'm home.

@trevorgunn
Copy link
Contributor

pad = db_pkg_max - (db.len() + pkg.len()) + 1

because db_pkg_max is a usize (unsigned) it might be as simple as moving the +1 earlier.

@Taijian if you still have some time, would you mind editing that line in upgrade.rs (line 97 in the Debug branch) to read:

pad = db_pkg_max + 1 - (db.len() + pkg.len())

and see if that fixes anything?

@Taijian
Copy link
Author

Taijian commented May 7, 2021

Nope, did not help...

$ RUST_BACKTRACE=full cargo run --
   Compiling paru v1.6.1 (/home/gunnar/build/paru-git/src/paru)
    Finished dev [unoptimized + debuginfo] target(s) in 5.39s
     Running `target/debug/paru`
no new news
:: Synchronisiere Paketdatenbanken...
 local_aur ist aktuell
 core ist aktuell
 extra ist aktuell
 community ist aktuell
 multilib ist aktuell
:: Starte vollständige Systemaktualisierung...
 Es gibt nichts zu tun
:: Looking for AUR upgrades
:: Looking for devel upgrades
thread 'main' panicked at 'attempt to subtract with overflow', src/upgrade.rs:97:15
stack backtrace:
   0:     0x559f16c62d10 - std::backtrace_rs::backtrace::libunwind::trace::h9a73ea6c6d5b12f7
                               at /build/rust/src/rustc-1.52.0-src/library/std/src/../../backtrace/src/backtrace/libunwind.rs:90:5
   1:     0x559f16c62d10 - std::backtrace_rs::backtrace::trace_unsynchronized::he907b405d618927b
                               at /build/rust/src/rustc-1.52.0-src/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x559f16c62d10 - std::sys_common::backtrace::_print_fmt::h5dd7ead096d4b0b6
                               at /build/rust/src/rustc-1.52.0-src/library/std/src/sys_common/backtrace.rs:67:5
   3:     0x559f16c62d10 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h102b8318678b8850
                               at /build/rust/src/rustc-1.52.0-src/library/std/src/sys_common/backtrace.rs:46:22
   4:     0x559f16c87f4c - core::fmt::write::hb5490af279fb4755
                               at /build/rust/src/rustc-1.52.0-src/library/core/src/fmt/mod.rs:1092:17
   5:     0x559f16c5ad05 - std::io::Write::write_fmt::h5e86b836ae2ff9e2
                               at /build/rust/src/rustc-1.52.0-src/library/std/src/io/mod.rs:1572:15
   6:     0x559f16c65505 - std::sys_common::backtrace::_print::h3143325285c7f3d4
                               at /build/rust/src/rustc-1.52.0-src/library/std/src/sys_common/backtrace.rs:49:5
   7:     0x559f16c65505 - std::sys_common::backtrace::print::hed5637aeb1557a6c
                               at /build/rust/src/rustc-1.52.0-src/library/std/src/sys_common/backtrace.rs:36:9
   8:     0x559f16c65505 - std::panicking::default_hook::{{closure}}::hb5b6c19431a6a725
                               at /build/rust/src/rustc-1.52.0-src/library/std/src/panicking.rs:208:50
   9:     0x559f16c64fb3 - std::panicking::default_hook::haba927ad7c571bd3
                               at /build/rust/src/rustc-1.52.0-src/library/std/src/panicking.rs:225:9
  10:     0x559f16c65cb1 - std::panicking::rust_panic_with_hook::h8b2dd8f039a6b6cb
                               at /build/rust/src/rustc-1.52.0-src/library/std/src/panicking.rs:591:17
  11:     0x559f16c657b7 - std::panicking::begin_panic_handler::{{closure}}::h779d86cf4d688542
                               at /build/rust/src/rustc-1.52.0-src/library/std/src/panicking.rs:495:13
  12:     0x559f16c631ac - std::sys_common::backtrace::__rust_end_short_backtrace::h18fa3c198c8b0cc1
                               at /build/rust/src/rustc-1.52.0-src/library/std/src/sys_common/backtrace.rs:141:18
  13:     0x559f16c65749 - rust_begin_unwind
                               at /build/rust/src/rustc-1.52.0-src/library/std/src/panicking.rs:493:5
  14:     0x559f16c85a01 - core::panicking::panic_fmt::h46826526782029d1
                               at /build/rust/src/rustc-1.52.0-src/library/core/src/panicking.rs:92:14
  15:     0x559f16c8594d - core::panicking::panic::h3a150645414eb780
                               at /build/rust/src/rustc-1.52.0-src/library/core/src/panicking.rs:50:5
  16:     0x559f160222d5 - paru::upgrade::print_upgrade::h665915c43183362f
                               at /home/gunnar/build/paru-git/src/paru/src/upgrade.rs:97:15
  17:     0x559f1608796a - paru::upgrade::get_upgrades::{{closure}}::hc42098f632d2b89b
                               at /home/gunnar/build/paru-git/src/paru/src/upgrade.rs:293:9
  18:     0x559f162bda92 - <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::h8636b7f216da052a
                               at /build/rust/src/rustc-1.52.0-src/library/core/src/future/mod.rs:80:19
  19:     0x559f162a2f2f - paru::install::install::{{closure}}::h4800e590a085d439
                               at /home/gunnar/build/paru-git/src/paru/src/install.rs:347:24
  20:     0x559f162bf3b1 - <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::hd92a321ba0868752
                               at /build/rust/src/rustc-1.52.0-src/library/core/src/future/mod.rs:80:19
  21:     0x559f16008314 - paru::handle_sync::{{closure}}::ha5e716482acdb01d
                               at /home/gunnar/build/paru-git/src/paru/src/main.rs:234:9
  22:     0x559f162bf811 - <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::hdec289acbce451cb
                               at /build/rust/src/rustc-1.52.0-src/library/core/src/future/mod.rs:80:19
  23:     0x559f1600439f - paru::handle_cmd::{{closure}}::h318325207a070ce0
                               at /home/gunnar/build/paru-git/src/paru/src/main.rs:128:21
  24:     0x559f162be191 - <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::h955b1ae8da72049c
                               at /build/rust/src/rustc-1.52.0-src/library/core/src/future/mod.rs:80:19
  25:     0x559f16003667 - paru::run::{{closure}}::hdc8ce7a014d2cfa6
                               at /home/gunnar/build/paru-git/src/paru/src/main.rs:114:5
  26:     0x559f162bd611 - <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::h7e6f71a97d93c069
                               at /build/rust/src/rustc-1.52.0-src/library/core/src/future/mod.rs:80:19
  27:     0x559f16002cc0 - paru::main2::{{closure}}::h30cb2cba462b92a8
                               at /home/gunnar/build/paru-git/src/paru/src/main.rs:92:11
  28:     0x559f162bdca9 - <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::h8a3868fba7608f8f
                               at /build/rust/src/rustc-1.52.0-src/library/core/src/future/mod.rs:80:19
  29:     0x559f16008c31 - paru::main::{{closure}}::hf2d3226a72fc5e7c
                               at /home/gunnar/build/paru-git/src/paru/src/main.rs:78:13
  30:     0x559f162bf21b - <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::hc90150e572085cac
                               at /build/rust/src/rustc-1.52.0-src/library/core/src/future/mod.rs:80:19
  31:     0x559f162b48a3 - tokio::park::thread::CachedParkThread::block_on::{{closure}}::h39ba6aef247c28fe
                               at /home/gunnar/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.5.0/src/park/thread.rs:263:54
  32:     0x559f160978f6 - tokio::coop::with_budget::{{closure}}::h677e5612c591557a
                               at /home/gunnar/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.5.0/src/coop.rs:106:9
  33:     0x559f15f73da5 - std::thread::local::LocalKey<T>::try_with::h86e5e8a826a9d2dc
                               at /build/rust/src/rustc-1.52.0-src/library/std/src/thread/local.rs:272:16
  34:     0x559f15f7362d - std::thread::local::LocalKey<T>::with::h05446ae1de1f7c50
                               at /build/rust/src/rustc-1.52.0-src/library/std/src/thread/local.rs:248:9
  35:     0x559f162b4622 - tokio::coop::with_budget::h02f5f7b0edffdb24
                               at /home/gunnar/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.5.0/src/coop.rs:99:5
  36:     0x559f162b4622 - tokio::coop::budget::h65b2bc200814685f
                               at /home/gunnar/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.5.0/src/coop.rs:76:5
  37:     0x559f162b4622 - tokio::park::thread::CachedParkThread::block_on::h5a1942e47d403e4d
                               at /home/gunnar/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.5.0/src/park/thread.rs:263:31
  38:     0x559f1604e691 - tokio::runtime::enter::Enter::block_on::he6e322656bc7c512
                               at /home/gunnar/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.5.0/src/runtime/enter.rs:151:13
  39:     0x559f160a0776 - tokio::runtime::thread_pool::ThreadPool::block_on::hda8793325783ff57
                               at /home/gunnar/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.5.0/src/runtime/thread_pool/mod.rs:71:9
  40:     0x559f1603a746 - tokio::runtime::Runtime::block_on::ha58e1e0f318257cd
                               at /home/gunnar/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.5.0/src/runtime/mod.rs:452:43
  41:     0x559f160f91f5 - paru::main::h2d072fd19df77e89
                               at /home/gunnar/build/paru-git/src/paru/src/main.rs:73:1
  42:     0x559f15fd3d9b - core::ops::function::FnOnce::call_once::h2ce609f15ad9e3a3
                               at /build/rust/src/rustc-1.52.0-src/library/core/src/ops/function.rs:227:5
  43:     0x559f1600bfee - std::sys_common::backtrace::__rust_begin_short_backtrace::ha15457786ac8dc20
                               at /build/rust/src/rustc-1.52.0-src/library/std/src/sys_common/backtrace.rs:125:18
  44:     0x559f161015b1 - std::rt::lang_start::{{closure}}::h84e9a1972bf94c50
                               at /build/rust/src/rustc-1.52.0-src/library/std/src/rt.rs:66:18
  45:     0x559f16c661ba - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::hc95883d8abe9d701
                               at /build/rust/src/rustc-1.52.0-src/library/core/src/ops/function.rs:259:13
  46:     0x559f16c661ba - std::panicking::try::do_call::h43c3e03a73a84eb6
                               at /build/rust/src/rustc-1.52.0-src/library/std/src/panicking.rs:379:40
  47:     0x559f16c661ba - std::panicking::try::hd899ed74db09ecff
                               at /build/rust/src/rustc-1.52.0-src/library/std/src/panicking.rs:343:19
  48:     0x559f16c661ba - std::panic::catch_unwind::h2eeda16427fc0d9d
                               at /build/rust/src/rustc-1.52.0-src/library/std/src/panic.rs:431:14
  49:     0x559f16c661ba - std::rt::lang_start_internal::hbcc61802a8f0df8f
                               at /build/rust/src/rustc-1.52.0-src/library/std/src/rt.rs:51:25
  50:     0x559f16101587 - std::rt::lang_start::h4e57e8fb90aae380
                               at /build/rust/src/rustc-1.52.0-src/library/std/src/rt.rs:65:5
  51:     0x559f160f929a - main
  52:     0x7f433b34bb25 - __libc_start_main
  53:     0x559f15f6409e - _start
  54:                0x0 - <unknown>

@Morganamilo
Copy link
Owner

Try the new master. It was just using the wrong dbs.

@Taijian
Copy link
Author

Taijian commented May 7, 2021

Try the new master. It was just using the wrong dbs.

That did it! New master is a good master! Taijian is a happy elf!

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

3 participants