Il Sun, Oct 08, 2006 at 08:33:37PM +0200, Stefan Seyfried ha scritto: 
> Could it be that the pm_ops->finish(SUSPEND_MEM) is somehow running
> asynchronously? And that something in the hardware forbids accessing certain
> memory regions while the AML code is still executed? Just wild guessing :-)
> 
> Or asked the other way round:
> "What exactly is forbidden while all processes but the suspend program are
>  frozen?"
> If we know what is forbidden, we might find out what we are doing wrong.
> 
> Or: "What conditions can cause the kernel to kill a process with signal 11"?

Since it's somewhat related to memory pressure: maybe (part of) the text
segment of either s2ram or glibc is evicted from memory or not yet
faulted in. Upon resume but before unfreeze() s2ram takes a page fault
but since no I/O can be started it just die. Make sense?

Can you try this patch:

Index: s2ram.c
===================================================================
RCS file: /cvsroot/suspend/suspend/s2ram.c,v
retrieving revision 1.45
diff -u -r1.45 s2ram.c
--- s2ram.c     20 Sep 2006 16:23:51 -0000      1.45
+++ s2ram.c     8 Oct 2006 22:04:21 -0000
@@ -10,6 +10,7 @@
 #include <getopt.h>
 #include <errno.h>
 #include <string.h>
+#include <sys/mman.h>
 
 #define S2RAM
 #include "vbetool/vbetool.h"
@@ -326,6 +327,8 @@
                usage();
        }
 
+       mlockall(MCL_CURRENT | MCL_FUTURE);
+
        if (!force) {
                dmi_scan();
                id = machine_match();


It makes sense to pin s2ram in memory, it will also help when e.g. the
disk doesn't come back to life after suspension.

Luca
-- 
"La teoria e` quando sappiamo come funzionano le cose ma non funzionano.
 La pratica e` quando le cose funzionano ma non sappiamo perche`.
 Abbiamo unito la teoria e la pratica: le cose non funzionano piu` e non
 sappiamo il perche`." -- A. Einstein

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Suspend-devel mailing list
Suspend-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/suspend-devel

Reply via email to