-virtual kernel contains too many modules

Bug #621175 reported by Scott Moser
22
This bug affects 3 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
High
Unassigned
Maverick
High
Unassigned

Bug Description

the -virtual kernel changed in size from a ~ 10M deb to a ~ 33M :

$ ls -lh 2.6.35-1*/*.deb | awk '{print $5,$8}'
9.9M 2.6.35-15.21/linux-image-2.6.35-15-virtual_2.6.35-15.21_amd64.deb
9.7M 2.6.35-15.21/linux-image-2.6.35-15-virtual_2.6.35-15.21_i386.deb
33M 2.6.35-16.22/linux-image-2.6.35-16-virtual_2.6.35-16.22_amd64.deb
33M 2.6.35-16.22/linux-image-2.6.35-16-virtual_2.6.35-16.22_i386.deb

It appears it that all the -server kernel modules got enabled or collected. Ie, in diff of filecontents, we see stuff like:
+/kernel/drivers/input/touchscreen/88pm860x-ts.ko
+/kernel/drivers/input/touchscreen/ad7877.ko
+/kernel/drivers/input/touchscreen/ad7879.ko
+/kernel/drivers/input/touchscreen/ads7846.ko

As shown above, this occurred between 2.6.35-15.21 and 2.6.35-16.22

ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: linux-image-2.6.35-16-virtual 2.6.35-16.22
Regression: Yes
Reproducible: Yes
ProcVersionSignature: User Name 2.6.35-16.22-virtual 2.6.35.2
Uname: Linux 2.6.35-16-virtual i686
AlsaDevices: Error: command ['ls', '-l', '/dev/snd/'] failed with exit code 2: ls: cannot access /dev/snd/: No such file or directory
AplayDevices: Error: [Errno 2] No such file or directory
Architecture: i386
ArecordDevices: Error: [Errno 2] No such file or directory
CurrentDmesg: [ 12.652014] eth0: no IPv6 routers present
Date: Fri Aug 20 14:22:54 2010
Ec2AMI: ami-f6f71d9f
Ec2AMIManifest: ubuntu-images-testing-us/ubuntu-maverick-daily-i386-server-20100820.manifest.xml
Ec2AvailabilityZone: us-east-1b
Ec2InstanceType: m1.small
Ec2Kernel: aki-407d9529
Ec2Ramdisk: unavailable
Lspci:

Lsusb: Error: command ['lsusb'] failed with exit code 1:
ProcCmdLine: root=LABEL=uec-rootfs ro
ProcEnviron:
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcModules: acpiphp 17239 0 - Live 0xedc11000
SourcePackage: linux

Revision history for this message
Scott Moser (smoser) wrote :
Revision history for this message
Scott Moser (smoser) wrote :

$ for x in */*.deb; do echo "$x" ; dpkg -I "$x" | grep "Installed-Size"; done
2.6.35-15.21/linux-image-2.6.35-15-virtual_2.6.35-15.21_amd64.deb
 Installed-Size: 29784
2.6.35-15.21/linux-image-2.6.35-15-virtual_2.6.35-15.21_i386.deb
 Installed-Size: 24788
2.6.35-16.22/linux-image-2.6.35-16-virtual_2.6.35-16.22_amd64.deb
 Installed-Size: 135432
2.6.35-16.22/linux-image-2.6.35-16-virtual_2.6.35-16.22_i386.deb
 Installed-Size: 105320

Revision history for this message
Mathias Gug (mathiaz) wrote :

This breaks the minimal-virtual iso test case.

Changed in linux (Ubuntu):
status: New → Triaged
importance: Undecided → Medium
Changed in linux (Ubuntu Maverick):
milestone: none → ubuntu-10.10
Thierry Carrez (ttx)
tags: added: server-mrs
Thierry Carrez (ttx)
tags: added: server-mro
removed: server-mrs
tags: added: iso-testing
Revision history for this message
Leann Ogasawara (leannogasawara) wrote :

I'm appears to be related to the fact that we uploaded the linux_2.6.35.orig.tar.gz with the 2.6.35-16.22 upload. And subsequently in the rush to get the 2.6.35-19.28 beta kernel uploaded to re-generate the armel udebs that were removed from the archive, it too re-uploaded linux_2.6.35.orig.tar.gz. Examining the latest 2.6.35-20.29 kernel, the size appears to be back down as it should be:

https://edge.launchpad.net/ubuntu/+source/linux/2.6.35-20.29

$ ls -lh *.deb | awk '{print $5,$8}'
9.9M linux-image-2.6.35-20-virtual_2.6.35-20.29_amd64.deb
9.8M linux-image-2.6.35-20-virtual_2.6.35-20.29_i386.deb

I'm therefore closing this bug for now as this should no longer be an issue going forward.

Changed in linux (Ubuntu Maverick):
status: Triaged → Fix Released
Revision history for this message
Leann Ogasawara (leannogasawara) wrote :

Hrm, re-opening this as the latest 2.6.35-20.31 virtual kernels are still showing up at the larger size:

$ ls -sh *.deb
33M linux-image-2.6.35-21-virtual_2.6.35-21.31_amd64.deb
33M linux-image-2.6.35-21-virtual_2.6.35-21.31_i386.deb

I'm investigating the build logs from the buildd's for a clue as I'm not able to reproduce these larger debs when building locally.

Changed in linux (Ubuntu Maverick):
importance: Medium → High
status: Fix Released → In Progress
Revision history for this message
Leann Ogasawara (leannogasawara) wrote :

I examined the build logs from the actual buildd's:

http://launchpadlibrarian.net/55565061/buildlog_ubuntu-maverick-amd64.linux_2.6.35-21.31_FULLYBUILT.txt.gz

I noticed something peculiar in the 2.6.35-21.31 build log:

#
# Remove all modules not in the inclusion list.
#
if [ -f debian.master/control.d/virtual.inclusion-list ] ; then \
  debian/scripts/module-inclusion /build/buildd/linux-2.6.35/debian/linux-image-2.6.35-21-virtual/lib/modules/2.6.35-21-virtual/kernel \
   debian.master/control.d/virtual.inclusion-list 2>&1 | \
    tee virtual.inclusion-list.log; \
  /sbin/depmod -b /build/buildd/linux-2.6.35/debian/linux-image-2.6.35-21-virtual -ea -F /build/buildd/linux-2.6.35/debian/linux-image-2.6.35-21-virtual/boot/System.map-2.6.35-21-virtual \
   2.6.35-21-virtual 2>&1 |tee virtual.depmod.log; \
 fi
/bin/bash: line 1: debian/scripts/module-inclusion: Permission denied

Due to the Permission denied error, the virtual images are not removing all the modules not in the inclusion list, thus resulting in the larger -virtual deb size. When doing dpkg-buildpackage -S -rfakeroot... with the orig.tar.gz I noticed the following warning:

dpkg-source: warning: executable mode 0755 of 'debian/scripts/module-inclusion' will not be represented in diff

Thus it seems the executable permissions for debian/scripts/module-inclusion are not represented which results in the Permission denied error. To test this, I removed the executable permissions for debian/scripts/module-inclusion from my local test build and was able to reproduce the Permission denied error. Applying the following patch to execute debian/scripts/module-inclusion within a sub-shell seems to have resolved the issue. I've sent this to the Ubuntu kernel team mailing list for feedback. Thanks.

https://lists.ubuntu.com/archives/kernel-team/2010-September/012763.html

diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/2-binary-arch.mk
index da93e4d..1d26496 100644
--- a/debian/rules.d/2-binary-arch.mk
+++ b/debian/rules.d/2-binary-arch.mk
@@ -82,7 +82,7 @@ endif
  # Remove all modules not in the inclusion list.
  #
  if [ -f $(DEBIAN)/control.d/$(target_flavour).inclusion-list ] ; then \
- $(DROOT)/scripts/module-inclusion $(pkgdir)/lib/modules/$(abi_release)-$*/kernel \
+ $(SHELL) $(DROOT)/scripts/module-inclusion $(pkgdir)/lib/modules/$(abi_release)-$*/kernel \
    $(DEBIAN)/control.d/$(target_flavour).inclusion-list 2>&1 | \
     tee $(target_flavour).inclusion-list.log; \
   /sbin/depmod -b $(pkgdir) -ea -F $(pkgdir)/boot/System.map-$(abi_release)-$* \

Changed in linux (Ubuntu Maverick):
status: In Progress → Fix Committed
Revision history for this message
kernel-janitor (kernel-janitor) wrote :
Changed in linux (Ubuntu Maverick):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers