FS#16156 - [mkinitcpio] stalls during autodetect hook

Attached to Project: Arch Linux
Opened by Jackson (toomanymirrors) - Saturday, 12 September 2009, 14:35 GMT
Last edited by Thomas Bächler (brain0) - Friday, 19 February 2010, 17:28 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Tobias Powalowski (tpowa)
Aaron Griffin (phrakture)
Thomas Bächler (brain0)
Architecture x86_64
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
Updating any kernel26 pkg a second time stalls during the autodetect hook. After a reboot any kernel26 pkg will install normally, but once one has gone through the mkinitcpio steps, any second kernel26 pkg will fail to complete.

Additional info:
Output of pstree -al:
├─tilda
│ ├─bash -l
│ │ └─yaourt /usr/bin/yaourt -Su --aur
│ │ └─pacman --force --upgrade ./kernel26-bfs-2.6.31-1.211-x86_64.pkg.tar.gz
│ │ └─pacman --force --upgrade ./kernel26-bfs-2.6.31-1.211-x86_64.pkg.tar.gz
│ │ └─sh -c .\040/tmp/alpm_iOhh1e/.INSTALL;\040post_upgrade\0402.6.31-1.211\0402.6.30.6-1.209
│ │ └─mkinitcpio /sbin/mkinitcpio -p kernel26-bfs
│ │ └─mkinitcpio /sbin/mkinitcpio -k 2.6.31-bfs211-bfs -c /etc/mkinitcpio.conf -g /boot/kernel26-bfs.img
│ │ └─mkinitcpio /sbin/mkinitcpio -k 2.6.31-bfs211-bfs -c /etc/mkinitcpio.conf -g /boot/kernel26-bfs.img
│ │ ├─mkinitcpio /sbin/mkinitcpio -k 2.6.31-bfs211-bfs -c /etc/mkinitcpio.conf -g /boot/kernel26-bfs.img
│ │ │ └─mkinitcpio /sbin/mkinitcpio -k 2.6.31-bfs211-bfs -c /etc/mkinitcpio.conf -g /boot/kernel26-bfs.img
│ │ │ └─mkinitcpio /sbin/mkinitcpio -k 2.6.31-bfs211-bfs -c /etc/mkinitcpio.conf -g /boot/kernel26-bfs.img
│ │ ├─sort
│ │ └─uniq


Steps to reproduce:
yaourt -Sb kernel26-bfs;
yaourt -Sb kernel26;
If I reboot between these two steps everything works fine.
This task depends upon

Closed by  Thomas Bächler (brain0)
Friday, 19 February 2010, 17:28 GMT
Reason for closing:  Fixed
Additional comments about closing:  Should be fixed, and no further response to my requests for testing.
Comment by Gerardo Exequiel Pozzi (djgera) - Saturday, 12 September 2009, 14:53 GMT
  • Field changed: Status (Unconfirmed → Waiting on Response)
what happens if you use pacman directly? Remember that yaourt is unsupported.
Comment by Jackson (toomanymirrors) - Saturday, 12 September 2009, 17:48 GMT
Well it isn't yaourt that handles the install phase though but, after a reboot I then did a manual compile of the Arch kernel26 pkg from core:
mkdir /tmp/kernel26
cd /tmp/kernel26
curl http://repos.archlinux.org/viewvc.cgi/kernel26/repos/core-x86_64/PKGBUILD?view=co > PKGBUILD
curl http://repos.archlinux.org/viewvc.cgi/kernel26/repos/core-x86_64/config?view=co > config
curl http://repos.archlinux.org/viewvc.cgi/kernel26/repos/core-x86_64/config.x86_64?view=co > config.x86_64
curl http://repos.archlinux.org/viewvc.cgi/kernel26/repos/core-x86_64/kernel26.install?view=co > kernel26.install
curl http://repos.archlinux.org/viewvc.cgi/kernel26/repos/core-x86_64/kernel26.preset?view=co > kernel26.preset
makepkg -c
sudo pacman -U kernel26-2.6.30.6-1-x86_64.pkg.tar.gz

It then immediately got stuck at the autodetect phase. Here's the pstree -al output:
├─tilda
│ ├─bash -l
│ ├─bash -l
│ │ └─pacman -U kernel26-2.6.30.6-1-x86_64.pkg.tar.gz
│ │ └─pacman -U kernel26-2.6.30.6-1-x86_64.pkg.tar.gz
│ │ └─sh -c .\040/tmp/alpm_jGn85E/.INSTALL;\040post_upgrade\0402.6.30.6-1\0402.6.30.6-1
│ │ └─mkinitcpio /sbin/mkinitcpio -p kernel26
│ │ └─mkinitcpio /sbin/mkinitcpio -k 2.6.30-ARCH -c /etc/mkinitcpio.conf -g /boot/kernel26.img
│ │ └─mkinitcpio /sbin/mkinitcpio -k 2.6.30-ARCH -c /etc/mkinitcpio.conf -g /boot/kernel26.img
│ │ ├─mkinitcpio /sbin/mkinitcpio -k 2.6.30-ARCH -c /etc/mkinitcpio.conf -g /boot/kernel26.img
│ │ │ └─mkinitcpio /sbin/mkinitcpio -k 2.6.30-ARCH -c /etc/mkinitcpio.conf -g /boot/kernel26.img
│ │ │ └─mkinitcpio /sbin/mkinitcpio -k 2.6.30-ARCH -c /etc/mkinitcpio.conf -g /boot/kernel26.img
│ │ ├─sort
│ │ └─uniq

I don't have any external devices plugged in which was one suggested cause.
Comment by Thomas Bächler (brain0) - Monday, 21 September 2009, 22:56 GMT
This is probably filesystem autodetection. Can you run: find /dev -type b | grep -v -e /dev/loop -e /dev/ram -e /dev/fd

This code is crap anyway, I am wondering how we could do it better.
Comment by Jackson (toomanymirrors) - Tuesday, 22 September 2009, 23:57 GMT
sudo find /dev -type b | grep -v -e /dev/loop -e /dev/ram -e /dev/fd
/dev/sdi
/dev/sdh
/dev/sdg
/dev/sdf
/dev/sde
/dev/sr0
/dev/sdd2
/dev/sdd1
/dev/sda2
/dev/sdc1
/dev/sdc2
/dev/sda1
/dev/sdb1
/dev/sdb2
/dev/sdd
/dev/sda
/dev/sdc
/dev/sdb
/dev/md1
/dev/md0
/dev/mapper/array-home
/dev/mapper/array-root
/dev/mapper/array-var
Comment by Thomas Bächler (brain0) - Wednesday, 23 September 2009, 08:17 GMT
Quite a lot of devices, and probably some of them hang when being accessed to probe the filesystem. What are sd{e,f,g,h,i}. Obviously, we need a better probe method for filesystem autodetection, as we cannot simply access any device.

Does "blkid -s TYPE -o value | sort -u" hang for you? What is the output?
Comment by Jackson (toomanymirrors) - Thursday, 24 September 2009, 00:32 GMT
Nope, doesn't hang.

LVM2_member
ext2
ext4
linux_raid_member
Comment by Thomas Bächler (brain0) - Thursday, 24 September 2009, 07:28 GMT
Okay, we should do that then. blkid is a bit of an ass, as it doesn't work with some combinations of options which would make sense. The mkinitcpio overhaul will fix this autodetection code.
Comment by Not Important (pholie) - Thursday, 29 October 2009, 01:25 GMT
I have this problem everytime I install new kernel.

# find /dev -type b | grep -v -e /dev/loop -e /dev/ram -e /dev/fd
/dev/sda1
/dev/sda4
/dev/sda2
/dev/sda3
/dev/sda
/dev/sr0


# blkid -s TYPE -o value | sort -u
-bash: blkid: command not found

(the command used to work before some updates)
Comment by Aaron Griffin (phrakture) - Friday, 30 October 2009, 05:05 GMT
blkid is owned by util-linux-ng and is in /sbin. Make sure the package is installed and /sbin is in your path
Comment by Not Important (pholie) - Friday, 30 October 2009, 15:40 GMT
Thanks, I reinstalled util-linux-ng and blkid is there again. Now I tried mkinitcpio and worked without problem. I will report if it still fails.
Comment by Thomas Bächler (brain0) - Saturday, 06 February 2010, 16:43 GMT
If possible, please try the kill-klibc branch of mkinitcpio, see http://mailman.archlinux.org/pipermail/arch-dev-public/2010-January/015117.html (comments about testing are not valid anymore, this will work perfectly without testing). The problem is hopefully solved there, please verify.
Comment by Thomas Bächler (brain0) - Sunday, 07 February 2010, 20:53 GMT
This version is in testing now, please test.

Loading...