Bug 31024 - Installer does "unable to open rpmdb (9)" doing Mageia8 to 9 upgrade.
Summary: Installer does "unable to open rpmdb (9)" doing Mageia8 to 9 upgrade.
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: Installer (show other bugs)
Version: Cauldron
Hardware: x86_64 Linux
Priority: release_blocker critical
Target Milestone: ---
Assignee: Mageia tools maintainers
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-10-25 15:49 CEST by Daniel Tartavel
Modified: 2022-11-03 12:13 CET (History)
6 users (show)

See Also:
Source RPM: drakx-installer-stage2
CVE:
Status comment:


Attachments
CTRL+F1 log (181.23 KB, image/jpeg)
2022-10-25 16:05 CEST, Daniel Tartavel
Details
CTRL+F3 log (624.55 KB, image/jpeg)
2022-10-25 16:06 CEST, Daniel Tartavel
Details

Description Daniel Tartavel 2022-10-25 15:49:07 CEST
Description of problem:
When upgrading Mageia8 to cauldron with Mageia9-alpha1 isos, i get a fatal error: "unable to open rpmdb (9)"
attaching log screen.


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

How reproducible:
launch installation, choose upgrade to Mageia9.
Comment 1 Daniel Tartavel 2022-10-25 16:05:32 CEST
Created attachment 13447 [details]
CTRL+F1 log
Comment 2 Daniel Tartavel 2022-10-25 16:06:13 CEST
Created attachment 13448 [details]
CTRL+F3 log
Comment 3 Dave Hodgins 2022-10-25 16:30:18 CEST
From bug 29364 which I've just reopened due to this bug report.

run "rpm --rebuilddb" as root.

CC: (none) => davidwhodgins

Comment 4 Lewis Smith 2022-10-26 08:32:23 CEST
Thank you for the report.
Assigning to the MageiaTools group re the Installer.

Assignee: bugsquad => mageiatools
Summary: Installer does "unable to open rpmdb (9)" => Installer does "unable to open rpmdb (9)" doing Mageia8 to 9 upgrade.

PC LX 2022-10-26 09:52:43 CEST

CC: (none) => mageia

Comment 5 Martin Whitaker 2022-10-28 12:25:20 CEST
This occurs because when urpm::select::migrate_forward_rpmdb_db_if_needed() calls _rpm_version(), the underlying call to 'rpm --version' fails with the error:

rpm: symbol lookup error: /mnt/lib64/libpthread.so.0: undefined symbol: __libc_pthread_init, version GLIBC_PRIVATE

I guess this is because the rpm command comes from the installed system (/mnt/usr/bin/rpm) but it is using the glibc from the installer environment. Indeed, if in the installed debug shell I do

  chroot /mnt
  rpm --version

then it works without error.

Changing LD_LIBRARY_PATH to exclude the installer environment merely results in rpm failing with a segementation fault.

CC: (none) => mageia, thierry.vignaud
Priority: Normal => release_blocker

Comment 6 Martin Whitaker 2022-10-28 18:36:59 CEST
I tried to work round this by adding the rpm command to the installer stage 2 environment. That got me a bit further - it now fails with:

* chrooted db version used by librpm is at least as good as non-rooted one
* Migrating chrooted db
* urpmi error: rpm db conversion failed. You will not be able to run rpm >= 4.17
Comment 7 Martin Whitaker 2022-10-29 14:03:00 CEST
Fixed in drakx-installer-stage2 18.51.

To be verified with next ISO build.

Source RPM: (none) => drakx-installer-stage2

Comment 8 Dave Hodgins 2022-10-29 19:53:08 CEST
What about people using the cli to upgrade by switching repos from m8 to m9?
Comment 9 Martin Whitaker 2022-10-29 19:59:03 CEST
(In reply to Dave Hodgins from comment #8)
> What about people using the cli to upgrade by switching repos from m8 to m9?

urpmi is supposed to handle that. If it doesn't work, open a new bug report.
Comment 10 Lewis Smith 2022-10-31 18:45:34 CET
(In reply to Martin Whitaker from comment #7)
> Fixed in drakx-installer-stage2 18.51.
> To be verified with next ISO build.
Thank you yet again for a fix. Looks good to close pending feedback.

@Daniel
Please can *you* try this, & report back.

CC: (none) => lewyssmith

Ulrich Beckmann 2022-11-01 20:31:12 CET

CC: (none) => bequimao.de

Comment 11 Lewis Smith 2022-11-02 08:37:31 CET
(In reply to Martin Whitaker from comment #7)
> Fixed in drakx-installer-stage2 18.51.

> @Daniel
> Please can *you* try this, & report back
If Daniel does not reply soon, this will be closed fixed.
Comment 12 Daniel Tartavel 2022-11-03 00:24:42 CET
Sorry,
do not had time to test. will be tested next days.
Comment 13 Daniel Tartavel 2022-11-03 12:13:20 CET
Hi,

That's all good.
Upgrade made this day, no problems.


Thanks

Resolution: (none) => FIXED
Status: NEW => RESOLVED


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