lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200908312132.10904.rjw@sisk.pl>
Date:	Mon, 31 Aug 2009 21:32:10 +0200
From:	"Rafael J. Wysocki" <rjw@...k.pl>
To:	Jiri Slaby <jirislaby@...il.com>
Cc:	Greg KH <gregkh@...e.de>, linux-kernel@...r.kernel.org,
	Alan Cox <alan@...ux.intel.com>, Ingo Molnar <mingo@...e.hu>
Subject: Re: suspend race -next regression [Was: Power: fix suspend vt regression]

On Monday 31 August 2009, Jiri Slaby wrote:
> On 08/11/2009 11:19 PM, Jiri Slaby wrote:
> > However there is still a race or something. Sometimes the suspend goes
> > through, sometimes it doesn't. I will investigate this further.
> 
> Hmm, this took a loong time to track down a bit. Code instrumentation by
> outb(XX, 0x80) usually caused the issue to disappear.
> 
> However I found out that it's caused by might_sleep() calls in
> flush_workqueue() and flush_cpu_workqueue(). I.e. it looks like there is
> a task which deadlocks/spins forever. If we won't reschedule to it,
> suspend proceeds.
> 
> I replaced the latter might_sleep() by show_state() and removed
> refrigerated tasks afterwards. The thing is that I don't know if the
> prank task is there. I need a scheduler to store "next" task pid or
> whatever to see what it picked as "next" and so what will run due to
> might_sched(). I can then show it on port 80 display and read it when
> the hangup occurs.
> 
> Depending on which might_sleep(), either flush_workqueue() never (well,
> at least in next 5 minutes) proceeds to for_each_cpu() or
> wait_for_completion() in flush_cpu_workqueue() never returns.
> 
> It's a regression against some -rc1 based -next tree. Bisection
> impossible, suspend needs to be run even 7 times before it occurs. Maybe
> a s/might_sleep/yield/ could make it happen earlier (going to try)?

If /sys/class/rtc/rtc0/wakealarm works on this box, you can use it to trigger
resume in a loop.

Basically, you can do

# echo 0 > /sys/class/rtc/rtc0/wakealarm
# date +%s -d "+60 seconds" > /sys/class/rtc/rtc0/wakealarm

then go to suspend and it will resume the box in ~1 minute.

Thanks,
Rafael
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ