Re: [gentoo-user] Weird hibernate problem

2012-09-11 Thread Canek Peláez Valdés
On Tue, Sep 11, 2012 at 11:52 AM, Timur Aydin  wrote:
> On 09/11/12 19:08, Canek Peláez Valdés wrote:
>> Mmmh. You didn't set CONFIG_PM_STD_PARTITION:
>>
>
> I specified the partition on the kernel command line:
>
> ta@bonsai ~/uclinux_2011R1/db1/uclinux-dist $ cat /boot/grub/grub.conf
> timeout 30
> default 0
> splashimage=(hd0,0)/boot/grub/splash.xpm.gz
>
> title Gentoo
> root (hd0,0)
> kernel /vmlinuz root=/dev/sda3 resume=/dev/sda6
>
> title Gentoo.old
> root (hd0,0)
> kernel /vmlinuz.old root=/dev/sda3 resume=/dev/sda6

That is for resuming; not for actually hibernating.

>> CONFIG_PM_STD_PARTITION=""
>>
>> Set it to /dev/sda6, and see if it helps. Also, can we have a look at
>> yout /etc/fstab file?
>
> Here is /etc/fstab:
>
> # 
> 
>
> # NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.
> /dev/sda1   /boot   ext2noatime 1 2
> /dev/sda2   /home   ext3noatime 0 2
> /dev/sda3   /   ext3noatime 0 1
> /dev/sda5   noneswapsw  0 0
> /dev/sda7   /backup ext3noatime 0 2
> /dev/cdrom  /mnt/cdrom  autonoauto,ro   0 0
>
> I want to attach the ps ax output before and after hibernate, but I am
> concerned about filesystem corruption with all those kworker threads
> lurking around...

I hibernate my desktop all the time. I only have a swap partition, and
it's both set in CONFIG_PM_STD_PARTITION and in my /etc/fstab:

CONFIG_PM_STD_PARTITION="/dev/sdc1"

#   

LABEL=Gentoo/   ext4noatime 
0 1
LABEL=Home  /home   ext4noatime,auto
0 2
LABEL=Swap  noneswapsw  
0 0
shm /dev/shmtmpfs   nodev,nosuid,noexec 
0 0
tmpfs   /tmptmpfs   defaults,nosuid,size=100%   
0 0

# swaplabel /dev/sdc1
LABEL: Swap
UUID:  28a9478e-8b53-4591-8fec-64512eeadf6c

Regards.
-- 
Canek Peláez Valdés
Posgrado en Ciencia e Ingeniería de la Computación
Universidad Nacional Autónoma de México



Re: [gentoo-user] Weird hibernate problem

2012-09-11 Thread Timur Aydin
On 09/11/12 19:08, Canek Peláez Valdés wrote:
> Mmmh. You didn't set CONFIG_PM_STD_PARTITION:
> 

I specified the partition on the kernel command line:

ta@bonsai ~/uclinux_2011R1/db1/uclinux-dist $ cat /boot/grub/grub.conf
timeout 30
default 0
splashimage=(hd0,0)/boot/grub/splash.xpm.gz

title Gentoo
root (hd0,0)
kernel /vmlinuz root=/dev/sda3 resume=/dev/sda6

title Gentoo.old
root (hd0,0)
kernel /vmlinuz.old root=/dev/sda3 resume=/dev/sda6

> CONFIG_PM_STD_PARTITION=""
> 
> Set it to /dev/sda6, and see if it helps. Also, can we have a look at
> yout /etc/fstab file?

Here is /etc/fstab:

# 


# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.
/dev/sda1   /boot   ext2noatime 1 2
/dev/sda2   /home   ext3noatime 0 2
/dev/sda3   /   ext3noatime 0 1
/dev/sda5   noneswapsw  0 0
/dev/sda7   /backup ext3noatime 0 2
/dev/cdrom  /mnt/cdrom  autonoauto,ro   0 0

I want to attach the ps ax output before and after hibernate, but I am
concerned about filesystem corruption with all those kworker threads
lurking around...

Timur



Re: [gentoo-user] Weird hibernate problem

2012-09-11 Thread Canek Peláez Valdés
On Tue, Sep 11, 2012 at 2:04 AM, Timur Aydin  wrote:
> On 9/11/2012 6:31 AM, W.Kenworthy wrote:
>> Hi Timur, we need a lot more information:
>>
>> what kernel version
>> in kernel or ToI hibernation
>> are you using genkernel
>> separate /usr
>> lvm
>>
>> and anything else applicable.
>>
>> Hibernation can be a pig to get going.
>>
>
> Hi, here is the additional information:
>
> System is ~x86 with 3.5.3 kernel that I compiled myself. Config is
> attached. Not sure whether I am using in kernel or ToI hibernation. But
> to hibernate, I have initially tried using the command line tools of
> pm-utils (pm-hibernate). In the end, I wanted to configure KDE so that I
> can quickly hibernate my development system to conserve electricity.
> /usr is not separate, but /home is on a separate partition. Here are the
> partitions:
>
> /dev/sda1 (/boot)
> /dev/sda2 (/home)
> /dev/sda3 (/)
> /dev/sda5 (swap)
> /dev/sda6 (swap, used for hibernation)
> /dev/sda7 (/backup)
>
> /dev/sdb1 (1. raid disk)
> /dev/sdc1 (2. raid disk)
> /dev/sdd1 (3. raid disk)
> /dev/sde1 (4. raid disk)
> /dev/sdf1 (5. raid disk)
>
> I did a few more tests. If I keep suspending the system and waking it
> up, the number of kworker, migrate and ksoftirq threads is increasing.

Mmmh. You didn't set CONFIG_PM_STD_PARTITION:

CONFIG_PM_STD_PARTITION=""

Set it to /dev/sda6, and see if it helps. Also, can we have a look at
yout /etc/fstab file?

Regards.
-- 
Canek Peláez Valdés
Posgrado en Ciencia e Ingeniería de la Computación
Universidad Nacional Autónoma de México



Re: [gentoo-user] Weird hibernate problem

2012-09-10 Thread W.Kenworthy
Hi Timur, we need a lot more information:

what kernel version
in kernel or ToI hibernation
are you using genkernel
separate /usr
lvm

and anything else applicable.

Hibernation can be a pig to get going.

BillK



-Original Message-
From: Timur Aydin 
Reply-to: gentoo-user@lists.gentoo.org
To: gentoo-user@lists.gentoo.org
Subject: [gentoo-user] Weird hibernate problem
Date: Mon, 10 Sep 2012 23:06:17 +0300

After corrupting my gentoo root filesystem system during hibernate 
experiments, I have finally finished the reinstallation. But hibernate 
still doesn't seem to work correctly. The symptoms are the same as 
during the experiments leading to the root fs corruption, but this time 
the root seems to remain intact.

Here is what happened during the first experiment. I had an 8G swap 
partition as /dev/sda5 and a data partition as /dev/sda6. Thinking that 
pm-hibernate requires a dedicated, separate partition, I backed up 
/dev/sda6, turned off swap at /dev/sda5, deleted /dev/sda[56] and then 
created /dev/sda5 (8G), /dev/sda6 (8G) and /dev/sda7 (remaining size) 
Then I specified /dev/sda6 as the resume partition on the kernel command 
line.

But when I did the pm-hibernate, the system powered off, and after 
reboot, the system seemed to have restored itself to the state it was at 
when I ran pm-hibernate. So it "seemed" to have worked, but the system 
was strangely unstable. There were many filesystem errors in the root 
partition and when I did a ps ax, I saw hundreds of kworker kernel 
threads lingering around. It was as if the hibernate image was slightly 
corrupted, but not enough to cause a complete lockup, but enough to 
cause there strange symptoms.

I first thought this was related to using the swap partition as the 
resume destination. But after reinstalling gentoo, I again used a 
separate partition for hibernate, but I am still seeing the same 
symtoms. Many kworker kernel threads are sleeping. But this time, the 
root filesystem didn't have any error. Concerned that a filesystem 
corruption is imminent, I immediately turned off power.

So, what could be causing these strange problems? Based on what I have 
read so far, the resume partition needs to be an active swap partition. 
This seems rather strange, because linux is using the swap partition for 
memory management as well. So shouldn't these be well separated to 
prevent corrupting each other?

Hope someone can help me make sense of all of this...





Re: [gentoo-user] Weird hibernate problem

2012-09-10 Thread Timur Aydin
One unusual property of this system is that it has 5 additional SATA 
disks to be used for RAID experiments, in addition to the disk holding 
gentoo. So there are a total of 6 disks. But during these experiments, 
these 5 additional disks are not mounted.


The motherboard is an Asus P8V68Z-VPRO/GEN3 with 8G RAM and a i7-2600K 
CPU, running 32bit gentoo. There are no peripherals attached to any of 
the motherboard expansion slots.


--
Timur



Re: [gentoo-user] Weird hibernate problem

2012-09-10 Thread Timur Aydin
I have just tried again using pm-suspend and the same thing happens. 
Everything looks like it has worked, but when I do a ps ax, there are 
many (currently around 50) sleeping kernel threads. There are also a few 
extraneous "migration, ksoftirq" threads intermixed.


--
Timur



[gentoo-user] Weird hibernate problem

2012-09-10 Thread Timur Aydin
After corrupting my gentoo root filesystem system during hibernate 
experiments, I have finally finished the reinstallation. But hibernate 
still doesn't seem to work correctly. The symptoms are the same as 
during the experiments leading to the root fs corruption, but this time 
the root seems to remain intact.


Here is what happened during the first experiment. I had an 8G swap 
partition as /dev/sda5 and a data partition as /dev/sda6. Thinking that 
pm-hibernate requires a dedicated, separate partition, I backed up 
/dev/sda6, turned off swap at /dev/sda5, deleted /dev/sda[56] and then 
created /dev/sda5 (8G), /dev/sda6 (8G) and /dev/sda7 (remaining size) 
Then I specified /dev/sda6 as the resume partition on the kernel command 
line.


But when I did the pm-hibernate, the system powered off, and after 
reboot, the system seemed to have restored itself to the state it was at 
when I ran pm-hibernate. So it "seemed" to have worked, but the system 
was strangely unstable. There were many filesystem errors in the root 
partition and when I did a ps ax, I saw hundreds of kworker kernel 
threads lingering around. It was as if the hibernate image was slightly 
corrupted, but not enough to cause a complete lockup, but enough to 
cause there strange symptoms.


I first thought this was related to using the swap partition as the 
resume destination. But after reinstalling gentoo, I again used a 
separate partition for hibernate, but I am still seeing the same 
symtoms. Many kworker kernel threads are sleeping. But this time, the 
root filesystem didn't have any error. Concerned that a filesystem 
corruption is imminent, I immediately turned off power.


So, what could be causing these strange problems? Based on what I have 
read so far, the resume partition needs to be an active swap partition. 
This seems rather strange, because linux is using the swap partition for 
memory management as well. So shouldn't these be well separated to 
prevent corrupting each other?


Hope someone can help me make sense of all of this...

--
Timur