Subject: Re: netbsd 4.0 beta2 crashes when swapping
To: Pavel Cahyna <pavel@NetBSD.org>
From: Todd Kover <kovert@omniscient.com>
List: port-i386
Date: 05/22/2007 10:22:01
[ for the record, in case someone is lurking and had similar problems ] 

 > What will happen if you enter ddb from console and execute pool_drain
 > manually, both with the bad and the good kernel?
 >
 > ("call pool_drain(0)" at the ddb prompt)

Something in a more recent kernel (from this weekend) fixed this:

NetBSD 4.0_BETA2 (GENERIC) #1: Sat May 19 05:35:10 CEST 2007
        kovert@slivovice.cz.omniscient.com:/usr/obj/4.0-stable/i386/usr/src/os/NetBSD-4.0-branch/src/sys/arch/i386/compile/GENERIC

(cvs update from the branch earlier in the day, obviously).  I didn't
end up getting time to run the above on the old kernels.

I'm now seeing crashes in GENERIC.MP on the box now when I the attached
rc.d script is run during bootup that result in ddb (didn't write
down whwere it died), but sync just sits there.  I'm still working on
reproducing it and will open a pr if it doesn't go away and I can track
down a cause. (kernel and userspace are from the same sources).

I had another crash with GENERIC after around 18 hours of uptime that I
was able to sync blindly (was runnign X at the time) but somehow didn't
get a crash dump, so I'm not sure what's up.  I'll open a pr if I can
get some reasonable data.

In any case, just a datapoint in case someone is having similar
experiences with 4.0 beta2.  I'll open prs if I can get something more
substantial.

[ from another message, you said ]

 > To track what have changed in the netbsd-4 branch, search for
 > emails with netbsd-4 in the subject in source-changes@ archives -
 > easy to do eg. with mutt. If you do not have the email archives,
 > use the news ones at news.gmane.org/gmane.os.netbsd.devel.cvs
 > . Or look at the list of resolved pullup requests at
 > http://releng.netbsd.org/cgi-bin/req-4.cgi?status=resolved

yeah, I had looked through this (I archive source-changes locally and
just grep'd through an mh dir) and didn't see anything in the time frame
that jumped out at me.  I was hoping a source diff would enlighten me to
something that the descriptions didn't.

thanks for your assistance,
-Todd

---<snip>---

#!/bin/sh
#
# $NetBSD: local,v 1.4.4.1 2000/08/23 12:11:17 lukem Exp $
#

# REQUIRE: mountall
# PROVIDE: sysctl-tweak

. /etc/rc.subr

name="sysctl-tweak"
start_cmd="sysctl_tweak_start"
stop_cmd="sysctl_tweak_stop"

sysctl_tweak_start()
{
	pids=`ps -axo pid | grep -v '^ *PID'`
	#ppid=`ps -o ppid -p $$ | tail -1 | sed 's/ *//g'`

	echo resetting maxproc values for `echo $pids | wc -w` processes.
	(
	/sbin/sysctl -w kern.maxproc=2048
	for pid in $pids ; do
		numlines=`ps $pid |wc -l`
		if [ "$numlines" -gt 1 ] ; then
			/sbin/sysctl -w proc.${pid}.rlimit.descriptors.soft=1024  
			/sbin/sysctl -w proc.${pid}.rlimit.descriptors.hard=2048  
			/sbin/sysctl -w proc.${pid}.rlimit.maxproc.soft=512
			/sbin/sysctl -w proc.${pid}.rlimit.maxproc.hard=1024
		fi
	done
	) >/dev/null
}

sysctl_tweak_stop()
{
}

load_rc_config $name
run_rc_command "$1"