DragonFly bugs List (threaded) for 2007-01
DragonFly BSD
DragonFly bugs List (threaded) for 2007-01
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: Crash on shutdown


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx>
Date: Wed, 24 Jan 2007 11:19:12 -0800 (PST)

:No, that does not fix the issue. :-(
:
:> 
:>     If it still fails I will need a crash dump.
:
:Picture of crash and tar'd dump available at:
:
:http://rnrdoctor.sytes.net/~szg/dfcrash/20070124/
:
:(Please, please, implement minidumps from freebsd :-P j/k)
:
:-- 
:Gergo Szakal <bastyaelvtars@gmail.com>
:University Of Szeged, HU
:Faculty Of General Medicine

    The problem is that the init process is still runnable when the
    shutdown code gets to the point where it removes all remaining filesystem
    references.  The init process then seg-faults and tries to core dump,
    but there is no longer any current directory for it.

    Please try this hack and tell me if it works.  The real solution is
    a bit more complex.

					-Matt
					Matthew Dillon 
					<dillon@backplane.com>

Index: kern_shutdown.c
===================================================================
RCS file: /cvs/src/sys/kern/kern_shutdown.c,v
retrieving revision 1.47
diff -u -r1.47 kern_shutdown.c
--- kern_shutdown.c	5 Jan 2007 22:16:28 -0000	1.47
+++ kern_shutdown.c	24 Jan 2007 19:14:16 -0000
@@ -282,8 +282,13 @@
 	if (panicstr == NULL) {
 		shutdown_cleanup_proc(curproc);
 		shutdown_cleanup_proc(&proc0);
-		if (initproc)
+		if (initproc) {
+			if (initproc != curproc) {
+				ksignal(initproc, SIGSTOP);
+				tsleep(boot, 0, "shutdn", hz / 20);
+			}
 			shutdown_cleanup_proc(initproc);
+		}
 		vfs_cache_setroot(NULL, NULL);
 	}
 



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]