Bug 11109 - MageiaUpdate frozen when a kernel update is on a big list of package to update
Summary: MageiaUpdate frozen when a kernel update is on a big list of package to update
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: x86_64 Linux
Priority: Normal critical
Target Milestone: ---
Assignee: Thierry Vignaud
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-30 02:01 CEST by Yann Ciret
Modified: 2016-01-22 08:20 CET (History)
3 users (show)

See Also:
Source RPM: rpmdrake-5.49-1.mga3.src.rpm
CVE:
Status comment:


Attachments

Description Yann Ciret 2013-08-30 02:01:43 CEST
Description of problem:

The problem occurs in a VirtualBox 64bit machine. On KDE, mgaapplet indicates there is update available. Launch MageiaUpdate via mgaapplet and launch update for all packages (more than hundred in my case). When it tries to update the kernel, the process freeze.

[root@cauldron ~]# ps -ef|grep mga
yann      2879  2711  0 Aug29 ?        00:00:06 /usr/bin/perl /usr/bin/mgaapplet
root     21785 17369  0 Aug29 ?        00:00:00 /bin/sh /sbin/installkernel 3.10.9-desktop-1.mga4
root     21786 21785  0 Aug29 ?        00:00:00 /usr/bin/perl /sbin/bootloader-config --kernel-version 3.10.9-desktop-1.mga4 --initrd-options  --action add-kernel
root     27411 27252  0 01:38 pts/1    00:00:00 grep --color mga
[root@cauldron ~]# ps -ef|grep rpm
root     17369 15942  0 Aug29 ?        00:00:00 /bin/sh /var/tmp/rpm-tmp.YIARX7 0
root     27418 27252  0 01:38 pts/1    00:00:00 grep --color rpm
[root@cauldron ~]# ps -ef|grep Mageia
yann     15924  2879  0 Aug29 ?        00:00:00 MageiaUpdate --no-media-update --no-confirmation --no-splash
root     15931 15924  0 Aug29 ?        00:00:00 /usr/sbin/userhelper -w MageiaUpdate --no-media-update --no-confirmation --no-splash
root     15942 15931  2 Aug29 ?        00:03:44 /usr/bin/perl /usr/sbin/MageiaUpdate --no-media-update --no-confirmation --no-splash
root     27433 27252  0 01:38 pts/1    00:00:00 grep --color Mageia




Version-Release number of selected component (if applicable):
I have the problem since mga2, but I install a clean mga3 before switch to cauldron.


If I use in a shell "urpmi --auto-update", the problem never occurs.

Reproducible: 

Steps to Reproduce:
Manuel Hiebel 2013-08-30 16:27:54 CEST

CC: (none) => tmb
Assignee: bugsquad => thierry.vignaud

Comment 1 Yann Ciret 2013-09-09 21:20:44 CEST
Just a precision: After made a kill -9 on process 21785 (/bin/sh /sbin/installkernel 3.10.9-desktop-1.mga4), MageiaUpdate continue others update.

So the problem seem to be the call of installkernel script by MageiaUpdate.
Comment 2 Thierry Vignaud 2013-12-28 00:06:30 CET
The issue is that:
1) kernel post scripts consumes quite some time
2) rpm doesn't enables to follow script progress
   (which would be hard to do anyway)
Comment 3 Yann Ciret 2013-12-30 07:41:45 CET
The problem is always here in Cauldron. I just encounter it.
Comment 4 Yann Ciret 2013-12-30 07:47:48 CET
Finally I think the problem is in installkernel.

If I launch « /sbin/installkernel 3.12.6-desktop-2.mga4 » in a root terminal, the command is never ending.
Comment 5 Yann Ciret 2013-12-30 07:52:24 CET
After dig, this is the command never ending :
/usr/bin/perl /sbin/bootloader-config --kernel-version 3.12.6-desktop-2.mga4 --initrd-options  --action add-kernel
Comment 6 Yann Ciret 2013-12-30 08:04:25 CET
The option « --action add-kernel » is false. It does not exist.

The possibility for this option are :
remove-kernel
add-entry
remove-entry
update-splash
remove-splash
rebuild-initrds
migrate-to-uuids
Comment 7 Yann Ciret 2013-12-30 08:12:33 CET
oops, forget my last comment
Comment 8 Thierry Vignaud 2013-12-30 10:27:23 CET
It's just that it can take quite some time on some machines.
If you kill the script that runs dracut/mkinitrd, you can end in having unbootable entries in your boot menu

CC: (none) => mageia

Comment 9 Yann Ciret 2013-12-30 11:17:00 CET
But in this case, the script do nothing.
After reboot the vm and launch it manually, it works well. I do not know why sometimes it freeze.
Comment 10 Colin Guthrie 2013-12-30 13:54:17 CET
When it's frozen, can you work out what command installkernel has shelled out to? e.g. does it have any child processes (see pstree output or use ps -H switch)

I doubt the installkernel script itself has frozen so it's important to find which command causes it problems.

Note that I've been updating kernels via MageiaUpdate for years on Cauldron and have not encountered this issue.
Comment 11 Yann Ciret 2013-12-30 14:13:27 CET
I think it is this command :
/usr/bin/perl /sbin/bootloader-config --kernel-version 3.12.6-desktop-2.mga4 --initrd-options  --action add-kernel

But I need to verify this point at the next freeze.
Comment 12 Colin Guthrie 2013-12-30 14:32:22 CET
This command itself should spawn others, and I suspect it's one of these other commands that is locking things up in some capacity. So please check for children of this process.
Comment 13 Yann Ciret 2014-01-06 07:55:33 CET
I have a freeze this morning. I have this result with pstree :

        â          ââmgaappletââ¬âdrakrpm-updateââ¬âshâââswitch-themesâââbootloader-conf
        â          â           â                ââ{gmain}
        â          â           ââ{gdbus}
        â          â           ââ{gmain}
        â          â           ââ{threaded-ml}
Comment 14 Yann Ciret 2014-01-07 08:00:04 CET
Detail of problematic command :
/usr/bin/perl /usr/sbin/bootloader-config --action update-splash
Comment 15 Nic Baxter 2015-12-24 05:24:02 CET
[nic@localhost packages]$ sudo /usr/bin/perl /usr/sbin/bootloader-config --action update-splash
[sudo] password for nic: 
defaulting background resolution to 1024x768
defaulting background resolution to 1024x768
[nic@localhost packages]$ 


Are you still having the issue?

CC: (none) => nic

Comment 16 Yann Ciret 2016-01-22 08:20:32 CET
No, I can not reproduced it now in cauldron.
I close this bug.

Thank you

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


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