Bug 789573 - systemd always marks one swap unit as failed on boot
Summary: systemd always marks one swap unit as failed on boot
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: systemd
Version: 19
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: systemd-maint
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 726019 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-02-11 12:44 UTC by Nicolas Mailhot
Modified: 2013-04-10 19:42 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-04-10 19:42:43 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
udevadm info -q all -n /dev/sda2 (2.56 KB, text/plain)
2012-02-14 18:34 UTC, Nicolas Mailhot
no flags Details
udevadm info -q all -n /dev/sdb2 (2.56 KB, text/plain)
2012-02-14 18:35 UTC, Nicolas Mailhot
no flags Details

Description Nicolas Mailhot 2012-02-11 12:44:48 UTC
Description of problem:
systemd always marks one swap unit as failed on boot even though it seems to be started ok

# systemctl |grep failed
dev-sda2.swap             loaded failed   failed          /dev/sda2

# swapon -s
Filename				Type		Size	Used	Priority
/dev/sdb2                               partition	2096476	0	0
/dev/sda2                               partition	2096476	0	0

# rpm -qa systemd*
systemd-sysv-42-1.fc17.x86_64
systemd-analyze-42-1.fc17.x86_64
systemd-gtk-42-1.fc17.x86_64
systemd-42-1.fc17.x86_64

Comment 1 Michal Schmidt 2012-02-13 10:19:02 UTC
How are the swaps specified in /etc/fstab?
Do you see any errors from 'swapon' in /var/log/messages or dmesg?

Comment 2 Nicolas Mailhot 2012-02-13 18:57:57 UTC
# systemctl |grep failed
dev-sdb2.swap             loaded failed failed        /dev/sdb2

# dmesg |grep swap
[   29.446565] ALSA sound/pci/hda/patch_realtek.c:1259 SKU: swap=0x0
[   30.921519] Adding 2096476k swap on /dev/sda2.  Priority:0 extents:1 across:2096476k 
[   31.044349] Adding 2096476k swap on /dev/sdb2.  Priority:0 extents:1 across:2096476k 

# grep swap /etc/fstab 
UUID=ec420dbe-b6a9-48d4-ae67-1d3a0310ffb2 swap                    swap    defaults        0 0
UUID=03924499-649c-41b8-9f63-d389a473c02f swap                    swap    defaults        0 0

# grep swap /var/log/messages
Feb 12 14:27:46 arekh systemd[1]: Failed to reread /proc/swaps: File exists
Feb 12 14:27:46 arekh systemd[1]: Failed to reread /proc/swaps: File exists
Feb 12 14:27:46 arekh kernel: [   30.921519] Adding 2096476k swap on /dev/sda2.  Priority:0 extents:1 across:2096476k 
Feb 12 14:27:46 arekh kernel: [   31.044349] Adding 2096476k swap on /dev/sdb2.  Priority:0 extents:1 across:2096476k 
Feb 12 19:04:46 arekh swapon[6558]: swapon: /dev/sdb2 : échec de swapon: Périphérique ou ressource occupé
Feb 12 19:04:46 arekh systemd[1]: dev-sdb2.swap swap process exited, code=exited status=255
Feb 12 19:04:46 arekh systemd[1]: Unit dev-sdb2.swap entered failed state.
Feb 13 03:37:24 arekh swapon[30967]: swapon: /dev/sdb2 : échec de swapon: Périphérique ou ressource occupé
Feb 13 03:37:24 arekh systemd[1]: dev-sdb2.swap swap process exited, code=exited status=255
Feb 13 03:37:24 arekh systemd[1]: Unit dev-sdb2.swap entered failed state.
Feb 13 19:17:09 arekh swapon[7313]: swapon: /dev/sdb2 : échec de swapon: Périphérique ou ressource occupé
Feb 13 19:17:09 arekh systemd[1]: dev-sdb2.swap swap process exited, code=exited status=255
Feb 13 19:17:09 arekh systemd[1]: Unit dev-sdb2.swap entered failed state.
Feb 13 19:17:10 arekh swapon[7322]: swapon: /dev/sdb2 : échec de swapon: Périphérique ou ressource occupé
Feb 13 19:17:10 arekh systemd[1]: dev-sdb2.swap swap process exited, code=exited status=255
Feb 13 19:17:10 arekh systemd[1]: Unit dev-sdb2.swap entered failed state.
Feb 13 19:17:10 arekh swapon[7330]: swapon: /dev/sdb2 : échec de swapon: Périphérique ou ressource occupé
Feb 13 19:17:10 arekh systemd[1]: dev-sdb2.swap swap process exited, code=exited status=255
Feb 13 19:17:10 arekh systemd[1]: Unit dev-sdb2.swap entered failed state.
Feb 13 19:19:00 arekh swapon[7413]: swapon: /dev/sdb2 : échec de swapon: Périphérique ou ressource occupé
Feb 13 19:19:00 arekh systemd[1]: dev-sdb2.swap swap process exited, code=exited status=255
Feb 13 19:19:00 arekh systemd[1]: Unit dev-sdb2.swap entered failed state.
Feb 13 19:19:01 arekh swapon[7419]: swapon: /dev/sdb2 : échec de swapon: Périphérique ou ressource occupé
Feb 13 19:19:01 arekh systemd[1]: dev-sdb2.swap swap process exited, code=exited status=255
Feb 13 19:19:01 arekh systemd[1]: Unit dev-sdb2.swap entered failed state.
Feb 13 19:19:30 arekh swapon[7460]: swapon: /dev/sdb2 : échec de swapon: Périphérique ou ressource occupé
Feb 13 19:19:30 arekh systemd[1]: dev-sdb2.swap swap process exited, code=exited status=255
Feb 13 19:19:30 arekh systemd[1]: Unit dev-sdb2.swap entered failed state.
Feb 13 19:19:50 arekh swapon[7500]: swapon: /dev/sdb2 : échec de swapon: Périphérique ou ressource occupé
Feb 13 19:19:50 arekh systemd[1]: dev-sdb2.swap swap process exited, code=exited status=255
Feb 13 19:19:50 arekh systemd[1]: Unit dev-sdb2.swap entered failed state.
Feb 13 19:20:17 arekh swapon[7565]: swapon: /dev/sdb2 : échec de swapon: Périphérique ou ressource occupé
Feb 13 19:20:17 arekh systemd[1]: dev-sdb2.swap swap process exited, code=exited status=255
Feb 13 19:20:17 arekh systemd[1]: Unit dev-sdb2.swap entered failed state.

Comment 3 Michal Schmidt 2012-02-14 09:34:57 UTC
(In reply to comment #2)
> Feb 12 14:27:46 arekh systemd[1]: Failed to reread /proc/swaps: File exists

The EEXIST is suspicious. It indicates that a device name belonged to one device at one point but later it pointed to a different device.

Please attach the output of two commands:
udevadm info -q all -n /dev/sda2
udevadm info -q all -n /dev/sdb2

Comment 4 Nicolas Mailhot 2012-02-14 18:34:29 UTC
Created attachment 562008 [details]
udevadm info -q all -n /dev/sda2

Comment 5 Nicolas Mailhot 2012-02-14 18:35:10 UTC
Created attachment 562009 [details]
udevadm info -q all -n /dev/sdb2

Comment 6 Michal Schmidt 2012-02-14 18:41:49 UTC
How come they both have the same symlink?:

 S: disk/by-path/pci-0000:00:1f.2-scsi-0:0:0:0-part2

Kay?

Comment 7 Nicolas Mailhot 2012-02-27 12:26:04 UTC
*** Bug 726019 has been marked as a duplicate of this bug. ***

Comment 8 Lennart Poettering 2012-03-12 13:48:47 UTC
Hmm, looks like a bug in udev/kernel, reassigning for now. Let's see.

Comment 9 Lennart Poettering 2012-03-12 14:16:58 UTC
Can you paste /proc/swap when this happens please?

Comment 10 Kay Sievers 2012-03-12 15:25:34 UTC
The duplicated by-path/ links for the ATA/SCSI path are caused by a kernel
change:
  "[libata] Add ATA transport class"
  d9027470b88631d0956ac37cdadfdeb9cdcf2c99

Udev's path_id does at the moment not support the changed sysfs layout for
ATA devices with multiple buses on the same host adapter.

Identical symlinks claimed by different devices at the same time can always
happen, and must not cause any problem with systemd, unless these links are actually used in fstab.

Comment 11 Kay Sievers 2012-03-12 17:53:36 UTC
The by-path/ links for ATA transport class devices are now disabled in udev's
path_id in the upstream repository, and they will no longer be created; they
are not supported until ATA stops faking SCSI devices or someone will add the
needed logic to path_id.

Comment 12 Lennart Poettering 2012-03-12 20:19:40 UTC
Anyway, would still be interested in the contents of /proc/swaps when this happens.

Comment 13 Nicolas Mailhot 2012-03-13 06:29:05 UTC
# systemctl |grep failed
ddclient.service          loaded failed failed        LSB: Client to update dynamic DNS host entries
dev-sda2.swap             loaded failed failed        /dev/sda2
# cat /proc/swaps 
Filename				Type		Size	Used	Priority
/dev/sdb2                               partition	2096476	180292	0
/dev/sda2                               partition	2096476	180520	0

Comment 14 Lennart Poettering 2013-01-14 21:26:35 UTC
Judging by #11 this issue is fixed on newer udev?

Comment 15 Nicolas Mailhot 2013-01-15 10:28:41 UTC
it seems to work now indeed

Comment 16 Fedora End Of Life 2013-04-03 20:20:44 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 19 development cycle.
Changing version to '19'.

(As we did not run this process for some time, it could affect also pre-Fedora 19 development
cycle bugs. We are very sorry. It will help us with cleanup during Fedora 19 End Of Life. Thank you.)

More information and reason for this action is here:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora19

Comment 17 Michal Schmidt 2013-04-10 19:42:43 UTC
Closing as per comment #15.


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