growpart tickles overflow bug with big disks
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
busybox (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
cloud-initramfs-tools (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
If the number of blocks in a disk is greater than the maximum size of a signed 32-bit integer then growpart will fail in the initramfs.
This is because the 'test' function in busybox gives the incorrect answer with large numbers. Since the busybox test function works fine under 'libc' when a server is booted, it looks like the root cause is a 32-bit overflow fault in klibc.
To check for the problem, boot a server with a 'break init' option to force the initramfs to drop to a shell.
(initramfs) [ 2117696 -gt 2147483647 ]
(initramfs) echo $?
1
(initramfs) [ 2117696 -gt 2147483648 ]
(initramfs) echo $?
0
ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: cloud-initramfs
ProcVersionSign
Uname: Linux 3.0.0-16-generic x86_64
ApportVersion: 1.23-0ubuntu4
Architecture: amd64
CheckboxSubmission: 55cafa5b8b82ed2
CheckboxSystem: 3e53d3ea5811723
Date: Fri Mar 16 11:05:07 2012
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Release amd64 (20111012)
SourcePackage: cloud-initramfs
UpgradeStatus: No upgrade log present (probably fresh install)
Related branches
- Colin Watson: Approve
-
Diff: 42 lines (+10/-3)3 files modifieddebian/changelog (+7/-0)
debian/config/pkg/initramfs (+1/-1)
debian/control (+2/-2)
tags: | added: precise |
no longer affects: | klibc (Ubuntu) |
Changed in cloud-initramfs-tools (Ubuntu): | |
status: | New → Invalid |
Changed in busybox (Ubuntu): | |
status: | New → Fix Committed |
The initramfs uses a different version of busybox to standard (in package busybox-initramfs) - located in /usr/lib/ initramfs- tools/bin/ busybox
Running this version of busybox does exhibit the error on a normal server.
Checking the config in the package it appears that CONFIG_ FEATURE_ TEST_64 is not set for the initramfs version.