Port-vax archive

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

Re: Current kernel hangs early w/o any output



On Wed, Dec 09, 2009 at 11:00:15PM +0100, Martin Husemann wrote:
> I checked a few kernels and the last one working is 2009/10/21 21:10 UTC,
> later kernels panic in upcallret() [called via trap inside pmap_remove_pcb],
> and starting with 2009/11/26 23:00:00 UTC I see the complete silent hang.

I found the cause for the first problem (same as sh3): the new pcb is no
longer zeroed in cpu_lwp_fork(). The attached patch fixes this part (but
-current needs another version) - however, this does not fix the total
lossage from the second change.

Martin
Index: vm_machdep.c
===================================================================
RCS file: /cvsroot/src/sys/arch/vax/vax/vm_machdep.c,v
retrieving revision 1.108
diff -c -u -p -r1.108 vm_machdep.c
--- vm_machdep.c        24 Oct 2009 20:03:56 -0000      1.108
+++ vm_machdep.c        11 Dec 2009 20:54:55 -0000
@@ -110,6 +110,12 @@ cpu_lwp_fork(struct lwp *l1, struct lwp 
 #endif
 
        /*
+        * Clear new pcb
+        */
+       pcb = &l2->l_addr->u_pcb;
+       memset(pcb, 0, sizeof(*pcb));
+
+       /*
         * Copy the trap frame.
         */
        tf = (struct trapframe *)((u_int)l2->l_addr + USPACE) - 1;
@@ -143,7 +149,6 @@ cpu_lwp_fork(struct lwp *l1, struct lwp 
         * Set up internal defs in PCB. This matches the "fake" CALLS frame
         * that were constructed earlier.
         */
-       pcb = &l2->l_addr->u_pcb;
        pcb->iftrap = NULL;
        pcb->AP = (uintptr_t)&cf->ca_argno;
        pcb->KSP = (uintptr_t)cf;


Home | Main Index | Thread Index | Old Index