Bug#632627: Re[2]: Bug#632627: Re[2]: Bug#632627: uswsusp patches for initramfs-tools (was: Bug#632627: Re[2]: resume file)

2014-09-02 Thread Askar Safin
Hi, kix, Maximilian and Michael.
First of all: this bug affected kernel-based hibernation, too (details follow).

So, I performed something like git bisect to determine why the bug was 
magically fixed. I debootstrapped a lot of minimal sid Debian systems from 
snapshot.debian.org. I wrote scripts, which automatically bootstrap system, run 
it in Qemu and check whenever this system contains bug. Steps to reproduce I 
used, was the following:
1. Bootstrap system (with swap present in /etc/fstab)
2. Start it in Qemu, install uswsusp, run s2disk, this causes Qemu to close
3. Start the system in Qemu again. If it wakes up - there is no bug, the system 
is good. If starts from scratch - bad
Result is:
current (2014-09-01) - good
http://snapshot.debian.org/archive/debian/20130601T035649Z - bad
http://snapshot.debian.org/archive/debian/20140101T042327Z - good
http://snapshot.debian.org/archive/debian/20130901T040738Z - bad  
http://snapshot.debian.org/archive/debian/20131101T040405Z - good 
http://snapshot.debian.org/archive/debian/20131001T035353Z - good
http://snapshot.debian.org/archive/debian/20130915T035028Z - bad
http://snapshot.debian.org/archive/debian/20130924T035052Z - good
http://snapshot.debian.org/archive/debian/20130920T034833Z - bad
http://snapshot.debian.org/archive/debian/20130922T035833Z - bad
http://snapshot.debian.org/archive/debian/20130923T035105Z - good
http://snapshot.debian.org/archive/debian/20130922T154933Z - bad
http://snapshot.debian.org/archive/debian/20130922T220333Z - good
So, the bug was fixed in 20130922T154933Z .. 20130922T220333Z.
Only one package (in this minimal systems) was updates at this time: 
initramfs-tools: it was bumped from 0.113 to 0.114.
Looking at the git log for initramfs-tools it seems that the bug was fixed in 
this commit:

commit fef37d599aae9f2f3fc6808b46e901a7a4267c76
Author: maximilian attems m...@debian.org
Date:   Wed Sep 11 00:40:10 2013 +0200

hooks: Add resume hook instead of hardcoding RESUME once on preinst

This logic is better run every time on update-initramfs,
as swap partition of a system might change.
Also there are scenarios where the preinstall picks up
a wrong value that stays wrongly hardcoded.
This results in a 5s useless wait on boot.

The biggest swap partition is used as valid guess.
This was previously the logic and is the logic used by ubiquity
(Ubuntu live installer) too.

Closes: #565225, LP 50437.

Thanks-to: Dmitrijs Ledkovs launch...@surgut.co.uk
Reviewed-by: Martin Pitt martin.p...@ubuntu.com
Reviewed-by: Michael Prokop m...@debian.org
Signed-off-by: maximilian attems m...@debian.org

If you want, I can give you scripts I wrote, I can preform bisect again for 
some reason, I can help with testing/reproducing etc.

I want to point some notes: I'm not Debian developer nor Debian maintainer. I'm 
just a bug reporter. This bug currently doesn't affect me, because 1) it is 
fixed 2) i can write resume file myself. I don't know whenever the bug is 
really fixed now or this is just some trick. I don't know how to fix it the 
best way. I don't understand some of the letters in this bug report. But I want 
to help you with fixing this bug.

Michael Prokop:
 Are you willing to work on this? :)
I had worked just now. So, now please say me is this bug really fixed or not.

Also, the bug was reproducible for kernel-based hibernation on 20130922T154933Z 
and not reproducible on 20130922T220333Z (i. e. before and after the 
initramfs-tools 0.114 release). Steps:
1. Bootstrap 20130922T154933Z (without swap)
2. Install pm-utils
3. Add swap
4. Reboot
5. dpkg-reconfigure initramfs-tools
6. pm-hibernate (fails)
7. Upgrade to initramfs-tools 0.114 (this will cause reconfiguring)
8. pm-hibernate (works)

I think bug still is not fixed. Because initramfs-tools just uses current swap 
and doesn't use /etc/uswsusp.conf. But probably the bug is fixed for 
kernel-based hibernation. What to do? I don't know. Maybe uswsusp should 
always use current swap or add initramfs-tools hook which reads 
/etc/uswsusp.conf and writes resume or pick any solution from this bug 
report or debian-devel discussion.

I reopened this bug to make sure you will answer my message, will not forget 
this bug and will really resolve it.

==
Askar Safin
http://vk.com/safinaskar
Moscow, Russia
Moscow State University, http://msu.ru , Faculty of Mechanics and Mathematics, 
Department of Mathematical Logic and Theory of Algorithms
-
-


Bug#632627: Re[2]: Bug#632627: Re[2]: Bug#632627: uswsusp patches for initramfs-tools (was: Bug#632627: Re[2]: resume file)

2014-08-31 Thread Askar Safin
Hmm, I cannot reproduce the bug on modern jessie (i. e. jessie debootstrapped 
today) o_O.
I performed the steps from 
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=632627#72 :
 1. Installed uswsusp. uswsusp said to me that I have no swap and I should add 
 it and run dpkg-reconfigure uswsusp.
 2. I added swap
 3. Rebooted
 4. I ran dpkg-reconfigure uswsusp. uswsusp found my swap and it was happy. 
 It asked me a lot of questions. Then uswsusp triggered initramfs rebuilding
 5. Rebooted
 6. I ran s2disk and I could not wake up. So, this is a bug.
And I was able to wake up on the step 6. But /etc/initramfs-tools/conf.d/resume 
for some reason still doesn't exist. resume device in /etc/uswsusp.conf 
points to my swap device (and I did not edit this file manually).
So, please, investigate, what happened, is bug really fixed or this is some 
trick.
==
Askar Safin
-
-


Bug#632627: Re[2]: Bug#632627: Re[2]: Bug#632627: uswsusp patches for initramfs-tools (was: Bug#632627: Re[2]: resume file)

2014-08-31 Thread Askar Safin
Hi, kix.

Sun, 31 Aug 2014 20:43:33 + от Rodolfo García Peñas (kix) 
k...@debian.org:
About this bug, I worked on it one year ago. I sent some emails. As
you can see in the bug history, uswsusp cannot update the file,
because it belongs to initramfs-tools. I sent some patches,...
And then there was discussion on debian-devel, which was lost for some reason.
So, we should just continue discussion.
And also we should understand why the bug was magically fixed in modern 
jessie.

Also NOTE for all people writing to this bug report: be sure you are writing to 
632...@bugs.debian.org and not to 632627-d...@bugs.debian.org (closing this bug 
again and again).

==
Askar Safin
http://vk.com/safinaskar
Moscow, Russia
Moscow State University, http://msu.ru , Faculty of Mechanics and Mathematics, 
Department of Mathematical Logic and Theory of Algorithms
-
-