Subject: [alpine-devel] busybox-1.23 in edge

From: Natanael Copa <[email-masked]>
Date: Thu, 25 Dec 2014 20:58:35 +0100

Hi,

I pushed busybox 1.23 to edge. So far I found at least one regression[1]
in ash and possibly another in modprobe.

After upgrading my laptop (both new kernel and new busybox) it didn't
load the ahci kernel module from initramfs so the harddisks was not
found. I don't know if this is due to something in new busybox or in
new kernel or if it affects other hardware.

To continue boot up from initramfs emergency shell i did something like:

  for i in $(find /sys -name uevent); do echo add > "$i"; done
  lvm pvscan
  lvm vgchange -a y
  mount /dev/vg0/lv_root /sysroot
  exit

If someone has time and wants to investigate, you could try install
v3.1 in a vm, then upgrade to edge. (do snapshot before the upgrade).

Please be careful if you are on edge now.

Thanks!

-nc

[1]:http://lists.busybox.net/pipermail/busybox/2014-December/082129.html

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---

---

From: Isaac Dunham <[email-masked]>
Date: Thu, 25 Dec 2014 16:12:32 -0800

> Please be careful if you are on edge now.

It sounds like it's a bug in busybox/whatever is doing coldplug; the
kernel is creating a uevent entry that corresponds to the hardware,
and it still has a modalias entry in ahci.ko (or you would need to 
modprobe ahci manually)
Or it could be the kernel creating the uevent but not the modalias
file--which is a known issue with some hardware;
the workaround is to use something like this:

find /sys -name uevent -exec grep -h MODALIAS= '{}' + | sort -u | \
    cut -c 10- |xargs modprobe -a 

HTH,
Isaac Dunham

---

---

From: Natanael Copa <[email-masked]>
Date: Fri, 26 Dec 2014 09:05:15 +0100

On Thu, 25 Dec 2014 16:12:32 -0800

> > new kernel or if it affects other hardware.

It did happen on my desktop too and I have a theory on whats going on.

> It sounds like it's a bug in busybox/whatever is doing coldplug;

Yes.

> the

Thank you very much for your input. I saw you suggested improvement in
our couldplug earlier. I didn't spend time on it partly because I
didn't feel it is broken, but mostly because I have some ideas how to
do this part proplerly with a netlink listener.

I tried your suggestion from emergency shell but disks didn't show up
so I don't think its the kernel that has changed. I think its new
busybox modprobe behavior introduced with upstream commit[1]
4e314faa0 (modprobe,rmmod: reject module names with slashes)

I think what happens is that if a slash (/) is found in the probe name,
modprobe will simply exit. We call it with: modprobe -a <alias1> <alias2> ...

So it means it will load all modules up to first alias which contains a
slash and then stop.

ncopa-desktop:~# find /sys -name uevent -exec grep -h MODALIAS= '{}' + 2>/dev/null | sort -u | grep -E 'pci|/' 
MODALIAS=dmi:bvnDellInc.:bvrA07:bd09/10/2011:svnDellInc.:pnOptiPlex790:pvr01:rvnDellInc.:rn0HY9JP:rvrA00:cvnDellInc.:ct6:cvr:
MODALIAS=pci:v00008086d00000100sv00001028sd000004ADbc06sc00i00
MODALIAS=pci:v00008086d00000102sv00001028sd000004ADbc03sc00i00
...

As you see, there are slashes in the dmi module and since we sort, dmi
will always come before pci. So the disk controllers are never loaded
and disks never found.

I think we should revert the upstream commit for now.

[1]:http://git.busybox.net/busybox/commit/modutils?id=4e314faa0aecb66717418e9a47a4451aec59262b

---

---

From: Natanael Copa <[email-masked]>
Date: Fri, 26 Dec 2014 10:14:21 +0100

On Fri, 26 Dec 2014 09:05:15 +0100

...
 
> I think we should revert the upstream commit for now.

I pushed a temp fix for busybox for now. I also bumped pkgrel for
mkinitfs to force a regeneration with fixed busybox.

The fixed was tested with success in qemu.

Thanks!

-nc

---

---

From: Isaac Dunham <[email-masked]>
Date: Fri, 26 Dec 2014 11:03:28 -0800

> The fixed was tested with success in qemu.

If there are slashes in some module aliases, the upstream commit is
based on a flawed assumption and should be reverted everywhere.

Thanks,
Isaac Dunham

---