/proc/mounts has lines with embedded spaces, update-manager doesn't understand them

Bug #112272 reported by Adam on 2007-05-04
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
update-manager (Ubuntu)
Michael Vogt

Bug Description

Binary package hint: update-manager

upgrade tool crash before getting downloading

Traceback (most recent call last):
  File "/tmp/kde-root/adept_manager6vJwfa.tmp-extract/dist-upgrade.py", line 56, in ?
  File "/tmp/kde-root/adept_manager6vJwfa.tmp-extract/DistUpgradeControler.py", line 1025, in run
  File "/tmp/kde-root/adept_manager6vJwfa.tmp-extract/DistUpgradeControler.py", line 1000, in fullUpgrade
    if not self.askDistUpgrade():
  File "/tmp/kde-root/adept_manager6vJwfa.tmp-extract/DistUpgradeControler.py", line 604, in askDistUpgrade
    if not self._checkFreeSpace():
  File "/tmp/kde-root/adept_manager6vJwfa.tmp-extract/DistUpgradeControler.py", line 551, in _checkFreeSpace
    (what, where, fs, options, a, b) = line.split()
ValueError: too many values to unpack

Paul Dufresne (paulduf) on 2007-11-14
description: updated
Changed in update-manager:
status: New → Confirmed
Changed in update-manager:
importance: Undecided → Medium

Additional information from duplicate bug report:

cat /proc/mounts

rootfs / rootfs rw 0 0
none /sys sysfs rw,nosuid,nodev,noexec 0 0
none /proc proc rw,nosuid,nodev,noexec 0 0
udev /dev tmpfs rw 0 0
/dev/root / xfs rw 0 0
/dev/root /dev/.static/dev xfs rw 0 0
tmpfs /var/run tmpfs rw,nosuid,nodev,noexec 0 0
tmpfs /var/lock tmpfs rw,nosuid,nodev,noexec 0 0
tmpfs /dev/shm/var.run tmpfs rw,nosuid,nodev,noexec 0 0
tmpfs /dev/shm/var.lock tmpfs rw,nosuid,nodev,noexec 0 0
tmpfs /dev/shm tmpfs rw 0 0
devpts /dev/pts devpts rw 0 0
usbfs /dev/bus/usb/.usbfs usbfs rw 0 0
udev /proc/bus/usb tmpfs rw 0 0
usbfs /proc/bus/usb/.usbfs usbfs rw 0 0
tmpfs /var/run tmpfs rw,nosuid,nodev,noexec 0 0
tmpfs /var/lock tmpfs rw,nosuid,nodev,noexec 0 0
//fileserv/eng /mnt/shares/eng cifs rw,mand,nosuid,nodev,noexec,unc=\\fileserv\eng,username=dtjl,domain=,rsize=16384,wsize=57344 0 0
//fileserv/qa /mnt/shares/qa cifs rw,mand,nosuid,nodev,noexec,unc=\\fileserv\qa,username=dtjl,domain=,rsize=16384,wsize=57344 0 0
//fileserv/data /mnt/shares/data cifs rw,mand,nosuid,nodev,noexec,unc=\\fileserv\data,username=dtjl,domain=,rsize=16384,wsize=57344 0 0
//fileserv/admin /mnt/shares/admin cifs rw,mand,nosuid,nodev,noexec,unc=\\fileserv\admin,username=dtjl,domain=,rsize=16384,wsize=57344 0 0
//fileserv/xfer /mnt/shares/xfer cifs rw,mand,nosuid,nodev,noexec,unc=\\fileserv\xfer,username=dtjl,domain=,rsize=16384,wsize=57344 0 0
//fileserv/trantor_backup /mnt/shares/backup cifs rw,mand,nosuid,nodev,noexec,unc=\\fileserv\trantor_backup,username=dtjl,domain=,rsize=16384,wsize=57344 0 0
//winserv/CD\040Masters /mnt/shares/cd_masters cifs rw,mand,nosuid,nodev,noexec,unc=\\winserv\CD Masters,username=dtjl,domain=,rsize=16384,wsize=57344 0 0
//sarmila/svn$ /home/sarmila/spsvn cifs rw,mand,nosuid,nodev,unc=\\sarmila\svn$,username=dtsp,domain=,rsize=16384,wsize=57344 0 0
//jeremy/svn$ /home/jeremy/jdsvn cifs rw,mand,nosuid,nodev,unc=\\jeremy\svn$,username=dtjd,domain=,rsize=16384,wsize=57344 0 0

to be removed (liw) wrote :

I note that one of the lines in /proc/mounts has 7 fields instead of 6:

//winserv/CD\040Masters /mnt/shares/cd_masters cifs rw,mand,nosuid,nodev,noexec,unc=\\winserv\CD Masters,username=dtjl,domain=,rsize=16384,wsize=57344 0 0

The problem here is that the options field embeds a space ("unc=\\winserv\CD Masters"), which it shouldn't. The other fields that have spaces encode them ("//winserv/CD\040Masters"), so the options field should do that as well. That makes this a kernel bug, perhaps.

to be removed (liw) wrote :

The current update-manager code has this in file DistUpgrade/DistUpgradeCache.py, method checkFreeSpace. It now ignores any /proc/mounts lines it can't parse (that do not have exactly six space-delimited fields).

Michael Vogt (mvo) wrote :

This is fixed in the current code, it will no longer crash but ignore lines it does not understand.

Changed in update-manager (Ubuntu):
assignee: nobody → mvo
status: Confirmed → Fix Released
to be removed (liw) wrote :

I've verified that /etc/mtab correctly encodes a mount option that contains spaces, but it seems that /proc/mounts does not. /proc/mounts does encode a mount point or device with spaces so it would seem logical the same encoding could be used for mount options.

to be removed (liw) wrote :

/dev/loop\040nolla /home/liw/update-manager/foo\040bar iso9660 rw,loop=/dev/loop\040nolla 0 0

That's how the line looks in mtab. Unfortunately, I couldn't figure out a way to get the option into /proc/mounts myself.

tags: added: kj-omit
Jeremy Foshee (jeremyfoshee) wrote :

Hi Adam,

This bug was reported a while ago and there hasn't been any activity in it recently. We were wondering if this is still an issue? Can you try with the latest development release of Ubuntu? ISO CD images are available from http://cdimage.ubuntu.com/releases/ .

If it remains an issue, could you run the following command from a Terminal (Applications->Accessories->Terminal). It will automatically gather and attach updated debug information to this report.

apport-collect -p linux 112272

Also, if you could test the latest upstream kernel available that would be great. It will allow additional upstream developers to examine the issue. Refer to https://wiki.ubuntu.com/KernelMainlineBuilds . Once you've tested the upstream kernel, please remove the 'needs-upstream-testing' tag. This can be done by clicking on the yellow pencil icon next to the tag located at the bottom of the bug description and deleting the 'needs-upstream-testing' text. Please let us know your results.

Thanks in advance.

    [This is an automated message. Apologies if it has reached you inappropriately; please just reply to this message indicating so.]

tags: added: needs-kernel-logs
tags: added: needs-upstream-testing
tags: added: kj-triage
Changed in linux (Ubuntu):
status: New → Incomplete
dino99 (9d9) wrote :

closing that old report, as it has not got recent comment.

Changed in linux (Ubuntu):
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers