top and free report twice as much swap as I actually have

Bug #131188 reported by Glyphobet
4
Affects Status Importance Assigned to Milestone
procps (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Upon rebooting into 2.6.20-16-generic, top and free now report that I have 6GB of swap, as opposed to the 3GB that I have. Under previous kernel versions, I have always seen the correct amount of swap. There is no way I could have 6GB of swap; the partition is, and has always been, 3GB.

# top
top - 14:24:21 up 51 min, 9 users, load average: 0.40, 0.60, 1.11
Tasks: 141 total, 1 running, 140 sleeping, 0 stopped, 0 zombie
Cpu(s): 3.8%us, 0.2%sy, 0.0%ni, 96.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 1035780k total, 767544k used, 268236k free, 14104k buffers
Swap: 6072488k total, 34496k used, 6037992k free, 291508k cached

# free
             total used free shared buffers cached
Mem: 1035780 771692 264088 0 14848 294424
-/+ buffers/cache: 462420 573360
Swap: 6072488 34496 6037992

# cfdisk
                                  cfdisk 2.12r

                              Disk Drive: /dev/sda
                       Size: 250058301440 bytes, 250.0 GB
             Heads: 255 Sectors per Track: 63 Cylinders: 30401

    Name Flags Part Type FS Type [Label] Size (MB)
 ------------------------------------------------------------------------------
    sda1 Boot Primary Linux ext3 [/] 246947.59
    sda5 Logical Linux swap / Solaris 3109.16

Revision history for this message
Timo Aaltonen (tjaalton) wrote :

What does 'swapon -s' say?

Changed in procps:
status: New → Incomplete
Revision history for this message
Glyphobet (glyphobet) wrote :

# swapon -s
Filename Type Size Used Priority
/dev/sda5 partition 3036244 947632 -1
/dev/mapper/sda5 partition 3036244 0 -2

Revision history for this message
Timo Aaltonen (tjaalton) wrote :

Right, you have the same partition listed twice. Check your fstab :)

Not a bug.

Changed in procps:
status: Incomplete → Invalid
Revision history for this message
Glyphobet (glyphobet) wrote :

No, I don't have the same partition listed twice.

# cat /etc/fstab
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# /dev/sda1 -- converted during upgrade to edgy
UUID=6b1341c8-ae37-44e2-a4a0-eb987eeeb66f / ext3 defaults,noatime,errors=remount-ro 0 1
# /dev/sda5 -- converted during upgrade to edgy
UUID=0f66b4ca-b9cb-4058-836c-e41113b48c23 none swap sw 0 0
/dev/hdd /media/cdrom0 udf,iso9660 user,noauto 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto 0 0
/dev/fd0 /media/floppy1 auto rw,user,noauto 0 0
/dev/fd0 /media/floppy2 auto rw,user,noauto 0 0
/dev/fd0 /media/floppy3 auto rw,user,noauto 0 0
/dev/fd0 /media/floppy4 auto rw,user,noauto 0 0
/dev/fd0 /media/floppy5 auto rw,user,noauto 0 0
/dev/fd0 /media/floppy6 auto rw,user,noauto 0 0

Revision history for this message
Soren Hansen (soren) wrote :

Do you have evms installed? If you don't need, please it remove it, and you're likely to be much happier.

Revision history for this message
Glyphobet (glyphobet) wrote :

I *did* have evms installed at some point. The 7.04 to 7.10 upgrade introduced problems with evms, though ( http://brainsik.theory.org/.:./2007/ubuntu-710-gutsy-caveat-beware-evms/ ), so I removed it, and that was around the same time that this double-swap problem went away. Curious. :)

Revision history for this message
Chow Loong Jin (hyperair) wrote :

Not really curious. evms caused almost all partitions to have a duplicate in /dev/mapper and so broke mounting partitions as they claimed to have been locked or currently mounted. In this same way, there the partition is listed once in /dev/mapper/sda5 and /dev/sda5. Hence top and free see two swap partitions available and hence multiply your values by an order of 2.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.