Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 6 Jun 2003 11:20:15 -0700
From:      Marcel Moolenaar <marcel@xcllnt.net>
To:        Alan Robinson <alan.robinson@fujitsu-siemens.com>
Cc:        freebsd-ia64@freebsd.org
Subject:   Re: DDB and SMP causes Unaligned Reference
Message-ID:  <20030606182015.GC569@dhcp01.pn.xcllnt.net>
In-Reply-To: <20030606183130.A19592@fujitsu-siemens.com>
References:  <20030606183130.A19592@fujitsu-siemens.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Jun 06, 2003 at 06:31:30PM +0200, Alan Robinson wrote:
> Using the manual escape to debugger with an SMP kernel
> causes an unaligned reference while stopping the other
> CPU, the system then hangs.
> 
> #
> #  CPU1 stopping CPUs: 0x00000001...
> #  fatal kernel trap (cpu 0):
> # 
> # trap vector = 0x1e (Unaligned Reference)
> # cr.iip      = 0xe0000000009a1320
> # cr.ipsr     = 0x1210080a6010 (mfl,ic,i,dt,dfh,rt,cpl=0,it,ri=1,bn)
> # cr.isr      = 0x20200000000 (code=0,vector=0,w,ei=1)
> # cr.ifa      = 0xe000000000004228
> # curthread   = 0xe00000003d9bb080
> # pid = 12, comm = idle: cpu0
> # CPU0 stopping CPUs: 0x00000002...
> # 
> (The self built kernel was built using projects/ia64 cvsup'd sources 
> which are now a day or two old)
> 
> The cr.iip points into swapctx (or savectx) which was called from
> from interrupt() as follows....
> 
>         } else if (vector == ipi_vector[IPI_STOP]) {
>                 u_int32_t mybit = PCPU_GET(cpumask);
> 
>                 CTR1(KTR_SMP, "IPI_STOP, cpuid=%d", PCPU_GET(cpuid));
>                 savectx(PCPU_GET(pcb));

We don't set pc_pcb on ia64. The line above should read:
	savectx(curthread->td_pcb);

Try it and let me know if it works. I'll commit it then.

> # enter_userland() at enter_userland
> # db> c
> # CPU1 restarting CPUs: 0x00000001... restarted.
> # manual escape to debugger
> # CPU0 stopping CPUs: 0x00000002... stopped.
> # Stopped at      Debugger+0x31:        nop.m 0x0
> # db> c
> # CPU0 restarting CPUs: 0x00000002... restarted.
> # 
> 
> is the double continue normal ?

I don't think so. I've never seen it before, but that's probably
because I haven't had the time yet to work on SMP in general and
also because I generally don't manually break to the debugger.

-- 
 Marcel Moolenaar	  USPA: A-39004		 marcel@xcllnt.net



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030606182015.GC569>