Bug 7352 - rpmdrake crashed (Couldn't open RPM DB)
Summary: rpmdrake crashed (Couldn't open RPM DB)
Status: RESOLVED OLD
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: i586 Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Mageia Bug Squad
QA Contact:
URL:
Whiteboard:
Keywords: NEEDINFO
: 8771 8949 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-09-04 22:42 CEST by Damon Antoniou
Modified: 2020-08-27 11:52 CEST (History)
8 users (show)

See Also:
Source RPM: rpmdrake
CVE:
Status comment:


Attachments

Description Damon Antoniou 2012-09-04 22:42:41 CEST
The "rpmdrake" program crashed. Drakbug-14.21 caught it.

With Mageia Control Center open I tried to run Install and Remove Software from the launcher menu 

Couldn't open RPM DB () at /usr/lib/perl5/vendor_perl/5.14.2/Rpmdrake/open_db.pm line 74.
Perl's trace:
standalone::bug_handler() called from /usr/lib/perl5/vendor_perl/5.14.2/Rpmdrake/open_db.pm:74
Rpmdrake::open_db::open_rpm_db() called from /usr/sbin/rpmdrake:555
main::__ANON__() called from /usr/lib/libDrakX/mygtk2.pm:1424
mygtk2::main() called from /usr/lib/libDrakX/ugtk2.pm:767
ugtk2::main() called from /usr/lib/perl5/vendor_perl/5.14.2/Rpmdrake/gui.pm:596
Rpmdrake::gui::ask_browse_tree_given_widgets_for_rpmdrake() called from /usr/sbin/rpmdrake:780
main::run_treeview_dialog() called from /usr/sbin/rpmdrake:804

Theme name: oxygen-gtk
Kernel version = 3.3.6-desktop586-2.mga2
Distribution=Mageia release 2 (Official) for i586
CPU=Intel(R) Pentium(R) 4 CPU 3.20GHz
Thierry Vignaud 2012-09-05 07:57:42 CEST

Summary: rpmdrake crashed => rpmdrake crashed (Couldn't open RPM DB)
CC: (none) => thierry.vignaud

Thierry Vignaud 2012-09-05 07:57:52 CEST

Source RPM: (none) => rpmdrake
Component: New RPM package request => RPM Packages

Comment 1 Thierry Vignaud 2012-09-07 16:30:30 CEST
Fixed in git.
Thanks for the report

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

Comment 2 Manuel Hiebel 2013-01-22 12:25:27 CET
*** Bug 8771 has been marked as a duplicate of this bug. ***

CC: (none) => lte87

Comment 3 Manuel Hiebel 2013-01-22 12:27:05 CET
(In reply to comment #2)
> *** Bug 8771 has been marked as a duplicate of this bug. ***

(In reply to comment #1)
> Fixed in git.
> Thanks for the report

I still see rpmdrake in testing and no bug report is assigned to the QA

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

Comment 4 Brian McNeil 2013-01-24 02:26:35 CET
I wanted to emphasize that my comment is in Bug 8771 was about the current Cauldron. As I can't update, the installation can't be fixed automatically with an update. Any suggestions on how to repair the installation in order to update?

CC: (none) => bcm.alaska

Comment 5 Brian McNeil 2013-01-26 03:54:57 CET
I was able to fix the above problem (comment 4) with;

rm -f /var/lib/rpm/__db*
rpm -vv --rebuilddb

as root.
Comment 6 Manuel Hiebel 2013-02-03 13:16:03 CET
*** Bug 8949 has been marked as a duplicate of this bug. ***

CC: (none) => matali

Comment 7 Manuel Hiebel 2013-02-03 13:16:56 CET
(In reply to comment #6)
> *** Bug 8949 has been marked as a duplicate of this bug. ***

in cauldron

Whiteboard: (none) => MGA2TOO
Version: 2 => Cauldron

Comment 8 mat ali 2013-02-03 14:16:17 CET
the 2 commands fixed the problem, but the updater never hanged. I don't know what caused the problem but anyway it wasn't a visible crash. 
Would be nice to detect such corruption and automatically run those 2 commands to fix it without the user to search the bugzilla (i didn't find that report with my keywords) for the fix. 
Best would be to not get such cases by keeping the working version of the db until everything worked. Overwrite only if all packages updates/installations terminate without error ?
Comment 9 mat ali 2013-02-06 16:53:36 CET
happened yesterday again. As reported in my previous comment 8, nothing crashed, so I don't know where that corruption comes from.
Comment 10 mat ali 2013-02-16 19:18:37 CET
happened today again, i don't know why and i'll stop report if it annoys more than it help finding the source of problem.
Comment 11 mat ali 2013-02-26 11:14:00 CET
I would put this bug as important, I installed Mageia on my parents computer, and I can ensure you they have no Idea what a terminal is or how to report a bug. If Mageia is not only done for geeks, at least propose a "fix" button in the error window (which would do the above mentioned 2 commands rm -f /var/lib/rpm/__db* and rpm -vv --rebuilddb), otherwise those people will be unable to install updates. And that's a huge problem.
Comment 12 Marja Van Waes 2015-04-17 22:54:39 CEST
Sorry, but this bug saw no action since over 2 yrs ago. 
No cauldron package has stayed the same since then.

Closing as OLD

Please reopen if this report is still valid for _current_ cauldron and/or fully
updated Mageia 4

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

Comment 13 frédéric cabrera 2015-12-18 16:39:58 CET
Hello,
I just installes Mageia 5 a week ago. This exact bug appeard and I solved it thanks to that bug report, typing the 2 lines as root.
So the problem seems to be still there...
Bye

CC: (none) => frefretmp-bugzilla
Resolution: OLD => (none)
Status: RESOLVED => REOPENED

Comment 14 Samuel Verschelde 2016-10-15 20:34:53 CEST
(In reply to Thierry Vignaud from comment #1)
> Fixed in git.
> Thanks for the report

(In reply to frédéric cabrera from comment #13)
> Hello,
> I just installes Mageia 5 a week ago. This exact bug appeard and I solved it
> thanks to that bug report, typing the 2 lines as root.
> So the problem seems to be still there...
> Bye

So, it's been fixed but still happening? Is it the fix that was not sufficient or the new occurrence of the bug have a different cause (in which case I'd close this bug report and advise to open a new one next time it happens).

Frédéric, can you detail what you mean by "this exact bug"?

Whiteboard: MGA2TOO => (none)
Keywords: (none) => NEEDINFO

Comment 15 Marja Van Waes 2016-11-03 09:27:26 CET
(In reply to Samuel Verschelde from comment #14)
> (In reply to Thierry Vignaud from comment #1)
> > Fixed in git.
> > Thanks for the report
> 
> (In reply to frédéric cabrera from comment #13)
> > Hello,
> > I just installes Mageia 5 a week ago. This exact bug appeard and I solved it
> > thanks to that bug report, typing the 2 lines as root.
> > So the problem seems to be still there...
> > Bye
> 
> So, it's been fixed but still happening? Is it the fix that was not
> sufficient or the new occurrence of the bug have a different cause (in which
> case I'd close this bug report and advise to open a new one next time it
> happens).
> 
> Frédéric, can you detail what you mean by "this exact bug"?

No reply, so again closing.

Note that 

   rm -f /var/lib/rpm/__db*
   rpm -vv --rebuilddb

works to mend database corruptions, regardless how the corruption was caused ;-)

Resolution: (none) => FIXED
Status: REOPENED => RESOLVED
CC: (none) => marja11

Comment 16 Chris Kirsten 2020-01-08 21:34:22 CET
I am on Mageia 6.1 with perl 5.22.3 installed.
The "exact bug" is this;

Dialog.
A fatal error occurred ; Couldn't open RPM DB () at/usr/lib/perl5/vendor_perl/5.22.3/Rpmdrake/open_db.pm line 74.. (sic)
End Dialog.

]# cd /usr/lib/perl5/vendor_perl/5.22.3/Rpmdrake; ls -l
]# vi open_db.pm

Then find that line 74 is the line reporting the error in the Dialog above.

This is a perl problem, not Mageia.  Nearly seven and a half years old.

Finally sold Mageia to the family, geeks included, after Windows crashes.
However; it would be a nice "sales pitch" to fit a dumb button Windows-like to kickstart the two line fix as above.  It does work.

Thanks to Brian McNiel for that.

Ever confirmed: 1 => 0
CC: (none) => krakkeroe
Resolution: FIXED => (none)
Status: RESOLVED => UNCONFIRMED

Comment 17 Lewis Smith 2020-01-29 13:33:11 CET
Hoping Thierry will comment.
---
Having read through this extremely old bug, it is not stated apart from the initial Description:
> The "rpmdrake" program crashed
> I tried to run Install and Remove Software from the launcher menu
in what circumstances the error occurs (direct use of an rpm command, or via Add/Remove Software, or MCC Update System); nor with what [in]consistency, nor [in]frequency. Does it recur if you re-try the operation a short time later?

It is unlikely that the problem stems from a corrupt database. Could the Perl open DB error be more fully reported to give a clue? I wondered whether this could arise if the DB is already locked (typically by the automatic update check); or whether that case is already explicitly catered for.

From comment 11:
> propose a "fix" button in the error window (which would do the above
> mentioned 2 commands rm -f /var/lib/rpm/__db* and rpm -vv --rebuilddb)
Possible | reasonable ?

> a dumb button Windows-like to kickstart the two line fix:
> # rm -f /var/lib/rpm/__db*
> # rpm -vv --rebuilddb
Well, as a simple-to-use DIY fix, you can create a desktop icon which executes a shell script. That itself has to be made executable, as does the desktop icon. But I could not crack immediately doing it as root...

> This is a perl problem, not Mageia
What makes you, Chris, say that?

CC: (none) => lewyssmith

Comment 18 Chris Kirsten 2020-02-05 05:08:22 CET
(In reply to Lewis Smith from comment #17)
> Hoping Thierry will comment.
> ---
> Having read through this extremely old bug, it is not stated apart from the
> initial Description:
> > The "rpmdrake" program crashed
> > I tried to run Install and Remove Software from the launcher menu
> in what circumstances the error occurs (direct use of an rpm command, or via
> Add/Remove Software, or MCC Update System); nor with what [in]consistency,
> nor [in]frequency. Does it recur if you re-try the operation a short time
> later?
I used the Mageia Control Center since I was looking for a command line package.  Easy search.  Then the crash happened and I resorted to using the CLI.  Same thing. 
> 
> It is unlikely that the problem stems from a corrupt database. Could the
> Perl open DB error be more fully reported to give a clue? I wondered whether 

This is the full report.

> this could arise if the DB is already locked (typically by the automatic
> update check); or whether that case is already explicitly catered for.
> 
> From comment 11:
> > propose a "fix" button in the error window (which would do the above
> > mentioned 2 commands rm -f /var/lib/rpm/__db* and rpm -vv --rebuilddb)
> Possible | reasonable ?
> 
> > a dumb button Windows-like to kickstart the two line fix:
> > # rm -f /var/lib/rpm/__db*
> > # rpm -vv --rebuilddb
> Well, as a simple-to-use DIY fix, you can create a desktop icon which
> executes a shell script. That itself has to be made executable, as does the
> desktop icon. But I could not crack immediately doing it as root...

Most likely permissions holding out against "criminal behaviour" through the desktop GUI.  But, thank you, Linux is getting very interesting indeed.

> 
> > This is a perl problem, not Mageia
> What makes you, Chris, say that?

Marja is bored flat with this, with good reason.  She could not find this needle in a haystack. And people do not respond.  Technically, this problem is not fixed.  It comes back.  Cauldron and RC's have changed over several versions.  Still there.  Ergo, highly unlikely that áll Mageia people would have missed this, given that they are Mageia developers and focused on that.  The bug, as I reported it, is perl specific.  The weird thing is that the "line 74" is the line shown on the desktop reporting the crash. Very dumb way to write a report for error checking. And another reason to suspect the quality.

No, I'm not throwing bricks or stones.  Mageia is my OS of choice.  Period.  We need to look for the real reason and the correct location.  MY CDI course instructor Brian keeps coming back at me;  "A computer does what you tell it to do, not what you meant it to do".  The exclusive OR in line code debugging tells me it is perl.
Comment 19 Chris Kirsten 2020-02-05 05:16:51 CET
(In reply to Chris Kirsten from comment #18)
> (In reply to Lewis Smith from comment #17)
> > Hoping Thierry will comment.
> > ---
> > Having read through this extremely old bug, it is not stated apart from the
> > initial Description:
> > > The "rpmdrake" program crashed
> > > I tried to run Install and Remove Software from the launcher menu
> > in what circumstances the error occurs (direct use of an rpm command, or via
> > Add/Remove Software, or MCC Update System); nor with what [in]consistency,
> > nor [in]frequency. Does it recur if you re-try the operation a short time
> > later?
> I used the Mageia Control Center since I was looking for a command line
> package.  Easy search.  Then the crash happened and I resorted to using the
> CLI.  Same thing.

Then I searched on the net for something because I forgot that I saved this two line fix about two years ago.  No, it does not just go away after a few hours.  Reminds me, I actually just dumped the issue for about two days before looking at it again.

> > 
> > It is unlikely that the problem stems from a corrupt database. Could the
> > Perl open DB error be more fully reported to give a clue? I wondered whether 
> 
> This is the full report.
> 
> > this could arise if the DB is already locked (typically by the automatic
> > update check); or whether that case is already explicitly catered for.
> > 
> > From comment 11:
> > > propose a "fix" button in the error window (which would do the above
> > > mentioned 2 commands rm -f /var/lib/rpm/__db* and rpm -vv --rebuilddb)
> > Possible | reasonable ?
> > 
> > > a dumb button Windows-like to kickstart the two line fix:
> > > # rm -f /var/lib/rpm/__db*
> > > # rpm -vv --rebuilddb
> > Well, as a simple-to-use DIY fix, you can create a desktop icon which
> > executes a shell script. That itself has to be made executable, as does the
> > desktop icon. But I could not crack immediately doing it as root...
> 
> Most likely permissions holding out against "criminal behaviour" through the
> desktop GUI.  But, thank you, Linux is getting very interesting indeed.
> 
> > 
> > > This is a perl problem, not Mageia
> > What makes you, Chris, say that?
> 
> Marja is bored flat with this, with good reason.  She could not find this
> needle in a haystack. And people do not respond.  Technically, this problem
> is not fixed.  It comes back.  Cauldron and RC's have changed over several
> versions.  Still there.  Ergo, highly unlikely that áll Mageia people would
> have missed this, given that they are Mageia developers and focused on that.
> The bug, as I reported it, is perl specific.  The weird thing is that the
> "line 74" is the line shown on the desktop reporting the crash. Very dumb
> way to write a report for error checking. And another reason to suspect the
> quality.
> 
> No, I'm not throwing bricks or stones.  Mageia is my OS of choice.  Period. 
> We need to look for the real reason and the correct location.  MY CDI course
> instructor Brian keeps coming back at me;  "A computer does what you tell it
> to do, not what you meant it to do".  The exclusive OR in line code
> debugging tells me it is perl.
Comment 20 Lewis Smith 2020-02-05 21:45:00 CET
@Chris
Apologies. Some of my questions were more aimed at Thierry; I would not expect you to have the answers!
Your last complaint comment 16 was for M6; are you still seeing the problem with M7?

> No, it does not just go away after a few hours.
I was thinking more of a few minutes. In what timescale does it go away? [I assume it does, otherwise the system would scarcely be usable).

@Thierry
Could the Perl open DB error be more fully reported to give a clue?
I wondered whether this could arise if the DB is already locked (typically by the automatic update check); or whether that case is already explicitly catered for.

CC: marja11 => (none)

Comment 21 Aurelien Oudelet 2020-08-06 16:11:30 CEST
Does this bug still apply in Mageia 7? Cauldron (8)?

--
Mageia Bugsquad

CC: (none) => ouaurelien

Comment 22 Aurelien Oudelet 2020-08-27 11:52:41 CEST
Since we have not received feedback to the information we have requested above, we will assume the problem was not reproducible, or has been fixed in one of the updates we have released for the reporter's distribution.

Users who have experienced this problem are encouraged to upgrade to the latest update of our distribution, and if this issue turns out to still be reproducible in the latest update, please reopen this bug with additional information.

Closing as OLD.

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


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