Subject: Re: netbsd-4 LFS problems
To: Konrad Schroder <perseant@hhhh.org>
From: Chris Ross <cross+netbsd@distal.com>
List: current-users
Date: 08/02/2007 09:31:49
On Jul 16, 2007, at 10:16, Chris Ross wrote:
> On Jul 10, 2007, at 19:07, Konrad Schroder wrote:
>> Try revision 1.208 of sys/ufs/lfs/lfs_vnops.c, I think that should  
>> fix it. I am having a hard time making my test system go into that  
>> bit of code, so the fix is by inspection only; please let me know  
>> how it works out for you (either way).
>
>   There are a few changes between netbsd-4 and 1.208 of  
> lfs_vnops.c, many of which won't work.  I left the pagedaemon_proc - 
> > pagedaemon_lwp and preempt() calls et al alone, and just hand- 
> applied:

   Okay.  Weeks go by, and the machine finally does panic.  But it  
didn't crash the same way, and I'm not sure the stack is useful.   
Looks like it hosed itself.  This happened at about 15:15 yesterday  
afternoon, local time (US-EDT), when there was noone using this  
system or the networks in the house at all.  Should've been nearly  
idle, except for the constant background packets routers are always  
handling.

   Let me know if there's any more information I can gather.  Thanks...

                                     - Chris


(gdb) target kvm /export/netbsd.2.core
#0  0xc037afbc in cpu_reboot (howto=0, bootstr=0x0)
     at /data/NetBSD/src-4/sys/arch/i386/i386/machdep.c:896
896                     dumpsys();
(gdb) where
#0  0xc037afbc in cpu_reboot (howto=0, bootstr=0x0)
     at /data/NetBSD/src-4/sys/arch/i386/i386/machdep.c:896
#1  0xc030627d in panic (fmt=0xc04d10f9 "trap") at /data/NetBSD/src-4/ 
sys/kern/subr_prf.c:246
#2  0xc03862d6 in trap (frame=0xcb2326d4) at /data/NetBSD/src-4/sys/ 
arch/i386/i386/trap.c:339
#3  0xc010bf8a in calltrap ()
#4  0xcb2326d4 in ?? ()
#5  0xcb230010 in ?? ()
#6  0xc1aa0030 in ?? ()
#7  0xcb230010 in ?? ()
#8  0xc02f0010 in setroot (bootdv=0xc1aa9800, bootpartition=5)
     at /data/NetBSD/src-4/sys/kern/kern_subr.c:1062
#9  0xc026fec6 in lfs_segwrite (mp=0xc1b98000, flags=5)
     at /data/NetBSD/src-4/sys/ufs/lfs/lfs_segment.c:631
#10 0xc0276960 in lfs_sync (mp=0xc1b98000, waitfor=2,  
cred=0xcb200f3c, l=0xc05872e0)
     at /data/NetBSD/src-4/sys/ufs/lfs/lfs_vfsops.c:1068
#11 0xc033e13f in sys_sync (l=0xc05872e0, v=0x0, retval=0x0)
     at /data/NetBSD/src-4/sys/kern/vfs_syscalls.c:677
#12 0xc0336f39 in vfs_shutdown () at /data/NetBSD/src-4/sys/kern/ 
vfs_subr.c:2234
#13 0xc037b045 in cpu_reboot (howto=256, bootstr=0x0)
     at /data/NetBSD/src-4/sys/arch/i386/i386/machdep.c:882
#14 0xc030627d in panic (fmt=0xc04d10f9 "trap") at /data/NetBSD/src-4/ 
sys/kern/subr_prf.c:246
#15 0xc03862d6 in trap (frame=0xcb232938) at /data/NetBSD/src-4/sys/ 
arch/i386/i386/trap.c:339
#16 0xc010bf8a in calltrap ()
#17 0xcb232938 in ?? ()
#18 0xc2200010 in ?? ()
#19 0x00000030 in ?? ()
#20 0x00000010 in ?? ()
#21 0xcb230010 in ?? ()
#22 0x0000003a in ?? ()
#23 0xcb232a0c in ?? ()
#24 0xcb2329d0 in ?? ()
#25 0xcb232a08 in ?? ()
#26 0xc2208008 in ?? ()
#27 0xc2208000 in ?? ()
#28 0x25ae0000 in ?? ()
#29 0x00000006 in ?? ()
#30 0x00000000 in ?? ()
(gdb)


And the "ps alxw", which also looks a little off, but...

skaro% ps alxw -M /export/netbsd.2.core -N netbsd.gdb
UID   PID        PPID   CPU PRI NI    VSZ RSS WCHAN    STAT  
TTY        TIME COMMAND
    0     0 -1145124352     0 -18  0      0   0 schedule DWKs ?        
0:00.00 [swapper]
    0     1 -1145124352    27  10  0     80   0 wait     UWs  ?        
0:27.00 init
    0     2 -1145124352     0 -18  0      0   0 smtaskq  DWK  ?        
0:00.00 [sysmon]
    0     3 -1145124352     0  -6  0      0   0 sccomp   DWK  ?        
0:00.00 [scsibus0]
    0     4 -1145124352     0  -6  0      0   0 sccomp   DWK  ?        
0:00.00 [scsibus1]
    0     5 -1145124352     0  -6  0      0   0 atath    DWK  ?        
0:00.00 [atabus0]
    0     6 -1145124352     0  10  0      0   0 pmsreset DWK  ?        
0:00.00 [pms0]
    0     7 -1145124352     0  14  0      0   0 crypto_w DWK  ?        
0:00.00 [cryptoret]
    0     8 -1145124352     0  -6  0      0   0 sccomp   DWK  ?        
0:00.00 [atapibus0]
    0     9 -1145124352  1784 -18  0      0   0 pgdaemon DWK  ?       
29:44.00 [pagedaemon]
    0    10 -1145124352   475  18  0      0   0 syncer   DWK  ?        
7:55.00 [ioflush]
    0    11 -1145124352     0 -18  0      0   0 aiodoned DWK  ?        
0:00.00 [aiodoned]
    0    46 -1145124352     0  -6  0      0   0 physiod  DWK  ?        
0:00.00 [physiod]
    0    96 -1145124352 57202  10  0   4192   0 wait     UWs  ?      
953:22.06 (squid)
1000   100 -1145124352     0   2  0 283332   0 poll     UWa  ?        
0:00.00 (squid)
    0   156 -1145124352     0  -2  0   4328   0 segment  UWs  ?        
0:00.00 (lfs_cleanerd)
    0   179 -1145124352     0 -18  0      0   0 lfswrite DWK  ?        
0:00.00 [lfs_writer]
    0   226 -1145124352     0   2  0    208   0 kqread   UWs  ?        
0:00.00 (master)
    0   235 -1145124352 49658   2  0     64   0 kqread   UWs  ?      
827:38.05 (inetd)
    0   280 -1145124352     0   2  0    632   0 select   UWs  ?        
0:00.00 (dhclient)
    0   380 -1145124352  2409   2  0    336   0 select   UWs  ?       
40:09.00 (conserver)
    0   400 -1145124352     0   2  0    180   0 -        UWs  ?        
0:00.00 (syslogd)
    0   498 -1145124352     0  18  0  28604   0 sigwait  UWsa ?        
0:00.00 (named)
   12   504 -1145124352     0   2  0    272   0 kqread   UW   ?        
0:00.00 (qmgr)
    0   541 -1145124352     0  10  0    200   0 mfsidl   UWs  ?        
0:00.00 (mount_mfs)
    0   687 -1145124352     0  -2  0   5000   0 segment  UWs  ?        
0:00.00 (lfs_cleanerd)
    0   695 -1145124352     0  -2  0   4404   0 segment  UWs  ?        
0:00.00 (lfs_cleanerd)
    0   730 -1145124352     0  10  0    236   0 nanoslee UWs  ?        
0:00.00 (cron)
    0   881 -1145124352     0   2  0   1264   0 select   UWs  ?        
0:00.00 (dhcpd)
    0   917 -1145124352     0  18  0   1128   0 pause    UWs  ?        
0:00.00 (ntpd)
1000  1151 -1145124352 52745   2  0   2064   0 piperd   UWs  ?      
879:05.05 (unlinkd)
    0  1179 -1145124352   249   2  0    276   0 select   UWs  ?        
4:09.00 (sshd)
1000  1247 -1145124352     0   2  0   2140   0 -        UWs  ?        
0:00.00 (pinger)
    0  1278 -1145124352     0   2  0    348   0 select   UW   ?        
0:00.00 (conserver)
   12 14378 -1145124352     0   2  0    216   0 kqread   UW   ?        
0:00.00 (pickup)
    0 16909 -1145124352     0  10  0    728   0 nanoslee UWs  ?        
0:00.00 (ipmon)
    0 19956 -1145124352     0   2  0     96   0 poll     UWs  ?        
0:00.00 (rtadvd)
    0 21366 -1145124352     0  10  0   2392   0 nanoslee UWs  ?        
0:00.00 (gw6c)
   12 22377 -1145124352     0   2  0    220   0 kqread   UW   ?        
0:00.00 (tlsmgr)
    0   206 -1145124352     0   3  0     52   0 ttyin    UWs+ ttyE0    
0:00.00 (getty)
    0  1246 -1145124352 39925   3  0     52   0 ttyin    UWs+ ttyE1  
665:25.04 (getty)
    0   847 -1145124352 41469   3  0     52   0 ttyin    UWs+ ttyE2  
691:09.04 (getty)
    0   296 -1145124352 39925   3  0     52   0 ttyin    UWs+ ttyE3  
665:25.04 (getty)