Bug #535

Crash on shutdown

Added by bastyaelvtars about 7 years ago. Updated almost 7 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:-
Target version:-

Description

This problem also occured in preview from dec. 28 or so, but I thought recent updates fixed it, I am on the development branch as of 2007-01-22, and it occurs there as well, on every shutdown/reboot. The pictures of the crash are here:

http://rnrdoctor.sytes.net/~szg/dfcrash/20070123/

I haven't made core dumps, I will provide some if needed, I'll also provide dmesg etc. on request.
TIA for looking into the issue.

History

#1 Updated by dillon about 7 years ago

:This problem also occured in preview from dec. 28 or so, but I thought recent updates fixed it, I am on the development branch as of 2007-01-22, and it occurs there as well, on every shutdown/reboot. The pictures of the crash are here:
:
:http://rnrdoctor.sytes.net/~szg/dfcrash/20070123/
:
:I haven't made core dumps, I will provide some if needed, I'll also provide dmesg etc. on request.
:TIA for looking into the issue.
:
:--
:Gergo Szakal <>

It is possible that this is related to Vincent's NFS mount bug report.
I have just committed a fix for that.

If you could update head (you should get rev 1.112 of
/usr/src/sys/kern/vfs_syscals.c) and try again, I would appreciate it.

If it still fails I will need a crash dump.

-Matt

#2 Updated by bastyaelvtars about 7 years ago

On Tue, 23 Jan 2007 17:26:56 -0800 (PST)
Matthew Dillon <> wrote:

No, that does not fix the issue. :-(

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)

#3 Updated by dillon about 7 years ago

: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 <>
: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
<>

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);
}

#4 Updated by bastyaelvtars about 7 years ago

On Wed, 24 Jan 2007 11:19:12 -0800 (PST)
Matthew Dillon <> wrote:

Your patch fixes the problem. Thank you!

#5 Updated by corecode about 7 years ago

oooh. evil. can't we just kill init?

cheers
simon

#6 Updated by dillon about 7 years ago

:oooh. evil. can't we just kill init?
:
:cheers
: simon

We'd probably panic in the the child process reparenting code
without init, so no. I'd rather just stop it.

-Matt
Matthew Dillon
<>

Also available in: Atom PDF