Bug 2184271 - dnf5daemon-client crashed in __gnu_cxx::__verbose_terminate_handler() [clone .cold]() when upgrading kf5-filesystem
Summary: dnf5daemon-client crashed in __gnu_cxx::__verbose_terminate_handler() [clone ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf5
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Marek Blaha
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-04-04 05:26 UTC by Martin Pitt
Modified: 2023-05-28 01:03 UTC (History)
5 users (show)

Fixed In Version: dnf5-5.0.11-2.fc38
Clone Of:
Environment:
Last Closed: 2023-05-28 01:03:12 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
journalctl -u dnf5daemon-server (591.70 KB, text/plain)
2023-04-04 05:26 UTC, Martin Pitt
no flags Details

Description Martin Pitt 2023-04-04 05:26:37 UTC
Created attachment 1955656 [details]
journalctl -u dnf5daemon-server

Description of problem: I want to evaluate dnf5daemon for eventual Cockpit integration and did the first CLI test steps. On current rawhide, an upgrade crashes.


Version-Release number of selected component (if applicable):

dnf5daemon-{client,server} 5.0.7-1.fc39

How reproducible: Always

Steps to Reproduce:
1. Boot rawhide cloud VM. I used the one from two days ago: https://download.fedoraproject.org/pub/fedora/linux/development/rawhide/Cloud/x86_64/images//Fedora-Cloud-Base-Rawhide-20230401.n.0.x86_64.qcow2
2. dnf install -y dnf5 dnf5-plugins dnf5daemon-server dnf5daemon-client
3. dnf5daemon-client upgrade

Actual results:

It fetches the repo metadata, shows a reasonable list of available updates, I say "y":

0/0] Fedora - Rawhide - Developmental packages for the next Fedora release                     100% |  10.6 MiB/s |  22.4 MiB |  00m02s
[0/0] Fedora rawhide openh264 (From Cisco) - x86_64                                             100% |  10.6 MiB/s |  22.4 MiB |  00m02s
[0/0] Fedora - Modular Rawhide - Developmental packages for the next Fedora release             100% |  10.6 MiB/s |  22.4 MiB |  00m02s
Package                                            Arch       Version                                     Repository                Size
Upgrading:                                                                                                                              
 kf5-filesystem                                    x86_64     5.105.0-1.fc39                              rawhide                0.0   B
  replacing kf5-filesystem                         x86_64     5.104.0-1.fc39                              rawhide                0.0   B
 libdnf-plugin-subscription-manager                x86_64     1.29.33.1-1.fc39                            rawhide               64.1 KiB
  replacing libdnf-plugin-subscription-manager     x86_64     1.29.30-2.fc38                              rawhide               64.2 KiB
 nftables                                          x86_64     1:1.0.7-1.fc39                              rawhide                1.1 MiB
  replacing nftables                               x86_64     1:1.0.5-2.fc38                              rawhide                1.0 MiB
 python3-cloud-what                                x86_64     1.29.33.1-1.fc39                            rawhide               75.6 KiB
  replacing python3-cloud-what                     x86_64     1.29.30-2.fc38                              rawhide               73.1 KiB
 python3-nftables                                  x86_64     1:1.0.7-1.fc39                              rawhide               41.5 KiB
  replacing python3-nftables                       x86_64     1:1.0.5-2.fc38                              rawhide               33.6 KiB
 python3-subscription-manager-rhsm                 x86_64     1.29.33.1-1.fc39                            rawhide              572.8 KiB
  replacing python3-subscription-manager-rhsm      x86_64     1.29.30-2.fc38                              rawhide              545.7 KiB
 subscription-manager                              x86_64     1.29.33.1-1.fc39                            rawhide                3.8 MiB
   replacing subscription-manager                  x86_64     1.29.30-2.fc38                              rawhide                3.7 MiB

Transaction Summary:
 Upgrading:         7 packages
 Replacing:         7 packages

Is this ok [y/N]: y


Then it crashes during installing:

[1/7] kf5-filesystem-0:5.105.0-1.fc39.x86_64                                                    100% |  57.0 KiB/s |  10.9 KiB |  00m00s
[2/7] python3-cloud-what-0:1.29.33.1-1.fc39.x86_64                                              100% |   0.0   B/s | 108.8 KiB |  00m00s
[3/7] libdnf-plugin-subscription-manager-0:1.29.33.1-1.fc39.x86_64                              100% |   0.0   B/s |  84.7 KiB |  00m00s
[4/7] python3-subscription-manager-rhsm-0:1.29.33.1-1.fc39.x86_64                               100% |   0.0   B/s | 222.9 KiB |  00m00s
[5/7] subscription-manager-0:1.29.33.1-1.fc39.x86_64                                            100% |  33.0 MiB/s |   1.0 MiB |  00m00s
[6/7] nftables-1:1.0.7-1.fc39.x86_64                                                            100% |   0.0   B/s | 412.9 KiB |  00m00s
[7/7] python3-nftables-1:1.0.7-1.fc39.x86_64                                                    100% |   0.0   B/s |  19.8 KiB |  00m00s
----------------------------------------------------------------------------------------------------------------------------------------
[1/2] Verify package files                                                                      100% | 241.0   B/s |   7.0   B |  00m00s
[2/3] Prepare transaction                                                                       100% | 134.0   B/s |  14.0   B |  00m00s
[3/4] Upgrading python3-cloud-what-0:1.29.33.1-1.fc39.x86_64                                    100% |   3.7 MiB/s | 166.7 KiB |  00m00s
[4/5] Upgrading python3-subscription-manager-rhsm-0:1.29.33.1-1.fc39.x86_64                     100% |  10.7 MiB/s | 580.9 KiB |  00m00s
[5/6] Upgrading nftables-1:1.0.7-1.fc39.x86_64                                                  100% |  27.1 MiB/s |   1.1 MiB |  00m00s
>>> Running scriptlet: nftables-1:1.0.7-1.fc39.x86_64
>>> Stop scriptlet: nftables-1:1.0.7-1.fc39.x86_64
[6/7] Upgrading libdnf-plugin-subscription-manager-0:1.29.33.1-1.fc39.x86_64                    100% |   3.3 MiB/s |  64.8 KiB |  00m00s
>>> Running scriptlet: subscription-manager-0:1.29.33.1-1.fc39.x86_64
>>> Stop scriptlet: subscription-manager-0:1.29.33.1-1.fc39.x86_64
[7/8] Upgrading subscription-manager-0:1.29.33.1-1.fc39.x86_64                                  100% |   7.2 MiB/s |   3.9 MiB |  00m01s
>>> Running scriptlet: subscription-manager-0:1.29.33.1-1.fc39.x86_64
>>> Stop scriptlet: subscription-manager-0:1.29.33.1-1.fc39.x86_64
[8/9] Upgrading python3-nftables-1:1.0.7-1.fc39.x86_64                                          100% |   1.5 MiB/s |  44.1 KiB |  00m00s
[ 9/10] Upgrading kf5-filesystem-0:5.105.0-1.fc39.x86_64                                        100% | 303.3 KiB/s |   3.3 KiB |  00m00s
terminate called after throwing an instance of 'std::length_error'
  what():  basic_string::_M_create
Aborted (core dumped)


Expected results: Upgrade succeeds


Additional info:

`journalctl -u dnf5daemon-server` does not show an error, it just ends with

2023-04-04T05:21:04+0000 [1013] TRACE [rpm] Plugin: calling hook psm_pre in selinux plugin
2023-04-04T05:21:04+0000 [1013] TRACE [rpm] Plugin: calling hook tsm_post in selinux plugin
2023-04-04T05:21:04+0000 [1013] TRACE [rpm] Plugin: calling hook tsm_post in systemd_inhibit plugin
2023-04-04T05:21:04+0000 [1013] TRACE [rpm] System shutdown unblocked
2023-04-04T05:21:04+0000 [1013] TRACE [rpm] syncing fs /
2023-04-04T05:21:04+0000 [1013] TRACE [rpm] syncing fs /run
2023-04-04T05:21:04+0000 [1013] TRACE [rpm] PRAGMA synchronous = FULL: 0
2023-04-04T05:21:04+0000 [1013] TRACE [rpm] PRAGMA optimize: 0
2023-04-04T05:21:04+0000 [1013] TRACE [rpm] PRAGMA wal_checkpoint = TRUNCATE: 0
Error sending D-Bus reply to org.rpm.dnf.v0.Goal:do_transaction() call: [System.Error.ENOMSG] Failed to send reply (No message of desired type)

the last message is because the client crashed.

The journal has a stack trace:

#0  0x00007f297268f7b4 __pthread_kill_implementation (libc.so.6 + 0x8f7b4)    
#1  0x00007f297263e1ce raise (libc.so.6 + 0x3e1ce)    
#2  0x00007f297262687f abort (libc.so.6 + 0x2687f)    
#3  0x00007f2972aa4d39 _ZN9__gnu_cxx27__verbose_terminate_handlerEv.cold (libstdc++.so.6 + 0xa4d39)    
#4  0x00007f2972ab4fac _ZN10__cxxabiv111__terminateEPFvvE (libstdc++.so.6 + 0xb4fac)    
#5  0x00007f2972ab5017 _ZSt9terminatev (libstdc++.so.6 + 0xb5017)    
#6  0x00007f2972ab5278 __cxa_throw (libstdc++.so.6 + 0xb5278)    
#7  0x00007f2972aa7755 _ZSt20__throw_length_errorPKc (libstdc++.so.6 + 0xa7755)    
#8  0x00007f29731f2ed9 _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc (libdnf-cli.so.1 + 0x2ced9)    
#9  0x00007f2973209e92 _ZNK6libdnf3cli11progressbar14ProgressWidget9to_stringB5cxx11Ev (libdnf-cli.so.1 + 0x43e92)    
#10 0x00007f297320c0ea _ZN6libdnf3cli11progressbar19DownloadProgressBar9to_streamERSo (libdnf-cli.so.1 + 0x460ea)    
#11 0x00007f29732095dc _ZN6libdnf3cli11progressbarlsERSoRNS1_11ProgressBarE (libdnf-cli.so.1 + 0x435dc)    
#12 0x00007f297320cdd9 _ZN6libdnf3cli11progressbarlsERSoRNS1_16MultiProgressBarE (libdnf-cli.so.1 + 0x46dd9)    
#13 0x00005557f5d558c6 _ZNSt17_Function_handlerIFvRN5sdbus6SignalEEZN9dnfdaemon6client13TransactionCBC4ERNS5_7ContextEEUlS2_E5_E9_M_invokeERKSt9_Any_dataS2_ (dnf5daemon-client + 0x168c6)    
#14 0x00007f29731b62af _ZN5sdbus8internal5Proxy20sdbus_signal_handlerEP14sd_bus_messagePvP12sd_bus_error (libsdbus-c++.so.1 + 0x292af)    
#15 0x00007f2972d45d0a bus_match_run.localalias (libsystemd.so.0 + 0x2cd0a)    
#16 0x00007f2972d45a48 bus_match_run.localalias (libsystemd.so.0 + 0x2ca48)    
#17 0x00007f2972d45bd7 bus_match_run.localalias (libsystemd.so.0 + 0x2cbd7)    
#18 0x00007f2972d45a48 bus_match_run.localalias (libsystemd.so.0 + 0x2ca48)    
#19 0x00007f2972d45bd7 bus_match_run.localalias (libsystemd.so.0 + 0x2cbd7)    
#20 0x00007f2972d45a48 bus_match_run.localalias (libsystemd.so.0 + 0x2ca48)    
#21 0x00007f2972d45bd7 bus_match_run.localalias (libsystemd.so.0 + 0x2cbd7)    
#22 0x00007f2972d45a48 bus_match_run.localalias (libsystemd.so.0 + 0x2ca48)    
#23 0x00007f2972d45bd7 bus_match_run.localalias (libsystemd.so.0 + 0x2cbd7)    
#24 0x00007f2972d45a48 bus_match_run.localalias (libsystemd.so.0 + 0x2ca48)    
#25 0x00007f2972d45b73 bus_match_run.localalias (libsystemd.so.0 + 0x2cb73)    
#26 0x00007f2972d45da7 bus_match_run.localalias (libsystemd.so.0 + 0x2cda7)    
#27 0x00007f2972d60b90 process_match (libsystemd.so.0 + 0x47b90)    
#28 0x00007f2972d67e3c bus_process_internal (libsystemd.so.0 + 0x4ee3c)    
#29 0x00007f29731a7b0a _ZN5sdbus8internal10Connection21processPendingRequestEv (libsdbus-c++.so.1 + 0x1ab0a)    
#30 0x00007f29731a8b40 _ZN5sdbus8internal10Connection14enterEventLoopEv (libsdbus-c++.so.1 + 0x1bb40)    
#31 0x00007f2972ae3223 execute_native_thread_routine (libstdc++.so.6 + 0xe3223)    
#32 0x00007f297268d877 start_thread (libc.so.6 + 0x8d877)    
#33 0x00007f297271434c __clone3 (libc.so.6 + 0x11434c)    
    
Stack trace of thread 1011:    
#0  0x00007f297268a149 __futex_abstimed_wait_common (libc.so.6 + 0x8a149)    
#1  0x00007f297268cae9 pthread_cond_wait@@GLIBC_2.3.2 (libc.so.6 + 0x8cae9)    
#2  0x00007f2972adc220 _ZNSt18condition_variable4waitERSt11unique_lockISt5mutexE (libstdc++.so.6 + 0xdc220)    
#3  0x00007f29731b637b _ZN5sdbus8internal5Proxy17SyncCallReplyData18waitForMethodReplyEv (libsdbus-c++.so.1 + 0x2937b)    
#4  0x00007f29731b6b68 _ZN5sdbus8internal5Proxy36sendMethodCallMessageAndWaitForReplyERKNS_10MethodCallEm (libsdbus-c++.so.1 + 0x29b68)    
#5  0x00007f29731b6cf3 _ZN5sdbus8internal5Proxy10callMethodERKNS_10MethodCallEm (libsdbus-c++.so.1 + 0x29cf3)    
#6  0x00005557f5d518a3 _ZN5sdbus13MethodInvokerD2Ev.lto_priv.0 (dnf5daemon-client + 0x128a3)    
#7  0x00005557f5d5aa95 _ZN9dnfdaemon6client18TransactionCommand15run_transactionEv (dnf5daemon-client + 0x1ba95)    
#8  0x00005557f5d68201 _ZN9dnfdaemon6client14UpgradeCommand3runEv (dnf5daemon-client + 0x29201)    
#9  0x00005557f5d4f6ad main (dnf5daemon-client + 0x106ad)    
#10 0x00007f2972627b4a __libc_start_call_main (libc.so.6 + 0x27b4a)    
#11 0x00007f2972627c0b __libc_start_main@@GLIBC_2.34 (libc.so.6 + 0x27c0b)    
#12 0x00005557f5d505a5 _start (dnf5daemon-client + 0x115a5)    
ELF object binary architecture: AMD x86-64

Comment 1 Martin Pitt 2023-04-04 05:31:28 UTC
After the crash, `dnf5daemon-client upgrade` says "nothing to do", and rpm considers kf5-filesystem-5.105.0-1.fc39.x86_64 as installed.

`dnf5daemon-client install bash-doc` works fine, for the record -- so this does not affect all packages.

I also tested this with just upgrading the problematic package (from a fresh boot, i.e. not after the crashed upgrade):

# rpm -q kf5-filesystem
kf5-filesystem-5.104.0-1.fc39.x86_64
# dnf5daemon-client install kf5-filesystem
Package "kf5-filesystem-5.104.0-1.fc39.x86_64" is already installed.


Meh -- it should install the latest version, but ok:

# dnf5daemon-client upgrade kf5-filesystem
[3/4] Upgrading kf5-filesystem-0:5.105.0-1.fc39.x86_64                                          100% | 278.0 KiB/s |   3.3 KiB |  00m00s
terminate called after throwing an instance of 'std::length_error'
  what():  basic_string::_M_create
Aborted (core dumped)

Comment 2 Marek Blaha 2023-04-12 08:45:23 UTC
This issue will be fixed by PR https://github.com/rpm-software-management/dnf5/pull/449
Also https://github.com/rpm-software-management/dnf5/pull/444 is needed to make the dnfdaemon work again.

Comment 3 Fedora Update System 2023-05-19 11:06:03 UTC
FEDORA-2023-c8fb79e192 has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2023-c8fb79e192

Comment 4 Fedora Update System 2023-05-20 09:20:23 UTC
FEDORA-2023-c8fb79e192 has been pushed to the Fedora 38 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-c8fb79e192`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-c8fb79e192

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 5 Fedora Update System 2023-05-28 01:03:12 UTC
FEDORA-2023-c8fb79e192 has been pushed to the Fedora 38 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.