Red Hat Bugzilla – Bug 1174945
Filesystem corruption after resume from suspend to disk (hibernation)
Last modified: 2016-08-05 13:49:41 EDT
Created attachment 969732 [details]
Possible patch borrowed from openSUSE
Description of problem:
After resuming from hibernation kernel starts to report failed attempts to insert new inode (__ext4_new_inode:1010: comm ... failed to insert inode ... doubly allocated?) which latter on results in filesystem corruption (as advertised in logs).
Version-Release number of selected component (if applicable):
This might be the same bug as reported in SUSE's bugzilla:
They are using older dracut version, same main version as in Fedora 20 although, I had no problems with hibernation on F20.
Going to rebuild dracut with attached patch now to check if it's working...
Looks like it's working :)
Created attachment 969997 [details]
Created attachment 969999 [details]
Created attachment 970000 [details]
(In reply to Przemysław Palacz from comment #3)
> Created attachment 969999 [details]
I guess, this is without the patch
Yes, sorry... forgot to attach it to the first comment. After applying the patch hibernation does not cause filesystem errors any more.
Created attachment 990261 [details]
dracut commit 733c71c adjusted for f21 branch
Cherrypicking dracut commit 733c71c "resume: make use of systemd-hibernate-resume, if existant" works for me.
Thanks for the info.
I actually took the easy way out and downloaded dracut 41 rpms from koji which also works very nicely on my F21.
*** Bug 1198012 has been marked as a duplicate of this bug. ***
attachment 990261 [details] fixes this for me as well. I also added a resume kernel commandline parameter to grub, not sure if this is necessary.
dracut-038-33.git20141216.fc21 has been submitted as an update for Fedora 21.
* should fix your issue,
* was pushed to the Fedora 21 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing dracut-038-33.git20141216.fc21'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).
I installed these rpms on my f21 laptop and ran "dracut -f" to rebuild the initramfs, but hibernate/resume no longer works. When I hibernate, it appears to work, and the system powers down. When I then open the lid, it does power on automatically, but it does not resume -- it goes through a regular boot sequence, and I have to login again. Any ideas on how to troubleshoot? I searched for error messages in journalctl, and I see this:
sh-4.3# journalctl -b | egrep -i 'susp|resu|hib'
Mar 09 04:44:18 ajs-t530 kernel: PM: Hibernation image not present or could not be loaded.
Mar 09 08:44:38 ajs-t530 swapon: swapon: /dev/mapper/fedora-swap: software suspend data detected. Rewriting the swap signature.
I think I had the same problem at some point.
I use quite? standard partition scheme (UEFI, swap file), no LVM but still.
Check if dracut detects your swap partition during image generation:
dracut -fv | grep resume
You can also check if swap is added to your current image with:
lsinitrd -f etc/cmdline.d/95resume.conf
If resume module isn't executed during image generation (or missing 95resume.conf) then you have to add your swap manually (man dracut.conf).
Hi, thanks for the tips, but I don't think that explains it:
[root@ajs-t530 ~]# lsinitrd -f etc/cmdline.d/95resume.conf
[root@ajs-t530 ~]# dracut -fv > /tmp/dracut.out 2>&1 && echo YES
[root@ajs-t530 ~]# grep resume /tmp/dracut.out
*** Including module: resume ***
Update fixes the problem, thank you :)
dracut-038-33.git20141216.fc21 has been pushed to the Fedora 21 stable repository. If problems still persist, please make note of it in this bug report.
I'm afraid hibernate/resume still doesn't work for me. I followed the following steps:
- Fresh install of Fedora 21 onto my laptop using the Fedora 21/x86_64 live workstation usb stick. This installs the old rpm versions from the released ISO.
- Then I updated dracut by running "yum -y update dracut". I wanted to make sure that dracut was updated before the kernel so that the new initramfs generated would use the new version of dracut.
- I updated all the other software: "yum -y update"
- I also installed some other software, in case it matters, including XFCE, tcsh, tigervnc, etc. And I disabled SElinux.
- I rebooted into the new 3.19.2 kernel and logged into an XFCE desktop. I then requested the system to hibernate from the XFCE panel widget.
- I closed the lid and reopened it, and the system booted up to a login screen. It did not resume properly.
What am I doing wrong?
(In reply to Andrew J. Schorr from comment #18)
> What am I doing wrong?
Your kernel commandline needs to contain a proper resume= parameter.
I have a vanilla configuration, as far as I know. It used to work fine. Is this supposed to be in /boot/grub2/grub.cfg? I don't see it there:
[schorr@ajs-r705 grub2]$ grep resume /boot/grub2/grub.cfg
[schorr@ajs-r705 grub2]$ cat /etc/sysconfig/grub
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_CMDLINE_LINUX="rd.lvm.lv=vg_sys/f21 rhgb quiet"
[schorr@ajs-r705 grub2]$ cat /proc/cmdline
BOOT_IMAGE=/vmlinuz-3.19.2-201.fc21.x86_64 root=/dev/mapper/vg_sys-f21 ro rd.lvm.lv=vg_sys/f21 rhgb quiet LANG=en_US.UTF-8
Is there somehow a configuration problem here? I did not touch anything related to grub2. Shouldn't this work out of the box? It always has for me in the past...
(In reply to Andrew J. Schorr from comment #20)
> Is there somehow a configuration problem here? I did not touch anything
> related to grub2. Shouldn't this work out of the box? It always has for me
> in the past...
unfortunately dracut/systemd are not properly integrated into Fedora 21, therefore you need to set the resume option manually.
Thanks for the help, but this doesn't seem quite right.
I just wiped my laptop again and did a vanilla Fedora 21 installation from a USB stick with the distributed ISO. So all the software is from the original F21 release.
I logged in, su'ed to root, and typed "systemctl hibernate". I then closed the lid. After opening the lid, the system resumed properly.
Note that the word "resume" does not appear anywhere in /etc/default/grub or in /boot/grub2/grub.cfg or in /proc/cmdline.
I did this twice, and it is repeatable. The vanilla F21 hibernate/resume works out of the box before updating any software.
I then ran "yum update dracut". After this, hibernate/resume still works.
I then rebuilt the initramfs by running "dracut --force". I rebooted the machine. I then ran "systemctl hibernate", but when I power back up, resume no longer works. It does a fresh boot.
Does this behavior make sense? It surely seems as if something in the new dracut package is breaking normal hibernate/resume behavior. I think there's a regression here; am I confused?
And yes, you are right -- adding "resume=<swap device>" to /etc/default/grub in the GRUB_CMDLINE_LINUX value and then running grub2-mkconfig /boot/grub2/grub.cfg does fix the problem. But this should not be necessary. The original F21 version of dracut did not require this. I don't understand the boot process well enough to troubleshoot what's going wrong, but I think there's a regression here.
(In reply to Andrew J. Schorr from comment #23)
> /boot/grub2/grub.cfg does fix the problem. But this should not be
> necessary. The original F21 version of dracut did not require this. I
> don't understand the boot process well enough to troubleshoot what's going
> wrong, but I think there's a regression here.
yes, the requirement cam with the update fixing this, because without the filesystem will be corrupted during resume, because there was an fsck check performed. To fix this it seems systemd needed to be used, but it only accepts a resume parameter from the kernel commandline.
Ah, now I understand. I think you are saying that Anaconda needs to be patched to add "resume=<swap device>" to the boot loader configuration files. Has an Anaconda bug been opened for this issue?
Follow up bug https://bugzilla.redhat.com/show_bug.cgi?id=1206912
I don't know if I'm seeing the same problem or not. I've been trying to set up Deja Dup to put backups on a USB hard drive, and I keep getting corrupted backups and errors like those in the description:
[ 7663.363525] EXT4-fs error (device sdk1): __ext4_new_inode:1066: comm python2: failed to insert inode 17301505: doubly allocated?
[ 7693.426957] EXT4-fs error (device sdk1): __ext4_new_inode:1066: comm python2: failed to insert inode 17301506: doubly allocated?
I'm using suspend but not hibernate. I thought the hard drive was failing, so I bought a new one, but it's giving me the same error messages.
This is a Fedora 24 desktop machine, Dell Precision 3620