Bug 8158

Summary: Urpmi fails to install updates (segfault with big transactions)
Product: Mageia Reporter: Juergen Harms <juergen.harms>
Component: RPM PackagesAssignee: Thierry Vignaud <thierry.vignaud>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: Normal CC: kbergen, tmb
Version: Cauldron   
Target Milestone: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Source RPM: urpmi CVE:
Status comment:
Attachments: Copy/paste of the konsole commands and response
Copy/paste of konsole output according to Comment #2

Description Juergen Harms 2012-11-19 21:15:52 CET
Description of problem:

After a clean install of Mageia3 Alpha3 I do:
1. configure the media (tried both with MandrivaUsersDE and the uni-geneva mirror)
2. urpmi.update --auto-select.

Urpmi then enumerates 4 items:

meta-task
perl-URPM
urpmi
deltarpm

then says "restarting urpmi" and "Segmentation fault"

If, after that, I try doing urpmi again, I get 6 times the message (with <nn> = 1,,6)
BDB2053 Freeing read locks for locker 0xM<nn>: 2796/140598732719872
again ending in a new  segmentation fault.

I will add an attachment with a copy/paste of the konsole dialog

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


How reproducible:
100%


Steps to Reproduce:
See description above

Note: I am having a similar problem on another filesystem, where I had installed Alpha2 and kept it up to date with incremental updates: after updating urpmi to urpmi-7.1.1-1 two days ago, I also got stuck there
Comment 1 Juergen Harms 2012-11-19 21:17:53 CET
Created attachment 3129 [details]
Copy/paste of the konsole commands and response
Manuel Hiebel 2012-11-19 21:47:20 CET

Attachment 3129 mime type: application/octet-stream => text/plain

Manuel Hiebel 2012-11-19 21:48:31 CET

Assignee: bugsquad => thierry.vignaud
Summary: Urpmi fails to install updates => Urpmi fails to install updates (Freeing read locks for locker 0x1)
Source RPM: (none) => urpmi

Comment 2 Thierry Vignaud 2012-11-19 22:24:33 CET
Can you reproduce the segfault?
If yes, can you:
1) enable the debug media in rpmdrake,
2) then install glibc-debug, rpm-debug, perl-debug, perl-URPM-debug & gdb packages
3) run "gdb -q --args perl /usr/sbin/urpmi --auto-select"
4) type "run"
5) wait for it to segfault
6) type "bt"
7) copy the backtrace displayed by gdb in a text file you'll attach to this bug report.
Thierry Vignaud 2012-11-19 22:25:23 CET

Keywords: (none) => NEEDINFO

Thierry Vignaud 2012-11-19 22:25:45 CET

Summary: Urpmi fails to install updates (Freeing read locks for locker 0x1) => Urpmi fails to install updates (segfault)

Comment 3 Ken Bergen 2012-11-20 05:34:02 CET
I'm seeing the same.

One thing I've noticed is it doesn't happen if fewer than 500 packages or so are to be installed. 

Also of note is that installing the same packages through the GUI doesn't result in the segmentation fault. 
There is when using the GUI usually, maybe always, one or more packages that fail to install but the rest do.

CC: (none) => kbergen

Comment 4 Juergen Harms 2012-11-20 10:17:04 CET
Created attachment 3133 [details]
Copy/paste of konsole output according to Comment #2

This has konsole dialog has been obtained after the second segfault (problem description - the one that gives the "... Freeing read locks ..." messages).
Comment 5 Juergen Harms 2012-11-20 10:24:27 CET
Thank you Ken - I started having doubts why I was the only one to observe this problem.

I have now attached the konsole dialog as requested by Thierry - it is the one I obtain after the second segfault (see problem description - the one that gives the "... Freeing read locks ..." messages). Thierry, in case the original one - the one that happens immediately after the install, would help, say so. It would require doing a fresh install of my test partition, but that does not take too much time.

And thanks for correcting the subject line - it was wrong, in fact urpmi does install, but than breaks (and sounds like a headline of some of those popular journals)
Comment 6 Juergen Harms 2012-11-20 12:05:43 CET
Ken, I applied some kind of work-around to get back to normal on my "production" file-system with Mageia 3 Alpha:
- I used rpm -i --force to reload urpmi-7.10-1 and perl-URPM-4.15.1-1, and did rpm -e to remove the newly installed packages (no idea whether this is necessary for perl-URPM - did it to be on the safe side).
- I added urpmi and perl-URPM in the skip-list (both versioned to avoid mis-chief in case I forget to remove these items)

When I then did urpmi--auto-select, urpmi wants to redo everything - did not take excessively long since I have all but the most recent update packages on a local mirror
Comment 7 Thierry Vignaud 2012-11-20 19:41:01 CET
I need the following from someone who can reproduce thus bug:
Once you got the segfault, do not do anything but just run this:

urpmi --auto-select --bug=bug8158
tar cfa bug8158{.tar.xz,}
This way, I might be able to reproduce it and hopefully debug it

Then send me by email the bug8158.tar.xz file resulting from those commands.
Comment 8 Thierry Vignaud 2012-11-20 19:43:10 CET
That please do not do what's advised in comment #6
Else I won't be able to debug this bug report.

CC: (none) => tmb

Comment 9 Ken Bergen 2012-11-20 20:05:02 CET
After using drakrpm-update to update I am no longer able to reproduce the bug. 
If Mr. Harms is unable to reproduce it I could do a fresh install later in the week.
Comment 10 Thierry Vignaud 2012-11-20 20:17:46 CET
I eventually have found a way of reproducing it:
ROOT=/T
mkdir $ROOT/dev -p
urpmi.addmedia --distrib /mageia/stable/x86_64/ --urpmi-root $ROOT
# initscripts vs ppp conflicts:
echo ppp > $ROOT/etc/urpmi/skip.list
urpmi --urpmi-root $ROOT basesystem task-kde4 --auto --justdb
urpmi.removemedia --urpmi-root $ROOT -a
urpmi.addmedia --distrib /mageia/unstable/x86_64/ --urpmi-root $ROOT
urpmi --urpmi-root $ROOT --auto-select --auto --justdb

Keywords: NEEDINFO => (none)
Status: NEW => ASSIGNED
Summary: Urpmi fails to install updates (segfault) => Urpmi fails to install updates (segfault with big transactions)

Comment 11 Juergen Harms 2012-11-20 20:44:04 CET
Re comment #8: I did that on another OS partition, the one on which I documented the bug is in its original state, I keep it as a guinea-pig file-system.
Comment 12 Thierry Vignaud 2012-11-21 03:31:35 CET
Fixed

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