Subject: Re: x86 changes
To: Manuel Bouyer <bouyer@antioche.eu.org>
From: Christoph Egger <Christoph_Egger@gmx.de>
List: port-xen
Date: 10/01/2007 15:06:12
On Friday 28 September 2007 19:56:00 Manuel Bouyer wrote:
> On Thu, Sep 27, 2007 at 11:24:46PM +0100, Andrew Doran wrote:
> > I think it's an issue in the RAS check in cpu_switchto. I'll have a look
> > tomorrow morning.
>
> It's fixed in locore.S 1.31. Thanks Andrew!
But there is more to fix. With a LOCKDEBUG kernel, I get this:
[...]
root time: 0x4700ee55
root file system type: nfs
init path (default /sbin/init):
init: copying out path `/sbin/init' 11
ex0: transmit underrun (9000) @20, new threshold is 40
Sun Sep 30 13:07:31 UTC 2007
Checking for botched superblock upgrades: done.
Starting file system checks:
mount: /: unknown special file or file system.
Setting tty flags.
Setting sysctl variables:
Starting network.
Hostname: fricka
IPv6 mode: host
Configuring network interfaces:.
add net default: gateway 192.168.58.254
Adding interface aliases:
Building databases: dev, utmp, utmpx done
Starting syslogd.
Checking for core dump...
savecore: can't find device 1475/143
Sep 30 13:07:39 fricka savecore: can't find device 1475/143
Mounting all filesystems...
Clearing temporary files.
Starting xend.
Mutex error: lockdebug_barrier: spin lock held
lock address : 0x00000000c0967ba0 type : spin
shared holds : 0 exclusive: 1
shares wanted: 0 exclusive: 0
current cpu : 0 last held: 0
current lwp : 0x00000000cb0571c0 last held: 0x00000000cb041e00
last locked : 0x00000000c04410ee unlocked : 0x00000000c045c069
owner field : 0x0000000000010b00 wait/spin: 0/1
panic: LOCKDEBUG
fatal breakpoint trap in supervisor mode
trap type 1 code 0 eip c0504059 cs 9 eflags 246 cr2 0 ilevel b
Stopped in pid 156.1 (python2.4) at netbsd:breakpoint+0x1: ret
db> bt
breakpoint(c0889c77,c088a38a,c073c417,c088b7d0,c09d35b0) at
netbsd:breakpoint+0x1
lockdebug_abort1(c088b7d0,1,c09d6780,cb04ba24,cb04ba20) at
netbsd:lockdebug_abort1+0x63
lockdebug_barrier(c09cacec,1,1,c0446f74,c099e9e0) at
netbsd:lockdebug_barrier+0x12e
rw_vector_enter(cb04ba24,0,2ca,ccab0508,ccab1bb0) at
netbsd:rw_vector_enter+0x1e0
uvm_fault_internal(cb04ba20,0,1,0,c16ba840) at netbsd:uvm_fault_internal+0x380
trap() at netbsd:trap+0x415
--- trap (number 6) ---
mutex_vector_enter(8,c0516285,c045b3cf,c09d67e0,b) at
netbsd:mutex_vector_enter+0xc
ras_lookup(0,bbaf9a3c,cb041e00,2,cb0571c0) at netbsd:ras_lookup+0x34
cpu_switchto(cb0571c0,1f4,0,1f4,c073d02e) at netbsd:cpu_switchto+0x81
sleepq_block(1f4,0,c073d02e,1f4,0) at netbsd:sleepq_block+0xea
sbwait(c1496f64,1,0,c0540121,c09d6780) at netbsd:sbwait+0x49
soreceive(c1496ee0,cc9965b8,cc996520,cc9965bc,0) at netbsd:soreceive+0x937
nfs_receive(c1738e40,cc9965b8,cc9965bc,cb0571c0,0) at netbsd:nfs_receive+0x8f
nfs_reply(c1738e40,cb0571c0,c149f500,c1738e40,cb0571c0) at
netbsd:nfs_reply+0x63
nfs_request(ccab1a10,c1489f00,6,cb0571c0,cb040ee0) at netbsd:nfs_request+0x4fc
nfs_readrpc(ccab0328,cc996740,4a4,c0927ba0,cc99678c) at
netbsd:nfs_readrpc+0x21b
nfs_doio(c149bed8,3,46ff9f9b,c073dda0,ccab0328) at netbsd:nfs_doio+0x3fb
VOP_STRATEGY(ccab0328,c149bed8,368,cc996940,cc996924) at
netbsd:VOP_STRATEGY+0x28
genfs_getpages(cc9969f4,0,cc99699c,c0516eed,0) at netbsd:genfs_getpages+0x2720
nfs_getpages(cc9969f4,0,cc996a1c,c044770e,c073df60) at
netbsd:nfs_getpages+0x9b
VOP_GETPAGES(ccab0328,18000,0,cc996bcc,cc996bd4) at netbsd:VOP_GETPAGES+0x52
uvn_get(ccab0328,18000,0,cc996bcc,cc996bd4) at netbsd:uvn_get+0x389
uvm_fault_internal(cb04ba20,bbaf9000,1,0,0) at
netbsd:uvm_fault_internal+0x23bc
trap() at netbsd:trap+0x415
--- trap (number 6) ---
0xbbaf9a3c:
db> show registers
ds 0x11
es 0x11
fs 0x31
gs 0x11
edi 0xc09cacec kernel_lock
esi 0xc0889c77 copyright+0x19537
ebp 0xcc9960b0
ebx 0x100
edx 0
ecx 0xdeadbeef
eax 0x1
eip 0xc0504059 breakpoint+0x1
cs 0x9
eflags 0x246
esp 0xcc996074
ss 0x11
netbsd:breakpoint+0x1: ret
db> x /i mutex_vector_enter,20
netbsd:mutex_vector_enter: pushl %ebp
netbsd:mutex_vector_enter+0x1: movl %esp,%ebp
netbsd:mutex_vector_enter+0x3: pushl %edi
netbsd:mutex_vector_enter+0x4: pushl %esi
netbsd:mutex_vector_enter+0x5: pushl %ebx
netbsd:mutex_vector_enter+0x6: subl $0x1c,%esp
netbsd:mutex_vector_enter+0x9: movl 0x8(%ebp),%edi
netbsd:mutex_vector_enter+0xc: movl 0(%edi),%eax
netbsd:mutex_vector_enter+0xe: testb $0x1,%al
netbsd:mutex_vector_enter+0x10: jnz netbsd:mutex_vector_enter+0x117
netbsd:mutex_vector_enter+0x16: movl netbsd:cpu_info_primary+0x18,%eax
netbsd:mutex_vector_enter+0x1b: movl %eax,0xfffffff0(%ebp)
netbsd:mutex_vector_enter+0x1e: movl 0(%edi),%eax
netbsd:mutex_vector_enter+0x20: testb $0x1,%al
netbsd:mutex_vector_enter+0x22: jnz netbsd:mutex_vector_enter+0x1cf
netbsd:mutex_vector_enter+0x28: movl 0xfffffff0(%ebp),%ecx
netbsd:mutex_vector_enter+0x2b: testl %ecx,%ecx
netbsd:mutex_vector_enter+0x2d: jz netbsd:mutex_vector_enter+0x1e9
netbsd:mutex_vector_enter+0x33: xorl %eax,%eax
netbsd:mutex_vector_enter+0x35: movl 0x4(%edi),%edx
netbsd:mutex_vector_enter+0x38: movl %eax,0x8(%esp)
netbsd:mutex_vector_enter+0x3c: movl 0x4(%ebp),%eax
netbsd:mutex_vector_enter+0x3f: movl %edx,0(%esp)
netbsd:mutex_vector_enter+0x42: movl %eax,0x4(%esp)
netbsd:mutex_vector_enter+0x46: call netbsd:lockdebug_wantlock
netbsd:mutex_vector_enter+0x4b: movl netbsd:panicstr,%eax
netbsd:mutex_vector_enter+0x50: testl %eax,%eax
netbsd:mutex_vector_enter+0x52: jz netbsd:mutex_vector_enter+0x1a0
netbsd:mutex_vector_enter+0x58: nop
netbsd:mutex_vector_enter+0x59: leal 0(%esi),%esi
netbsd:mutex_vector_enter+0x60: movl 0(%edi),%ebx
netbsd:mutex_vector_enter+0x62: testl %ebx,%ebx
db>