Bug 15216 - qt4urpm corrupts the rpm database, or something
Summary: qt4urpm corrupts the rpm database, or something
Status: RESOLVED WORKSFORME
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: All Linux
Priority: Normal critical
Target Milestone: ---
Assignee: David GEIGER
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-06 17:56 CET by nikos papadopoulos
Modified: 2016-04-19 16:37 CEST (History)
1 user (show)

See Also:
Source RPM: qt4urpm-1.0.1-6.mga4.src.rpm
CVE:
Status comment:


Attachments
error message (10.65 KB, image/jpeg)
2015-02-06 17:58 CET, nikos papadopoulos
Details
double checking, the problem is there, in my system (4.30 KB, text/plain)
2015-02-10 00:47 CET, nikos papadopoulos
Details
simple file comparison (203.29 KB, image/jpeg)
2015-02-10 01:11 CET, nikos papadopoulos
Details

Description nikos papadopoulos 2015-02-06 17:56:50 CET
Description of problem:
I tried using qt4urpm.

Later, when I opened drakrpm, it reported that the rpm database was corrupt.
There were no packages in the list.

To restore it,
I deleted the __db files from /var/lib/rpm
(http://www.cyberciti.biz/tips/rebuilding-corrupted-rpm-database.html)
Then used MCC's media manager, and updated all mirrors.
Drakrpm works fine, now.


That had happened once again, in the past.
I had unistalled qt4urpm, and... forgotten about it.


------
Also...
Qt4urpm has 2-3 functions, one of which is managing orphan packages.
But that doesn't work (in my case).

And the code hasn't been updated since 2011.
(http://sourceforge.net/p/qt4urpm/code/HEAD/tree/)

Maybe the package isn't useful anymore...

------




Reproducible: 

Steps to Reproduce:
Comment 1 nikos papadopoulos 2015-02-06 17:58:53 CET
Created attachment 5867 [details]
error message
David Walser 2015-02-08 02:22:36 CET

Assignee: bugsquad => geiger.david68210

Comment 2 David GEIGER 2015-02-08 11:33:32 CET
Ok, 

So tested on mga4_64,

I have no problem with qt4urpm and the rpm database :

-----------------------------------------------------------------------
[root@localhost david]# urpmi qt4urpm


    $MIRRORLIST: media/core/release/qt4urpm-1.0.1-6.mga4.x86_64.rpm
installation de qt4urpm-1.0.1-6.mga4.x86_64.rpm depuis /var/cache/urpmi/rpms                             
Préparation...                   #######################################################################
      1/1: qt4urpm               #######################################################################

[root@localhost david]# exit
exit

[david@localhost ~]$ qt4urpm
Qt4urpm:  Trying to start as root.
sh: /usr/lib/kde4/libexec/kdesu: Aucun fichier ou dossier de ce type

[david@localhost ~]$ drakrpm
Subroutine Gtk3::main redefined at /usr/lib/perl5/vendor_perl/5.18.1/Gtk3.pm line 296.
Use of uninitialized value $value in numeric eq (==) at /usr/lib/perl5/vendor_perl/5.18.1/Gtk3.pm line 545.
Use of uninitialized value $value in numeric eq (==) at /usr/lib/perl5/vendor_perl/5.18.1/Gtk3.pm line 545.
Use of uninitialized value $value in numeric eq (==) at /usr/lib/perl5/vendor_perl/5.18.1/Gtk3.pm line 545.
Use of uninitialized value $value in numeric eq (==) at /usr/lib/perl5/vendor_perl/5.18.1/Gtk3.pm line 545.
Use of uninitialized value $value in numeric eq (==) at /usr/lib/perl5/vendor_perl/5.18.1/Gtk3.pm line 545.
Use of uninitialized value $value in numeric eq (==) at /usr/lib/perl5/vendor_perl/5.18.1/Gtk3.pm line 545.
Use of uninitialized value $value in numeric eq (==) at /usr/lib/perl5/vendor_perl/5.18.1/Gtk3.pm line 545.
Impossible to set by_group view as default

(drakrpm:3231): Gtk-WARNING **: GtkImage 0x431fd00 adjusted size vertical min 47 natural 47 must not decrease below min 48 natural 48

(drakrpm:3231): Gtk-WARNING **: GtkImage 0x431fd00 attempted to adjust its size allocation from -12,1 1190x54 to 0,0 1178x55. adjust_size_allocation must keep allocation inside original bounds
getting lock on urpmi
using mirror http://distrib-coffee.ipsl.jussieu.fr/pub/linux/Mageia/distrib/4/x86_64
examen de la liste de synthèse [/var/lib/urpmi/synthesis.hdlist.Core Release (distrib1).cz]
examen de la liste de synthèse [/var/lib/urpmi/synthesis.hdlist.Core Updates (distrib3).cz]
examen de la liste de synthèse [/var/lib/urpmi/synthesis.hdlist.Nonfree Release (distrib11).cz]
examen de la liste de synthèse [/var/lib/urpmi/synthesis.hdlist.Nonfree Updates (distrib13).cz]
examen de la liste de synthèse [/var/lib/urpmi/synthesis.hdlist.Core 32bit Release (distrib31).cz]
examen de la liste de synthèse [/var/lib/urpmi/synthesis.hdlist.Core 32bit Updates (distrib32).cz]
examen de la liste de synthèse [/var/lib/urpmi/synthesis.hdlist.Nonfree 32bit Release (distrib36).cz]
examen de la liste de synthèse [/var/lib/urpmi/synthesis.hdlist.Nonfree 32bit
Updates (distrib37).cz]
unlocking urpmi database
[david@localhost ~]$
-----------------------------------------------------------------

You can see that all works properly.
On my test I have use the "Remove-Orphaned-Packages" function to remove 98 orphaned packages.
Comment 3 David GEIGER 2015-02-08 11:35:59 CET
So same test for mga4_32,

[root@localhost david]# urpmi qt4urpm


    rsync://distrib-coffee.ipsl.jussieu.fr/pub/linux/Mageia/distrib/4/i586/media/core/release/qt4urpm-1.0.1-6.mga4.i586.rpm
installation de qt4urpm-1.0.1-6.mga4.i586.rpm depuis /var/cache/urpmi/rpms               
Préparation...                   #######################################################
      1/1: qt4urpm               #######################################################

[root@localhost david]# exit
exit

[david@localhost ~]$ qt4urpm
Qt4urpm:  Trying to start as root.

[david@localhost ~]$ drakrpm
Subroutine Gtk3::main redefined at /usr/lib/perl5/vendor_perl/5.18.1/Gtk3.pm line 296.
Use of uninitialized value $value in numeric eq (==) at /usr/lib/perl5/vendor_perl/5.18.1/Gtk3.pm line 545.
Use of uninitialized value $value in numeric eq (==) at /usr/lib/perl5/vendor_perl/5.18.1/Gtk3.pm line 545.
Use of uninitialized value $value in numeric eq (==) at /usr/lib/perl5/vendor_perl/5.18.1/Gtk3.pm line 545.
Use of uninitialized value $value in numeric eq (==) at /usr/lib/perl5/vendor_perl/5.18.1/Gtk3.pm line 545.
Use of uninitialized value $value in numeric eq (==) at /usr/lib/perl5/vendor_perl/5.18.1/Gtk3.pm line 545.
Use of uninitialized value $value in numeric eq (==) at /usr/lib/perl5/vendor_perl/5.18.1/Gtk3.pm line 545.
Use of uninitialized value $value in numeric eq (==) at /usr/lib/perl5/vendor_perl/5.18.1/Gtk3.pm line 545.
Impossible to set by_group view as default

(drakrpm:3424): Gtk-WARNING **: GtkImage 0x9ab14a8 adjusted size vertical min 47 natural 47 must not decrease below min 48 natural 48

(drakrpm:3424): Gtk-WARNING **: GtkImage 0x9ab14a8 attempted to adjust its size allocation from -12,1 1014x54 to 0,0 1002x55. adjust_size_allocation must keep allocation inside original bounds
getting lock on urpmi
using mirror rsync://distrib-coffee.ipsl.jussieu.fr/pub/linux/Mageia/distrib/4/i586
examen de la liste de synthèse [/var/lib/urpmi/Core Release (distrib1)/synthesis.hdlist.cz]
examen de la liste de synthèse [/var/lib/urpmi/Core Updates (distrib3)/synthesis.hdlist.cz]
examen de la liste de synthèse [/var/lib/urpmi/Nonfree Release (distrib11)/synthesis.hdlist.cz]
examen de la liste de synthèse [/var/lib/urpmi/Nonfree Updates (distrib13)/synthesis.hdlist.cz]
unlocking urpmi database
------------------------------------------------------

Here all works fine too.
On my test I have use the "Remove-Orphaned-Packages" function to remove 154 orphaned packages.
Comment 4 nikos papadopoulos 2015-02-10 00:47:56 CET
Created attachment 5875 [details]
double checking, the problem is there, in my system
Comment 5 nikos papadopoulos 2015-02-10 01:11:47 CET
Created attachment 5876 [details]
simple file comparison

Removing the "lock" files makes no difference.

There is also this extra "__db.000" file, with 0KB.
Comment 6 David GEIGER 2015-03-23 14:55:32 CET
Anyone can reproduce this issue? 

I can't reproduce here on two mga4 local machines.
Comment 7 Samuel Verschelde 2015-09-21 13:21:14 CEST
Mageia 4 changed to end-of-life (EOL) status on 2015-09-19. It is is no longer 
maintained, which means that it will not receive any further security or bug 
fix updates.

Package Maintainer: If you wish for this bug to remain open because you plan to 
fix it in a currently maintained version, simply change the 'version' to a later 
Mageia version.

Bug Reporter: Thank you for reporting this issue and we are sorry that we weren't 
able to fix it before Mageia 4's end of life. If you are able to reproduce it 
against a later version of Mageia, you are encouraged to click on "Version" and 
change it against that version of Mageia. If it's valid in several versions, 
select the highest and add MGAxTOO in whiteboard for each other valid release.
Example: it's valid in cauldron and Mageia 5, set to cauldron and add MGA5TOO.

Although we aim to fix as many bugs as possible during every release's lifetime, 
sometimes those efforts are overtaken by events. Often a more recent Mageia 
release includes newer upstream software that fixes bugs or makes them obsolete.

If you would like to help fixing bugs in the future, don't hesitate to join the
packager team via our mentoring program [1] or join the teams that fit you 
most [2].

[1] https://wiki.mageia.org/en/Becoming_a_Mageia_Packager
[2] http://www.mageia.org/contribute/
Comment 8 Marja Van Waes 2015-10-27 06:58:17 CET
As announced over a month ago, Mageia 4 changed to end-of-life (EOL) status on 2015-09-19. It is is no longer maintained, which means that it will not receive any further security or bug fix updates.

This issue may have been fixed in a later Mageia release, so, if you still see it and didn't already do so: please upgrade to Mageia 5 (or, if you read this much later than this is written: make sure you run a currently maintained Mageia version)

If you are able to reproduce it against a maintained version of Mageia, you are encouraged to 
1. reopen this bug report, by changing the "Status" from "RESOLVED - OLD" to "REOPENED"
2. click on "Version" and change it against that version of Mageia. If you know it's valid in several versions, select the highest and add MGAxTOO in whiteboard for each other valid release.
Example: it's valid in cauldron and Mageia 5, set to cauldron and add MGA5TOO.
3. give as much relevant information as possible. If you're not an experienced bug reporter and have some time: please read this page:
https://wiki.mageia.org/en/How_to_report_a_bug_properly

If you see a similar issue, but are _not_sure_ it is the same, with the same cause, then please file a new bug report and mention this one in it (please include the bug number, too). 


If you would like to help fixing bugs in the future, don't hesitate to join the
packager team via our mentoring program [1] or join the teams that fit you 
most [2].
[1] https://wiki.mageia.org/en/Becoming_a_Mageia_Packager
[2] http://www.mageia.org/contribute/

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

Comment 9 Marja Van Waes 2016-04-19 16:19:48 CEST
(In reply to David GEIGER from comment #6)
> Anyone can reproduce this issue? 
> 
> I can't reproduce here on two mga4 local machines.

Yeah, in cauldron, I installed qt4urpm, started it (it didn't show any orphans even if I'm sure there are orphans), closed it and tried to install ri-li:

[root@cldrn_64 marja]# urpmi qt4urpm 


installeren van qt4urpm-1.0.1-14.mga6.x86_64.rpm vanaf /RedHD2/mageia/distrib/cauldron/x86_64/media/core/release
Voorbereiden...                  ###############################
      1/1: qt4urpm               ###############################
[root@cldrn_64 marja]# qt4urpm 
Qt4urpm:  urpmq --auto-orphans
Qt4urpm:  urpmq --auto-orphans
[root@cldrn_64 marja]# urpmi ri-li
fout: rpmdb: BDB0113 Thread/process 9743/139726255281920 failed: BDB1507 Thread died in Berkeley DB library
fout: db5 error(-30973) from dbenv->failchk: BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery
fout: cannot open Packages index using db5 -  (-30973)
fout: cannot open Packages database in /var/lib/rpm
kon rpmdb niet openen
[root@cldrn_64 marja]#

The files that were changed when I started qt4urpm are

-rw-r--r--  1 root root   286720 apr 19 16:06 __db.001
-rw-r--r--  1 root root    81920 apr 19 16:06 __db.002
-rw-r--r--  1 root root  1318912 apr 19 16:06 __db.003
-rw-r--r--  1 root root        0 apr 19 16:06 .RPMLOCK

Status: RESOLVED => REOPENED
CC: (none) => marja11
Hardware: i586 => All
Version: 4 => Cauldron
Resolution: OLD => (none)

Comment 10 Marja Van Waes 2016-04-19 16:37:56 CEST
But I couldn't reproduce it /0\

After repairing the rpm databases, I ran qt4urpm again (in English, this time): it did show the orphans, I removed one, closed the application and installed ri-li.

Starting it again in Dutch shows the orphans too, now, and doesn't break the databases.

I don't manage to find the "Unconfirmed" status, maybe that no longer exists after a bug was reopened :-/

Sorry for having reopened without first trying to reproduce the issue, even if I'm sure it was qt4urpm that caused this one-time corruption.

Status: REOPENED => RESOLVED
Resolution: (none) => WORKSFORME


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