Subject: Midnight crashes
To: None <port-xen@netbsd.org>
From: Marcello Balduccini <marcello.balduccini@ttu.edu>
List: port-xen
Date: 04/18/2005 11:22:47
Hi!

I have been running NetBSD/xen as Dom0 and (my only) DomU for the last few 
days, and it has been running great, except for the fact that the computer 
panics exactly once every night, *always* around midnight (more precisely, I 
think it is between 12:13am and 12:16am). At the moment of the crash, Dom0 is 
idle and DomU has a moderate load (just running a few text-processing 
scripts). Notice that the computer runs perfectly all day under the same load 
conditions. I checked all crons several times, and by now I am pretty sure 
that the only cron that might be running is a very small one that anyway runs 
once a minute all day every day withouth giving problems (and as of now 
simply starts up, checks if a file is empty or non-existent, and exits 
without doing anything else).

I am running NetBSD from the 20050408-3.0_BETA binary snapshot. As Xen kernel, 
I use the "xen205-loadksym.gz" available from arch/xen/xen20. I have copied 
both netbsd-XEN0 and netbsd-XENU kernels as /netbsd on the respective root 
file systems.

Last night, I finally logged the serial console output, and got the attached 
output by running bt in ddb. As you can see, the problem seems to be network 
related (output of ifconfig -a is also attached below).

Any ideas?
Marcello

------------------------------------------
db> bt
cpu_Debugger(b57c0800,c07cbc4f,c07c6a88,1,5) at netbsd:cpu_Debugger+0x4
panic(c05b9ec0,1,0,c1df5200,14) at netbsd:panic+0x121
m_copym0(0,449,1,1,0) at netbsd:m_copym0+0x32d
m_copym(c1df5200,449,1ea,1,0) at netbsd:m_copym+0x19
tcp_build_datapkt(c14ffa04,c1df9648,5a9,1ea,34) at 
netbsd:tcp_build_datapkt+0x26
f
tcp_output(c14ffa04,c07c6c08,50006cd8,c14ffa04,c07c6d20) at 
netbsd:tcp_output+0x
1201
tcp_sack_newack(c14ffa04,caebb824,c07c6d20,caebb838,0) at 
netbsd:tcp_sack_newack
+0xf6
tcp_input(c1bc0700,14,6,c177303c,c1df0b54) at netbsd:tcp_input+0x190c
ip_input(c1bc0700,1,20001964,a400,0) at netbsd:ip_input+0x6c4
ipintr(38007fff,0,9,1,c07c6e10) at netbsd:ipintr+0xa9
DDB lost frame for netbsd:Xsoftnet+0x49, trying 0xc07c6dd0
Xsoftnet() at netbsd:Xsoftnet+0x49
--- interrupt ---
?(c07c6e4c,0,3b9a0000,ca00,0) at 0
Bad frame pointer: 0xc03c1acd
------------------------------------------

[NOTICE that, when I tried "sync", it looks like I got an error regarding ex0, 
although this may just be a secondary effect of the initial panic.]

db> sync
syncing disks... ex0: uplistptr was 0
panic: m_copym: m == 0, len 1 [!COPYALL]
Stopped at      netbsd:cpu_Debugger+0x4:        leave
db> bt
cpu_Debugger(0,c07c6404,c04d5173,1,5) at netbsd:cpu_Debugger+0x4
panic(c05b9ec0,1,0,c1df5200,1) at netbsd:panic+0x121
m_copym0(0,449,1,1,0) at netbsd:m_copym0+0x32d
m_copym(c1df5200,449,1ea,1,0) at netbsd:m_copym+0x19
tcp_build_datapkt(c14ffa04,c1df9648,5a9,1ea,34) at 
netbsd:tcp_build_datapkt+0x26
f
tcp_output(c14ffa04,c07c64d8,500065a8,c14ffa04,c07c65f0) at 
netbsd:tcp_output+0x
1201
tcp_sack_newack(c14ffa04,caed7024,c07c65f0,caed7038,0) at 
netbsd:tcp_sack_newack
+0xf6
tcp_input(c14e0200,14,6,c177303c,c07c6668) at netbsd:tcp_input+0x190c
ip_input(c14e0200,c14e5400,c07c66d8,c04cc2bd,10) at netbsd:ip_input+0x6c4
ipintr(0,c066abc0,4,c14de9c0,c07c66e0) at netbsd:ipintr+0xa9
DDB lost frame for netbsd:Xsoftnet+0x49, trying 0xc07c66a0
Xsoftnet() at netbsd:Xsoftnet+0x49
--- interrupt ---
Bad frame pointer: 0xc03cf40e
0xc14dde00:
-------------------------------

Here is the output by ifconfig -a in Dom0 (after I rebooted and re-started 
DomU):

sip0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500
        address: 00:e0:18:86:9a:2a
        media: Ethernet autoselect (none)
        status: no carrier
ex0: flags=8863<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        capabilities=7<IP4CSUM,TCP4CSUM,UDP4CSUM>
        enabled=0
        address: 00:04:75:9f:5e:de
        media: Ethernet autoselect (100baseTX full-duplex)
        status: active
        inet 129.118.18.31 netmask 0xffffff00 broadcast 129.118.18.255
        inet6 fe80::204:75ff:fe9f:5ede%ex0 prefixlen 64 scopeid 0x2
lo0: flags=8009<UP,LOOPBACK,MULTICAST> mtu 33192
        inet 127.0.0.1 netmask 0xff000000
        inet6 ::1 prefixlen 128
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3
tun0: flags=51<UP,POINTOPOINT,RUNNING> mtu 1450
        inet 10.3.0.2 -> 10.3.0.1 netmask 0xffffffff
xvif1.0: flags=8863<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST> mtu 
1500
        address: ba:00:02:51:02:f5
        inet 172.19.210.1 netmask 0xffff0000 broadcast 172.19.255.255
        inet6 fe80::b800:2ff:fe51:2f5%xvif1.0 prefixlen 64 scopeid 0x5