Re: I can't generate a kernel crash core.
I have been debuging this problem with gdb and printfs in the source for locate the path. I have found it fails in: arch/amd64/amd64/machdep.c:dodumpsys does: psize = bdev_size(dumpdev); kern/subr_devsw.c:bdev_size calls rv = (*d->d_psize)(dev) In my case the dev has major 0 and minor 1 (gdb) print bdevsw[0].d_psize $1 = (int (*)(dev_t)) 0x80a0ad60 then d->d_psize is the function wdsize dev/ata/wd.c:wdsize does wd = device_lookup_private(_cd, WDUNIT(dev)); kern/subr_autoconf.c:device_lookup_private does return device_private(device_lookup(cd, unit)); kern/subr_autoconf.c:device_lookup fails and returns NULL. This is in the sentence: else if ((dv = cd->cd_devs[unit]) != NULL && dv->dv_del_gen != 0) dv = NULL; config_alldevs_unlock(s); return dv; because cd->cd_devs[unit]) is null. I have checked these values with printf in the function and these are (executing a reboot -d): unit: 0 cd->cd_ndevs: 4 dv is assigned NULL in the asignement: dv = cd->cd_devs[unit]) If I check these values when the system is running cd->cd_devs[unit] isn't NULL. (gdb) print wd_cd->cd_devs[0] $23 = (device_t) 0xfe8107cc6408 (gdb) print (*wd_cd->cd_devs[0]).dv_del_gen $24 = 0 It seems that in the ordered shutdow process this structure (cd->cd_devs[unit] is destroyed, and the dump fails. This is the log from dmesg. It says "dump area unavailable" (file src/sys/arch/amd64/amd64/machdep.c line 1156) . wd0: detached atabus0: detached dumping to dev 0,1 (offset=8410383, size=1046094): dump area unavailable rebooting... The swap device configuration seems ok: pc2$ swapctl -z dump device is wd0b On Sun, Jan 24, 2016 at 11:00 PM, Jose Luis Rodriguez Garciawrote: > If the kernel hash a panic, the dump is captured, etc. and it works ok > (kern.dump_on_panic=1). > > I can't generate a crash dump of a running system. > > > On Sun, Jan 24, 2016 at 10:28 PM, Jose Luis Rodriguez Garcia > wrote: >> It is NetBSD 7.0 amd64 >> >> The swap size is 8 GB, and the memory of the PC is 4GB. >>
Re: I can't generate a kernel crash core.
If the kernel hash a panic, the dump is captured, etc. and it works ok (kern.dump_on_panic=1). I can't generate a crash dump of a running system. On Sun, Jan 24, 2016 at 10:28 PM, Jose Luis Rodriguez Garciawrote: > It is NetBSD 7.0 amd64 > > The swap size is 8 GB, and the memory of the PC is 4GB. >
I can't generate a kernel crash core.
It is NetBSD 7.0 amd64 The swap size is 8 GB, and the memory of the PC is 4GB. This the /etc/sysctl.conf file: pc2$ grep -v '^#' /etc/sysctl.conf ddb.onpanic?=0 kern.ipc.shmmax=16000 vfs.generic.usermount=1 machdep.sparse_dump=1 kern.dump_on_panic=1 I have tried with: reboot 0x100 reboot 0x104 halt|reboot -dq etc without sucess. I have tried to add savecore=yes to /etc/rc.conf. Doing a halt -dv o reboot -dqx, I can't see any message that it tries to dump. I have tried also to do a: sysctl -w kern.dump_on_panic=0, and it didn't work. pc2# swapctl -l Device 1K-blocks UsedAvail Capacity Priority /dev/wd0b 83895680 8389568 0%0 By the way I have seen a strange thing: Doing a rcorder , swap1 and swap2 are execute before of savecore. I thought that savecore that should be executed before of adding swap. pc2# rcorder * wdogctl fsck_root modules resize_root root ccd rndctl cgd lvm raidframe DISKS swap1 fsck mountcritlocal random_seed bootconf.sh ttys pf_boot ipsec ipfilter sysctl network wpa_supplicant dhclient dhcpcd ldpd npf pf route6d routed rtsold staticroute NETWORKING mountcritremote sysdb newsyslog wscons syslogd ppp named rtclocaltime ntpdate rpcbind ypserv ypbind yppasswdd mountall perusertmp cleartmp xfs accounting amd dmesg fccache veriexec ldconfig quota mountd nfsd nfslocking pwcheck gpio ipnat securelevel swap2 virecover altqd blacklistd ifwatchd isdnd downinterfaces ipfs ipmon kdc pflogd racoon savecore SERVERS DAEMON apmd bluetooth bootparams devpubd dhcpd dhcrelay ftp_proxy irdaattach local lpd makemandb mopd motd mrouted ntpd powerd rarpd rbootd rtadvd rwho screenblank timed tpctl LOGIN xdm wsmoused sshd raidframeparity postfix ndbootd moused mixerctl mdnsd isibootd iscsi_target inetd identd httpd hostapd ftpd envsys dbus cron pc2#