Bug 517833 - SwapError: swapon failed for '/dev/vdb1'
Summary: SwapError: swapon failed for '/dev/vdb1'
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: anaconda
Version: rawhide
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Joel Andres Granados
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: anaconda_trace_hash:1ca89e6a01ae5b8df...
: 505126 (view as bug list)
Depends On:
Blocks: F12Beta, F12BetaBlocker
TreeView+ depends on / blocked
 
Reported: 2009-08-17 12:35 UTC by James Laska
Modified: 2013-09-02 06:39 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-09-14 17:19:36 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Attached traceback automatically from anaconda. (235.09 KB, text/plain)
2009-08-17 12:35 UTC, James Laska
no flags Details

Description James Laska 2009-08-17 12:35:14 UTC
The following was filed automatically by anaconda:
anaconda 12.15 exception report
Traceback (most recent call first):
  File "/usr/lib/anaconda/storage/devicelibs/swap.py", line 86, in swapon
    raise SwapError("swapon failed for '%s'" % device)
  File "/usr/lib/anaconda/storage/formats/swap.py", line 119, in setup
    swap.swapon(self.device, priority=self.priority)
  File "/usr/lib/anaconda/storage/__init__.py", line 1556, in turnOnSwap
    device.format.setup()
  File "/usr/lib/anaconda/packages.py", line 196, in turnOnFilesystems
    anaconda.id.storage.fsset.turnOnSwap(anaconda)
  File "/usr/lib/anaconda/dispatch.py", line 204, in moveStep
    rc = stepFunc(self.anaconda)
  File "/usr/lib/anaconda/dispatch.py", line 127, in gotoNext
    self.moveStep()
  File "/usr/lib/anaconda/dispatch.py", line 226, in currentStep
    self.gotoNext()
  File "/usr/lib/anaconda/gui.py", line 1234, in setScreen
    (step, anaconda) = self.anaconda.dispatch.currentStep()
  File "/usr/lib/anaconda/gui.py", line 1402, in setup_window
    self.setScreen()
  File "/usr/lib/anaconda/gui.py", line 1412, in run
    self.setup_window(runres)
  File "/usr/lib/anaconda/gui.py", line 1154, in run
    self.icw.run (self.runres)
  File "/usr/bin/anaconda", line 981, in <module>
    anaconda.intf.run(anaconda)
SwapError: swapon failed for '/dev/vdb1'

Comment 1 James Laska 2009-08-17 12:35:20 UTC
Created attachment 357644 [details]
Attached traceback automatically from anaconda.

Comment 2 Joel Andres Granados 2009-08-18 09:28:51 UTC
We call `swapon /dev/vdb1` which, to me, is what we need to be doing.  Can this error be in the swapon command.  Can you create a swap on a vdX device and swapon on a running system?

Comment 3 James Laska 2009-08-21 16:11:56 UTC
# cat /proc/swaps 
Filename				Type		Size	Used	Priority
/dev/mapper/vg_test1222-lv_swap         partition	1998840	0	-1

# swapoff /dev/mapper/vg_test1222-lv_swap 
# cat /proc/swaps 
Filename				Type		Size	Used	Priority

# swapon /dev/mapper/vg_test1222-lv_swap 
# cat /proc/swaps 
Filename				Type		Size	Used	Priority
/dev/mapper/vg_test1222-lv_swap         partition	1998840	0	-1

Comment 4 Joel Andres Granados 2009-08-26 09:12:58 UTC
jlaska:
Note that the swap error can be due to the fact that we are doing it on a vdX device.  Can you test with these types of devices?  I'm also assuming that you are doing the tests in the installer.

thx for testing!!!

Comment 5 Joel Andres Granados 2009-08-26 09:18:24 UTC
This should be fixed in next version of anaconda. 12.17.

Comment 6 Joel Andres Granados 2009-08-26 14:33:19 UTC
Ignore comment #5

Comment 7 James Laska 2009-08-26 14:36:27 UTC
As requested, just tested the swap{on,off} commands on a running install using anaconda-12.15.

sh-4.0# cat /proc/swaps 
Filename				Type		Size	Used	Priority
/dev/vdb1                               partition	1998840	5140	-1
sh-4.0# swapoff /dev/vdb1
sh-4.0# cat /proc/swaps 
Filename				Type		Size	Used	Priority
sh-4.0# swapon /dev/vdb1
sh-4.0# cat /proc/swaps 
Filename				Type		Size	Used	Priority
/dev/vdb1                               partition	1998840	0	-1

Comment 8 James Laska 2009-08-27 17:02:55 UTC
Reproduced on bare metal hardware.  The system is in the failure state and ready for remote debugging.

# telnet ibm-505-lp1.test.redhat.com

Comment 9 Joel Andres Granados 2009-09-03 12:14:23 UTC
*** Bug 505126 has been marked as a duplicate of this bug. ***

Comment 10 James Laska 2009-09-03 20:53:46 UTC
I seem to consistently hit this failure with the autoqa test rats_install on rawhide-20090903/i386.

12:35:44 CRITICAL: anaconda 12.20 exception report
Traceback (most recent call first):
  File "/usr/lib/anaconda/storage/devicelibs/swap.py", line 86, in swapon
    raise SwapError("swapon failed for '%s'" % device)
  File "/usr/lib/anaconda/storage/formats/swap.py", line 119, in setup
    swap.swapon(self.device, priority=self.priority)
  File "/usr/lib/anaconda/storage/__init__.py", line 1561, in turnOnSwap
    device.format.setup()
  File "/usr/lib/anaconda/packages.py", line 196, in turnOnFilesystems
    anaconda.id.storage.fsset.turnOnSwap(anaconda)
  File "/usr/lib/anaconda/dispatch.py", line 204, in moveStep
    rc = stepFunc(self.anaconda)
  File "/usr/lib/anaconda/dispatch.py", line 127, in gotoNext
    self.moveStep()
  File "/usr/lib/anaconda/dispatch.py", line 226, in currentStep
    self.gotoNext()
  File "/usr/lib/anaconda/text.py", line 484, in run
    (step, instance) = anaconda.dispatch.currentStep()
  File "/usr/bin/anaconda", line 981, in <module>
    anaconda.intf.run(anaconda)
SwapError: swapon failed for '/dev/mapper/VolGroup-lv_swap'

Comment 11 John Poelstra 2009-09-11 15:25:34 UTC
This bug was reviewed at the Fedora 12 Beta Blocker bug meeting on 2009-09-11.  Need more information from jgranado.  Denise will followup and upgrade priority.

Comment 12 Joel Andres Granados 2009-09-14 09:53:51 UTC
This from the syslog seems fishy.... (and its the last log message, so its probably related)
"""
<4>Swap area shorter than signature indicates
"""

And there is this kernel commit that might be related: 73fd8748ab0b9b3ddd178bea1d7ae03372033d96

Comment 13 Karel Zak 2009-09-14 13:11:19 UTC
I have created a simple script to test swap header. Please, try:
http://people.redhat.com/kzak/scripts/swapspace_check_size.sh

For example:

	# swapspace_check_size.sh  /dev/sda3
	Device:       /dev/sda3
	Page size:    4096
	Version:      01000000
	Last page:    0x0008fa5b
	Swap pages:   588379
	Device pages: 588380

is correct output (usually: swappages = devpages - 1)

Comment 14 Joel Andres Granados 2009-09-14 17:09:37 UTC
This is probably caused by anaconda first creating the swap partition of one
size, then changing that size for some reason, then trying to swapon with a
swap partition that has metadata for a different size.  That will explain the
message.

The previous logs are very difficult to follow as a lot of stuff has changed
for the swap in version 21.  A log of logs have been erased also.

Pls test with anaconda 12-21 or later and post the log on the bugzilla.

Comment 15 Will Woods 2009-09-14 17:19:36 UTC
Anaconda 12.23 seems to handle this just fine - see the rats_install results for x86_64 here:
https://fedorahosted.org/pipermail/autoqa-results/2009-September/000875.html

Can't seem to reproduce this problem anymore. Let's consider it fixed.


Note You need to log in before you can comment on or make changes to this bug.